Database Table OrgUnitHistory |
[This is preliminary documentation and is subject to change.]
This table exist only in data model version 4.17 and later!
This table contains historic informations on organizational units.
Each time a row in table OrgUnit is updated (whether from the TOPICA application or by direct database update), a copy of the row (with the values before the update) is copied into table OrgUnitCurrent by a database trigger.
Field name | Type | Note | Description |
---|---|---|---|
Type | VARCHAR(20) | Foreign key to OrgunitType | Refers to a type defined in the OrgUnitType table |
Code | VARCHAR(20) | 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 | |
UpdatedDateTime | datetime | Date and time for lastest update of the organizational unit in the database | |
UpdatedBy | int | Employee id for latest employee who has updated the organizational unit in the database | |
DeletedDateTime | datetime | date and time for logically deletion of the organizational unit in the database | |
DeletedBy | int | Employee id for employee who logically deleted 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 OrgunitType | 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) | 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 | |
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) |
Table | Relation |
---|---|
OrgUnit | ParentType/ParentCode, ReferenceType/ReferenceCode and CountryCode are all relations to other organizational units in the OrgUnit table (self-relation). |
ParentType is a 0..1 relation to OrgUnitType | |
ReferenceType is a 0..1 relation to OrgUnitType | |
Type is a 0..1 relation to OrgUnitType |