Defines attributes specific to numeric (quantitative) observations, including the units of measure, reference ranges (normal, critical, absolute), and the range of decimal precision. It follows OM1 for numerically valued tests and is sent in MFN messages from lab systems to ordering and result-viewing systems so they can properly display and flag abnormal numeric results.
from zato.hl7v2.v2_9 import OM2
from zato.hl7v2.v2_9 import CWE, RFR
om2 = OM2()
om2.sequence_number_test_observation_master_file = '1'
units = CWE(identifier='mg/dL', text='mg/dL')
om2.units_of_measure = units
normal_range = RFR(rfr_1='50^200')
om2.reference_normal_range_for_ordinal_and_continuous_observations = normal_rangeHow to construct and work with real-world OM2 segments.
UCUM units, SI pair, and a fasting wellness reference band
from zato.hl7v2.v2_9 import OM2
from zato.hl7v2.v2_9 import CWE, RFR
om2 = OM2()
om2.sequence_number_test_observation_master_file = '1'
om2.units_of_measure = CWE(
identifier='mg/dL',
text='mg/dL',
name_of_coding_system='UCUM',
)
om2.range_of_decimal_precision = ['2']
om2.corresponding_si_units_of_measure = CWE(
identifier='mmol/L',
text='mmol/L',
name_of_coding_system='UCUM',
)
om2.si_conversion_factor = '0.0259'
om2.reference_normal_range_for_ordinal_and_continuous_observations = [
RFR(rfr_1='50^200'),
]
om2.minimum_meaningful_increments = '0.5'Normal reference plus follow-up and absolute spans with delta checks
from zato.hl7v2.v2_9 import OM2
from zato.hl7v2.v2_9 import CWE, DLT, RFR
om2 = OM2()
om2.sequence_number_test_observation_master_file = '2'
om2.units_of_measure = CWE(
identifier='mmol/L',
text='mmol/L',
name_of_coding_system='UCUM',
)
om2.reference_normal_range_for_ordinal_and_continuous_observations = [
RFR(
rfr_1='3.9^5.6',
rfr_2='F',
rfr_3='20^65',
rfr_4='H',
rfr_5='A',
rfr_7='fasting',
),
]
om2.critical_range_for_ordinal_and_continuous_observations = [
RFR(rfr_1='3.0^15.0'),
]
om2.absolute_range_for_ordinal_and_continuous_observations = RFR(rfr_1='1.0^30.0')
om2.delta_check_criteria = [
DLT(
dlt_2='5',
dlt_3='PCT',
dlt_4='30',
),
]
om2.minimum_meaningful_increments = '0.1'Seasonal wellness target interval with SI pairing and precision
from zato.hl7v2.v2_9 import OM2
from zato.hl7v2.v2_9 import CWE, RFR
om2 = OM2()
om2.sequence_number_test_observation_master_file = '3'
om2.units_of_measure = CWE(
identifier='ng/mL',
text='ng/mL',
name_of_coding_system='UCUM',
)
om2.range_of_decimal_precision = ['1']
om2.corresponding_si_units_of_measure = CWE(
identifier='nmol/L',
text='nmol/L',
name_of_coding_system='UCUM',
)
om2.si_conversion_factor = '2.496'
om2.reference_normal_range_for_ordinal_and_continuous_observations = [
RFR(rfr_1='30^80'),
]
om2.minimum_meaningful_increments = '0.1'Step-by-step guides for working with HL7 v2 in Zato.
OM1 names the catalog test while OM2 carries numeric reporting rules such as UCUM units, reference bands, and delta checks. Load OM2 rows that share the same sequence key as their OM1 sibling.
Use rfr_1 through rfr_7 strings on RFR. The first slot often carries the numeric span; later slots can hold sex, age window, or wellness context text when your site populates them.
from zato.hl7v2.v2_9 import OM2, RFR
om2 = OM2()
om2.reference_normal_range_for_ordinal_and_continuous_observations = [
RFR(
rfr_1='50^200',
rfr_2='M',
),
]Field 5 holds the multiplier that converts stored results into the SI units given in field 4. Document the factor your LIS uses for preventive chemistry panels.
Field 9 repeats DLT entries. Populate dlt_2 for the threshold, dlt_3 for the change type such as PCT, and dlt_4 for the lookback window in days when your engine expects it.
from zato.hl7v2.v2_9 import OM2, DLT
om2 = OM2()
om2.delta_check_criteria = [
DLT(
dlt_2='5',
dlt_3='PCT',
dlt_4='30',
),
]Result interfaces use OM2 to format numeric OBX values with the correct precision, units, and reference commentary for wellness reporting without recomputing ranges in every outbound message.
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 OM2 segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | sequence_number_test_observation_master_file | NM | Optional | No | - |
| 2 | units_of_measure | CWE | Optional | No | HL70648 |
| 3 | range_of_decimal_precision | NM | Optional | Yes | - |
| 4 | corresponding_si_units_of_measure | CWE | Optional | No | HL70649 |
| 5 | si_conversion_factor | TX | Optional | No | - |
| 6 | reference_normal_range_for_ordinal_and_continuous_observations | RFR | Optional | Yes | - |
| 7 | critical_range_for_ordinal_and_continuous_observations | RFR | Optional | Yes | - |
| 8 | absolute_range_for_ordinal_and_continuous_observations | RFR | Optional | No | - |
| 9 | delta_check_criteria | DLT | Optional | Yes | - |
| 10 | minimum_meaningful_increments | NM | Optional | No | - |
Get started with Zato and connect your systems in minutes.