Carries specimen-related requirements for an observation, including specimen type, collection volume, container description, additive, and specimen handling instructions. It follows OM1 for lab tests and is sent in MFN messages so that collection sites and ordering systems know what specimen is required for each test.
from zato.hl7v2.v2_9 import OM4
from zato.hl7v2.v2_9 import CWE
om4 = OM4()
om4.sequence_number_test_observation_master_file = '1'
om4.specimen = CWE(
identifier='SER',
text='Serum'
)How to construct and work with real-world OM4 segments.
Lipid panel draw with gel additive, volumes, and cold transport note
from zato.hl7v2.v2_9 import OM4
from zato.hl7v2.v2_9 import CQ, CWE
om4 = OM4()
om4.sequence_number_test_observation_master_file = '1'
om4.derived_specimen = 'N'
om4.container_description = [
'SST serum separator tube',
]
om4.container_volume = ['5']
om4.container_units = [
CWE(
identifier='mL',
name_of_coding_system='UCUM',
),
]
om4.specimen = CWE(
identifier='SER',
text='Serum',
name_of_coding_system='HL70660',
)
om4.additive = CWE(
identifier='GEL',
text='Gel separator',
name_of_coding_system='HL70371',
)
om4.preparation = 'Let clot 30 min upright'
om4.special_handling_requirements = 'Ship at room temp'
om4.normal_collection_volume = CQ(
cq_1='5',
cq_2=CWE(
identifier='mL',
name_of_coding_system='UCUM',
),
)
om4.minimum_collection_volume = CQ(
cq_1='3',
cq_2=CWE(
identifier='mL',
name_of_coding_system='UCUM',
),
)
om4.specimen_requirements = 'Overnight fasting preferred'
om4.specimen_priorities = ['R']
om4.specimen_retention_time = CQ(
cq_1='48',
cq_2=CWE(
identifier='h',
name_of_coding_system='UCUM',
),
)
om4.specimen_handling_code = [
CWE(
identifier='CF',
text='Cold transport',
name_of_coding_system='HL70376',
),
]
om4.specimen_preference = 'P'
om4.preferred_specimen_attribture_sequence_id = '1'
om4.taxonomic_classification_code = [
CWE(
identifier='HOM',
text='Homo sapiens',
name_of_coding_system='LN',
),
]Venous draw for exercise physiology markers with routine priority
from zato.hl7v2.v2_9 import OM4
from zato.hl7v2.v2_9 import CQ, CWE
om4 = OM4()
om4.sequence_number_test_observation_master_file = '2'
om4.container_description = [
'Lavender EDTA tube',
]
om4.specimen = CWE(
identifier='BLD',
text='Whole blood',
name_of_coding_system='HL70660',
)
om4.additive = CWE(
identifier='EDTA',
text='K2 EDTA',
name_of_coding_system='HL70371',
)
om4.preparation = 'Mix gently eight times'
om4.special_handling_requirements = 'Deliver within six hours'
om4.normal_collection_volume = CQ(
cq_1='8',
cq_2=CWE(
identifier='mL',
name_of_coding_system='UCUM',
),
)
om4.specimen_requirements = 'Well-hydrated draw'
om4.specimen_priorities = ['R']
om4.specimen_handling_code = [
CWE(
identifier='RT',
text='Room temp',
name_of_coding_system='HL70376',
),
]
om4.specimen_preference = 'R'
om4.preferred_specimen_attribture_sequence_id = '2'First-morning collection cup with preservative and stability window
from zato.hl7v2.v2_9 import OM4
from zato.hl7v2.v2_9 import CQ, CWE
om4 = OM4()
om4.sequence_number_test_observation_master_file = '3'
om4.container_description = ['Sterile cup']
om4.specimen = CWE(
identifier='URN',
text='Urine',
name_of_coding_system='HL70660',
)
om4.additive = CWE(
identifier='BOR',
text='Boric acid',
name_of_coding_system='HL70371',
)
om4.preparation = 'Label before filling'
om4.special_handling_requirements = 'Keep cool after collection'
om4.normal_collection_volume = CQ(
cq_1='120',
cq_2=CWE(
identifier='mL',
name_of_coding_system='UCUM',
),
)
om4.specimen_requirements = 'Morning void preferred'
om4.specimen_retention_time = CQ(
cq_1='72',
cq_2=CWE(
identifier='h',
name_of_coding_system='UCUM',
),
)
om4.specimen_handling_code = [
CWE(
identifier='CF',
text='Cold transport',
name_of_coding_system='HL70376',
),
]
om4.specimen_preference = 'P'Step-by-step guides for working with HL7 v2 in Zato.
OM4 belongs to the observation master file and states what a catalog test expects for collection. SPM appears on patient messages with the actual draw that occurred for a wellness encounter.
Fields 10, 11, and 14 use CQ: quantity in cq_1 and UCUM units in cq_2 as a CWE.
from zato.hl7v2.v2_9 import OM4
from zato.hl7v2.v2_9 import CQ, CWE
om4 = OM4()
om4.normal_collection_volume = CQ(
cq_1='5',
cq_2=CWE(
identifier='mL',
name_of_coding_system='UCUM',
),
)Field 16 references table HL70920 so interfaces know whether the row describes the preferred tube, an acceptable alternate, or another site-specific ranking for preventive panels.
Field 15 repeats when multiple HL70376 instructions apply, such as room-temperature transport plus a short cold stabilization step before accessioning.
OM4 defines the ideal collection recipe while SAC can carry container level measurements on outbound specimen messages. Together they align master data with operational tracking for wellness programs.
Zato connects to any system that speaks HL7v2 over MLLP or FHIR over REST. This includes Epic, Cerner, Meditech, Allscripts, and other EHR platforms.
Yes, Zato has built-in MLLP support for sending and receiving HL7v2 messages. MLLP channels handle the framing protocol automatically.
Zato supports HL7 v2.9, which is backward compatible with earlier versions including v2.3, v2.5, and v2.7. Standard segments and datatypes are available as typed Python classes.
Yes. Zato handles both HL7v2 and FHIR natively, so you can parse v2 messages and build FHIR resources with IG-specific extensions in the same service. Typed Python classes are available for both protocols, including extensions from US Core, UK Core, Da Vinci, and other Implementation Guides.
Complete list of fields in the OM4 segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | sequence_number_test_observation_master_file | NM | Optional | No | - |
| 2 | derived_specimen | ID | Optional | No | HL70170 |
| 3 | container_description | TX | Optional | Yes | - |
| 4 | container_volume | NM | Optional | Yes | - |
| 5 | container_units | CWE | Optional | Yes | HL70658 |
| 6 | specimen | CWE | Optional | No | HL70660 |
| 7 | additive | CWE | Optional | No | HL70371 |
| 8 | preparation | TX | Optional | No | - |
| 9 | special_handling_requirements | TX | Optional | No | - |
| 10 | normal_collection_volume | CQ | Optional | No | - |
| 11 | minimum_collection_volume | CQ | Optional | No | - |
| 12 | specimen_requirements | TX | Optional | No | - |
| 13 | specimen_priorities | ID | Optional | Yes | HL70027 |
| 14 | specimen_retention_time | CQ | Optional | No | - |
| 15 | specimen_handling_code | CWE | Optional | Yes | HL70376 |
| 16 | specimen_preference | ID | Optional | No | HL70920 |
| 17 | preferred_specimen_attribture_sequence_id | NM | Optional | No | - |
| 18 | taxonomic_classification_code | CWE | Optional | Yes | - |
Get started with Zato and connect your systems in minutes.