Schedule a demo
Segment

Numeric observation

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.

10fields
0required
v2.9HL7 version
om2.py
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_range

Build OM2 segments in Python

How to construct and work with real-world OM2 segments.

1

Cholesterol reference interval

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'
2

Glucose screening bands

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'
3

Vitamin D reporting scale

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'

Learn by building

Step-by-step guides for working with HL7 v2 in Zato.

Frequently asked questions

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.

OM2 field reference

Complete list of fields in the OM2 segment, HL7 v2.9.

#Python nameDatatypeUsageRepeatableTable
1sequence_number_test_observation_master_fileNMOptionalNo-
2units_of_measureCWEOptionalNoHL70648
3range_of_decimal_precisionNMOptionalYes-
4corresponding_si_units_of_measureCWEOptionalNoHL70649
5si_conversion_factorTXOptionalNo-
6reference_normal_range_for_ordinal_and_continuous_observationsRFROptionalYes-
7critical_range_for_ordinal_and_continuous_observationsRFROptionalYes-
8absolute_range_for_ordinal_and_continuous_observationsRFROptionalNo-
9delta_check_criteriaDLTOptionalYes-
10minimum_meaningful_incrementsNMOptionalNo-

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python