Schema reference / Tables / view MDX source
specimen_container
Details of a container used to hold, transport and/or archive a specimen for laboratory examination.
Details of a container used to hold, transport and/or archive a specimen for laboratory examination.
Purpose. To record details of a container used to hold, transport and/or archive a specimen for laboratory examination.
Source
| Model | Leg | Role |
|---|---|---|
openEHR-EHR-CLUSTER.specimen_container.v1 | openEHR | defines this table |
Columns
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — |
container_typecontainer_type_codecontainer_type_systemcontainer_type_valueset_id | coded texttext, text, text, text | yes | Container type | /items[at0005] |
container_id_valuecontainer_id_system | text, texttext, text | yes | Container ID | /items[at0003] |
description | text | yes | Description | /items[at0013] |
components | text | yes | Components | /items[at0037] |
additive_sadditive_s_codeadditive_s_systemadditive_s_valueset_id | coded texttext, text, text, text | yes | Additive/s | /items[at0026] |
capacity_magnitudecapacity_units | quantitynumeric, text | yes | Capacity | /items[at0035] |
minimum_volum_magnitudeminimum_volum_units | quantitynumeric, text | yes | Minimum volum | /items[at0038] |
comment | text | yes | Comment | /items[at0036] |
Constraints
check ((container_type_code is null and container_type_system is null and container_type_valueset_id is null) or (container_type is not null and container_type_code is not null and container_type_system is not null and container_type_valueset_id is not null))
check (container_id_system is null or container_id_value is not null)
check ((additive_s_code is null and additive_s_system is null and additive_s_valueset_id is null) or (additive_s is not null and additive_s_code is not null and additive_s_system is not null and additive_s_valueset_id is not null))
check ((capacity_magnitude is null and capacity_units is null) or (capacity_magnitude is not null and capacity_units is not null))
check ((minimum_volum_magnitude is null and minimum_volum_units is null) or (minimum_volum_magnitude is not null and minimum_volum_units is not null))References
| Columns | Target | On delete |
|---|---|---|
container_type_valueset_id, container_type_code, container_type_system, container_type | valueset_code | restrict |
additive_s_valueset_id, additive_s_code, additive_s_system, additive_s | valueset_code | restrict |
Referenced by
specimen_container_detailsviaspecimen_container_idspecimen_container_contentsviaspecimen_container_idspecimen_container_contentsviacontents_specimen_container_id
Child tables
1 table hang off specimen_container, one row per repetition.
specimen_container_contents
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — |
specimen_container_id | uuid → specimen_container | no | — | — |
position | integer | no | Order of this row within its parent, from zero. | — |
specimen_id | uuid | yes | — | — |
contents_specimen_container_id | uuid | yes | — | — |
Constraints
check (num_nonnulls(specimen_id, contents_specimen_container_id) = 1)Unique
specimen_container_id, position
References
| Columns | Target | On delete |
|---|---|---|
specimen_container_id | specimen_container | cascade |
specimen_id | specimen | no action |
contents_specimen_container_id | specimen_container | no action |
Indexes
specimen_container_contents_specimen_id_idxonspecimen_idspecimen_container_contents_contents_specimen_container_id_idxoncontents_specimen_container_id