Click or drag to resize
Database Table OrgUnitSync

[This is preliminary documentation and is subject to change.]

Each row in OrgUnit defines an loaded organizational unit.

Fields

Field name

Type

Note

Description

Type

VARCHAR(20)

Primary key, foreign key to OrgunitType

Refers to a type defined in the OrgUnitType table

Code

VARCHAR(20)

Primary key

Identifying code (not unique)

CreatedDateTime

datetime

date and time for creating the organizational unit in the database

CreatedBy

int

Employee id for employee who created the organizational unit in the database

Name

VARCHAR(255)

The name of the organizational unit

ShortName

VARCHAR(20)

The short name of the organizational unit

Alias

VARCHAR(20)

An alias for the organizational unit

Capacity

int

The capacity of the organizational unit. Can be used looesely to define things such as; number of beds, number of patients etc.

ParentType

VARCHAR(20)

Foreign key to Orgunit

The organizational unit can refer to another organizational unit that is the parent. ParentType holds the type of that organizational unit. Refers to a type defined in the OrgUnitType table

ParentCode

VARCHAR(20)

Foreign key to Orgunit

The identifying code of the parent organizational unit.

ReferenceType

VARCHAR(20)

Foreign key to OrgunitType

The organizational unit referes to another organization unit with this type. Refers to a type defined in the OrgUnitType table.

ReferenceCode

VARCHAR(20)

The organizational unit referes to another organization unit with this code.

GUID

Uniqueidentifier

Internal use

For integration with Microsoft Active Directory (NOT IMPLEMENTED YET!)

Location

VARCHAR(50)

The location part of the organizational unit address

Road

VARCHAR(50)

The road part of the organizational unit address

HouseNum

VARCHAR(20)

The house number part of the organizational unit address

ZipNum

int

For holding numeric zip codes. ZipCode text can be found in lookup table ZipCodeNumeric if it exists. If this is not the case the ZipText table is used for holding the zipcode text.

ZipString

VARCHAR(10)

For holding non numeric zip codes. ZipCode text can be stored in lookup table or in ZipText column.

ZipText

VARCHAR(50)

If no lookup table exists for finding text for ZipNum or ZipString, ZipText can be used for holding this text.

CountryCode

VARCHAR(20)

Holds the country code for the organization unit. Together with the OrgUnitCountryTypeString in the .config file. this refers to another organizational unit

Phone

VARCHAR(15)

The phone number for the organizational unit

Fax

VARCHAR(15)

The fax number for the organizational unit

Email

VARCHAR(50)

The email address for the organizational unit

EANIdentifier

bigint

The EANIdentifier for the organizational unit (used for MedCom communication)

Rate

int

This field can be loosely used for holding price ratings

Accreditation

bit

Used in accreditation (see Accreditation documentation for more info)

DistributeByFunctions

bit

Used in accreditation (see Accreditation documentation for more info)

Accreditation

bit

Used in accreditation (see Accreditation documentation for more info)

AccreditationBodyNumber

bit

Used in accreditation (see Accreditation documentation for more info)

Relations

Table

Relation

OrgUnit

ParentType/ParentCode, ReferenceType/ReferenceCode and CountryCode are all relations to other organizational units in the OrgUnit table (self-relation).

OrgUnitType

ParentType is a 0..1 relation to OrgUnitType

OrgUnitType

ReferenceType is a 0..1 relation to OrgUnitType

OrgUnitType

Type is a 0..1 relation to OrgUnitType