# Medicine (HL7)

<a id="database.mmt_admissiontypes"></a>

## mmt_admissiontypes

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Master-data table of admission types in the medical-data integration (HL7).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `amt_id` | `nvarchar` | 1 | Short code of the admission type (primary key). |
| `amt_lastupdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `amt_name` | `nvarchar` | 50 | Display name of the admission type. |

<a id="database.mmt_obsabnormflags"></a>

## mmt_obsabnormflags

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Master-data table of abnormal flags used in laboratory results to mark values outside the normal range (HL7 standard).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `oaf_id` | `nvarchar` | 5 | Short code of the flag (e.g. `H`, `L`, `HH`, `LL`) — primary key. |
| `oaf_lastupdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `oaf_name` | `nvarchar` | 50 | Display name of the flag. |
| `oaf_comment` | `nvarchar` | 50 | Descriptive comment. |

### Related tables

* [ltt_obsresults](laboratory_lims.md#database.ltt_obsresults), [mtt_obsresults](medicine_hl7.md#database.mtt_obsresults) — use these flags in observation evaluation.

<a id="database.mmt_observations"></a>

## mmt_observations

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Central master-data table of the medical-data integration: holds the definitions of all observations (lab values, examinations, diagnostic parameters) with standard unit, standard reference range, LOINC components and classification.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `obs_id` | `nvarchar` | 7 | Observation ID (primary key). |
| `obs_lastupdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `obs_name` | `nvarchar` | 50 | Display name of the observation. |
| `obs_StdValType_ID` | `nvarchar` | 2 | Standard value type. References [mmt_obsvaluetypes](medicine_hl7.md#database.mmt_obsvaluetypes). |
| `obs_StdUnit_ID` | `nvarchar` | 20 | Standard unit. References [mmt_units](medicine_hl7.md#database.mmt_units). |
| `obs_StdRefRange` | `nvarchar` | 60 | Standard reference range as text (e.g. "70-110"). |
| `obs_StdMinValue` | `real` | — | Lower normal limit of the standard range. |
| `obs_StdMaxValue` | `real` | — | Upper normal limit of the standard range. |
| `obs_Position` | `int` | — | Sort position in list displays. |
| `obs_Color` | `int` | — | Display color (RGB value). |
| `obs_ScsClass` | `nvarchar` | 30 | SCS classification. |
| `obs_LnComponent` | `nvarchar` | 150 | LOINC: component axis. |
| `obs_LnProperty` | `nvarchar` | 30 | LOINC: property axis. |
| `obs_LnTimeAspct` | `nvarchar` | 15 | LOINC: time-aspect axis. |
| `obs_LnSystem` | `nvarchar` | 100 | LOINC: system axis (specimen material). |
| `obs_LnScaleType` | `nvarchar` | 30 | LOINC: scale-type axis. |
| `obs_LnMethodType` | `nvarchar` | 50 | LOINC: method-type axis. |
| `obs_LnRelatedNames` | `nvarchar` | 255 | LOINC: related names. |
| `obs_LnClass` | `nvarchar` | 20 | LOINC class. |
| `obs_LnClassType` | `smallint` | — | LOINC class type. |
| `obs_IUPAC` | `nvarchar` | 8 | IUPAC code. |
| `obs_MolarMass` | `real` | — | Molar mass (for substance-quantity calculations). |
| `obs_altcode` | `nvarchar` | 50 | Alternative code. |
| `obs_material` | `nvarchar` | 255 | Specimen-material description. |
| `obs_comment` | `nvarchar` | 255 | Descriptive comment. |
| `obs_lnmoleid` | `nvarchar` | 20 | LOINC molecule ID. |
| `obs_lnshortname` | `nvarchar` | 50 | LOINC short name. |
| `obs_lnrelnames2` | `nvarchar` | 255 | LOINC: further related names. |
| `obs_euclide` | `nvarchar` | 20 | EUCLIDES code. |
| `obs_snowmed` | `nvarchar` | 20 | SNOMED code. |

### Related tables

* [mmt_units](medicine_hl7.md#database.mmt_units) — standard unit.
* [mmt_obsvaluetypes](medicine_hl7.md#database.mmt_obsvaluetypes) — standard value type.
* [mmt_obsordersetdt](medicine_hl7.md#database.mmt_obsordersetdt), [mmt_obsviewsetdt](medicine_hl7.md#database.mmt_obsviewsetdt) — assignment to order / viewing sets.
* [mtt_obsresults](medicine_hl7.md#database.mtt_obsresults) — concrete results reference these definitions.

<a id="database.mmt_obsordersetdt"></a>

## mmt_obsordersetdt

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Detail table for [mmt_obsordersets](medicine_hl7.md#database.mmt_obsordersets). Determines which observations ([mmt_observations](medicine_hl7.md#database.mmt_observations)) are part of which order set and in what order.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `ood_ID` | `nvarchar` | 36 | GUID of the detail row (primary key). |
| `ood_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `ood_ObsOrderSet_ID` | `nvarchar` | 36 | GUID of the associated order set. References [mmt_obsordersets.oos_ID](medicine_hl7.md#database.mmt_obsordersets). |
| `ood_Position` | `smallint` | — | Display order within the order set. |
| `ood_Observation_ID` | `nvarchar` | 7 | ID of the observation. References [mmt_observations.obs_id](medicine_hl7.md#database.mmt_observations). |

<a id="database.mmt_obsordersets"></a>

## mmt_obsordersets

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Master-data table of order sets — groups of related examination orders that can be ordered as a bundle.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `oos_ID` | `nvarchar` | 36 | GUID of the order set (primary key). |
| `oos_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `oos_Name` | `nvarchar` | 50 | Display name of the order set. |

### Related tables

* [mmt_obsordersetdt](medicine_hl7.md#database.mmt_obsordersetdt) — detail rows (members of an order set).

<a id="database.mmt_obsresltstates"></a>

## mmt_obsresltstates

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Master-data table of HL7 result states describing the processing/validation status of an observation result.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `ors_ID` | `nvarchar` | 1 | Short code of the result state (e.g. `F`, `P`, `C`) — primary key. |
| `ors_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `ors_Name` | `nvarchar` | 50 | Display name of the result state. |

<a id="database.mmt_obsvaluetypes"></a>

## mmt_obsvaluetypes

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Master-data table of HL7 observation-value types (OBX value-type codes).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `ovt_ID` | `nvarchar` | 2 | Short code of the value type (e.g. `NM`, `ST`, `CE`) — primary key. |
| `ovt_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `ovt_Name` | `nvarchar` | 50 | Display name of the value type. |

<a id="database.mmt_obsviewingsets"></a>

## mmt_obsviewingsets

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Master-data table of viewing sets — groups of observation types that are displayed together in the result view.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `ovs_ID` | `nvarchar` | 36 | GUID of the viewing set (primary key). |
| `ovs_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `ovs_Name` | `nvarchar` | 50 | Display name of the viewing set. |

### Related tables

* [mmt_obsviewsetdt](medicine_hl7.md#database.mmt_obsviewsetdt) — detail rows (members of a viewing set).

<a id="database.mmt_obsviewsetdt"></a>

## mmt_obsviewsetdt

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Detail table for [mmt_obsviewingsets](medicine_hl7.md#database.mmt_obsviewingsets). Defines the members and their display order within a viewing set.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `ovd_ID` | `nvarchar` | 36 | GUID of the detail row (primary key). |
| `ovd_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `ovd_ObsViewSet_ID` | `nvarchar` | 36 | GUID of the associated viewing set. References [mmt_obsviewingsets.ovs_ID](medicine_hl7.md#database.mmt_obsviewingsets). |
| `ovd_Position` | `smallint` | — | Display order. |
| `ovd_Observation_ID` | `nvarchar` | 7 | ID of the observation. References [mmt_observations.obs_id](medicine_hl7.md#database.mmt_observations). |

<a id="database.mmt_orderctrlcodes"></a>

## mmt_orderctrlcodes

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Master-data table of HL7 order-control codes (ORC.1).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `occ_ID` | `nvarchar` | 2 | Short code (e.g. `NW`, `CA`, `XO`) — primary key. |
| `occ_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `occ_Name` | `nvarchar` | 60 | Display name / meaning of the code. |

<a id="database.mmt_patclasscodes"></a>

## mmt_patclasscodes

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Master-data table of HL7 patient-class codes (PV1.2).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `pcc_ID` | `nvarchar` | 1 | Short code (e.g. `I`, `O`, `E`) — primary key. |
| `pcc_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `pcc_Name` | `nvarchar` | 50 | Display name / meaning of the code. |

<a id="database.mmt_sexes"></a>

## mmt_sexes

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Master-data table of HL7 sex codes.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `sex_ID` | `nvarchar` | 1 | Sex code (e.g. `F`, `M`, `O`, `U`) — primary key. |
| `sex_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `sex_Name` | `nvarchar` | 50 | Display name. |

<a id="database.mmt_unitconversion"></a>

## mmt_unitconversion

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Holds conversion rules between units (`mmt_units`). One entry per source/destination unit pair with a conversion factor and an optional script for complex conversions.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `ucv_ID` | `nvarchar` | 36 | GUID of the conversion rule (primary key). |
| `ucv_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `ucv_SourceUnit_ID` | `nvarchar` | 20 | ID of the source unit. References [mmt_units.unt_ID](medicine_hl7.md#database.mmt_units). |
| `ucv_DestUnit_ID` | `nvarchar` | 20 | ID of the destination unit. References [mmt_units.unt_ID](medicine_hl7.md#database.mmt_units). |
| `ucv_Factor` | `real` | — | Multiplication factor for the conversion (source value * factor = destination value). |
| `ucv_Script` | `image` | — | Optional script for non-linear conversions (BLOB). |

<a id="database.mmt_units"></a>

## mmt_units

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Master-data table of units of measurement for the medical-data integration.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `unt_ID` | `nvarchar` | 20 | Unit identifier (primary key). |
| `unt_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `unt_Name` | `nvarchar` | 200 | Full name of the unit. |
| `unt_Abbreviation` | `nvarchar` | 20 | Short form / abbreviation of the unit (e.g. `mg/dL`). |

### Related tables

* [mmt_unitconversion](medicine_hl7.md#database.mmt_unitconversion) — conversion factors between units.
* [lmt_units](laboratory_lims.md#database.lmt_units) — analogous unit list for LIMS.

<a id="database.mtt_commonorders"></a>

## mtt_commonorders

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Transaction table of common orders. Maps the ORC level from HL7 messages — a common order is the parent container for one or more OBR orders.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `orc_ID` | `nvarchar` | 36 | GUID of the common order (primary key). |
| `orc_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `orc_State` | `smallint` | — | Status code. |
| `orc_CreationDT` | `datetime` | — | Creation date. |
| `orc_CreationUser` | `nvarchar` | 255 | User name of the creator. |
| `orc_ReleaseDT` | `datetime` | — | Release date. |
| `orc_CancelDT` | `datetime` | — | Cancellation date. |
| `orc_CancelUser` | `nvarchar` | 255 | User name of the canceller. |
| `orc_CancelReason` | `nvarchar` | 80 | Reason for cancellation. |
| `orc_VisObjectID` | `int` | — | Reference to DMS visit/case record. |
| `orc_AccObjectID` | `int` | — | Reference to DMS account record. |
| `orc_PatObjectID` | `int` | — | Reference to DMS patient record. |
| `orc_PAVCabinetType` | `int` | — | Cabinet type of the PAV (patient-file management). |
| `orc_OrderCtrl_ID` | `nvarchar` | 2 | Order-control code. References [mmt_orderctrlcodes.occ_ID](medicine_hl7.md#database.mmt_orderctrlcodes). |
| `orc_PlacerOrderID` | `nvarchar` | 15 | Placer order ID (assigned by the requester). |
| `orc_FillerOrderID` | `nvarchar` | 15 | Filler order ID (assigned by the lab). |

### Related tables

* [mtt_obsrequests](medicine_hl7.md#database.mtt_obsrequests) — subordinate orders.
* [mmt_orderctrlcodes](medicine_hl7.md#database.mmt_orderctrlcodes) — order-control code master data.

<a id="database.mtt_obsrequests"></a>

## mtt_obsrequests

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Transaction table of orders at the OBR level. Analogous to [ltt_obsrequests](laboratory_lims.md#database.ltt_obsrequests) (LIMS), but for the HL7-based medical integration.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `obr_ID` | `nvarchar` | 36 | GUID of the order (primary key). |
| `obr_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `obr_State` | `smallint` | — | Status code. |
| `obr_CreationDT` | `datetime` | — | Creation date. |
| `obr_CreationUser` | `nvarchar` | 255 | User name of the creator. |
| `obr_ReleaseDT` | `datetime` | — | Release date. |
| `obr_CancelDT` | `datetime` | — | Cancellation date. |
| `obr_CancelUser` | `nvarchar` | 255 | User name of the canceller. |
| `obr_CancelReason` | `nvarchar` | 120 | Reason for cancellation. |
| `obr_VisObjectID` | `int` | — | Reference to DMS visit/case record. |
| `obr_AccObjectID` | `int` | — | Reference to DMS account record. |
| `obr_PatObjectID` | `int` | — | Reference to DMS patient record. |
| `obr_PAVCabinetType` | `int` | — | Cabinet type of the PAV. |
| `obr_CommonOrder_ID` | `nvarchar` | 36 | GUID of the parent common order. References [mtt_commonorders.orc_ID](medicine_hl7.md#database.mtt_commonorders). |
| `obr_PlacerOrderID` | `nvarchar` | 15 | Placer order ID. |
| `obr_FillerOrderID` | `nvarchar` | 15 | Filler order ID. |
| `obr_ObservationDT` | `datetime` | — | Time of the observation. |
| `obr_ObsOrderSet_ID` | `nvarchar` | 7 | Referenced order set. |
| `obr_ArchiveDocID` | `int` | — | ID of the archived DMS result document. |

### Related tables

* [mtt_commonorders](medicine_hl7.md#database.mtt_commonorders) — parent common order.
* [mtt_obsresults](medicine_hl7.md#database.mtt_obsresults) — result values for the order.

<a id="database.mtt_obsresults"></a>

## mtt_obsresults

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Transaction table of observation results at the OBX level. Analogous to [ltt_obsresults](laboratory_lims.md#database.ltt_obsresults) (LIMS), but for the HL7-based medical integration.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `obx_ID` | `nvarchar` | 36 | GUID of the result (primary key). |
| `obx_LastUpdatedTS` | `int` | — | Timestamp of the last change (UNIX time). |
| `obx_ObsRequest_ID` | `nvarchar` | 36 | GUID of the associated order. References [mtt_obsrequests.obr_ID](medicine_hl7.md#database.mtt_obsrequests). |
| `obx_State` | `smallint` | — | Status code. |
| `obx_VisObjectID` | `int` | — | Reference to DMS visit/case record. |
| `obx_AccObjectID` | `int` | — | Reference to DMS account record. |
| `obx_PatObjectID` | `int` | — | Reference to DMS patient record. |
| `obx_PAVCabinetType` | `int` | — | Cabinet type of the PAV. |
| `obx_Observation_ID` | `nvarchar` | 7 | Observation ID. References [mmt_observations.obs_id](medicine_hl7.md#database.mmt_observations). |
| `obx_Observation_CE` | `nvarchar` | 250 | Coded-element identifier of the observation (HL7 CE data type). |
| `obx_SubObs_ID` | `nvarchar` | 7 | Sub-observation ID. |
| `obx_ValueType_ID` | `nvarchar` | 2 | Value type. References [mmt_obsvaluetypes.ovt_ID](medicine_hl7.md#database.mmt_obsvaluetypes). |
| `obx_Value` | `nvarchar` | 50 | Measured value as text. |
| `obx_Unit_ID` | `nvarchar` | 20 | Unit. References [mmt_units.unt_ID](medicine_hl7.md#database.mmt_units). |
| `obx_RefRange` | `nvarchar` | 60 | Reference range as text. |
| `obx_MinValue` | `real` | — | Lower normal limit. |
| `obx_MaxValue` | `real` | — | Upper normal limit. |
| `obx_AbnormFlag_ID` | `nvarchar` | 5 | Abnormal flag. References [mmt_obsabnormflags.oaf_id](medicine_hl7.md#database.mmt_obsabnormflags). |
| `obx_ResultState_ID` | `nvarchar` | 1 | Result state. References [mmt_obsresltstates.ors_ID](medicine_hl7.md#database.mmt_obsresltstates). |
| `obx_FootnoteID` | `nvarchar` | 5 | Footnote ID. |
| `obx_FootnoteText` | `nvarchar` | 255 | Footnote text. |
| `obx_Comment` | `nvarchar` | 50 | Free-text comment. |
| `obx_creationdt` | `datetime` | — | Creation date. |
| `obx_creationuser` | `nvarchar` | 16 | User name of the creator. |
| `obx_releasedt` | `datetime` | — | Release date. |
| `obx_canceldt` | `datetime` | — | Cancellation date. |
| `obx_canceluser` | `nvarchar` | 16 | User name of the canceller. |
| `obx_cancelreason` | `nvarchar` | 120 | Reason for cancellation. |

### Related tables

* [mtt_obsrequests](medicine_hl7.md#database.mtt_obsrequests) — parent order.
* [mmt_observations](medicine_hl7.md#database.mmt_observations) — observation master data.
* [mmt_units](medicine_hl7.md#database.mmt_units), [mmt_obsvaluetypes](medicine_hl7.md#database.mmt_obsvaluetypes), [mmt_obsabnormflags](medicine_hl7.md#database.mmt_obsabnormflags), [mmt_obsresltstates](medicine_hl7.md#database.mmt_obsresltstates) — master-data lookups.
