Contains supplementary attributes for observation and service definitions that apply broadly, such as orderable-at-location, effective date range, service duration, and consent indicators. It provides additional metadata beyond OM1 and is sent in MFN messages to enrich test and service catalog synchronization between ordering and performing systems.
from zato.hl7v2.v2_9 import OM7
from zato.hl7v2.v2_9 import CWE
om7 = OM7()
om7.sequence_number_test_observation_master_file = '1'
om7.universal_service_identifier = CWE(
identifier='57634-3',
text='Nutrition screening',
name_of_coding_system='LN',
)How to construct and work with real-world OM7 segments.
Full row with schedule, consent intervals, and CDM fee cross-reference
from zato.hl7v2.v2_9 import OM7
from zato.hl7v2.v2_9 import CWE, PL, XCN
om7 = OM7()
om7.sequence_number_test_observation_master_file = '1'
om7.universal_service_identifier = CWE(
identifier='57634-3',
text='Nutrition screening',
name_of_coding_system='LN',
)
om7.category_identifier = [
CWE(
identifier='LAB',
text='Laboratory',
name_of_coding_system='HL70412',
),
]
om7.category_description = 'Nutrition screening catalog'
om7.category_synonym = 'Panel~Profile'
om7.effective_test_service_start_date_time = '20260101080000'
om7.effective_test_service_end_date_time = '20261231235959'
om7.test_service_default_duration_quantity = '45'
om7.test_service_default_duration_units = CWE(
identifier='min',
text='Minute',
name_of_coding_system='HL70663',
)
om7.test_service_default_frequency = CWE(
identifier='MO',
text='Monthly',
name_of_coding_system='HL70121',
)
om7.consent_indicator = 'Y'
om7.consent_identifier = CWE(
identifier='CONSENT',
text='Nutrition screen',
name_of_coding_system='HL70413',
)
om7.consent_effective_start_date_time = '20260101000000'
om7.consent_effective_end_date_time = '20261231235959'
om7.consent_interval_quantity = '12'
om7.consent_interval_units = CWE(
identifier='mo',
text='Month',
name_of_coding_system='HL70414',
)
om7.consent_waiting_period_quantity = '0'
om7.consent_waiting_period_units = CWE(
identifier='d',
text='Day',
name_of_coding_system='HL70414',
)
om7.effective_date_time_of_change = '20260101120000'
om7.entered_by = XCN(
person_identifier='1001',
family_name='Lee',
given_name='Alex',
suffix='MD',
)
om7.orderable_at_location = [
PL(
point_of_care='GYM',
room='STUDIO1',
bed='A',
),
]
om7.formulary_status = CWE(
identifier='ACT',
text='Active',
name_of_coding_system='HL70473',
)
om7.special_order_indicator = 'N'
om7.primary_key_value_cdm = [
CWE(
identifier='FEE123',
text='Wellness fee',
name_of_coding_system='LOCAL',
),
]Minimal row highlighting service code and coach who entered the change
from zato.hl7v2.v2_9 import OM7
from zato.hl7v2.v2_9 import CWE, PL, XCN
om7 = OM7()
om7.sequence_number_test_observation_master_file = '2'
om7.universal_service_identifier = CWE(
identifier='62253-4',
text='Fitness assessment',
name_of_coding_system='LN',
)
om7.category_identifier = [
CWE(
identifier='FIT',
text='Fitness center',
name_of_coding_system='HL70412',
),
]
om7.category_description = 'Track sessions'
om7.effective_date_time_of_change = '20260201100000'
om7.entered_by = XCN(
person_identifier='2002',
family_name='Ng',
given_name='Sam',
suffix='MD',
)
om7.orderable_at_location = [
PL(
point_of_care='FITLOC',
room='Track',
bed='1',
),
]Annual wellness lab with consent waiting period and formulary flag
from zato.hl7v2.v2_9 import OM7
from zato.hl7v2.v2_9 import CWE
om7 = OM7()
om7.sequence_number_test_observation_master_file = '3'
om7.universal_service_identifier = CWE(
identifier='24325-3',
text='General wellness panel',
name_of_coding_system='LN',
)
om7.category_identifier = [
CWE(
identifier='SCR',
text='Screening',
name_of_coding_system='HL70412',
),
]
om7.category_description = 'Annual wellness'
om7.consent_waiting_period_quantity = '3'
om7.consent_waiting_period_units = CWE(
identifier='d',
text='Day',
name_of_coding_system='HL70414',
)
om7.formulary_status = CWE(
identifier='OBS',
text='On formulary',
name_of_coding_system='HL70473',
)
om7.special_order_indicator = 'N'Step-by-step guides for working with HL7 v2 in Zato.
Fields 6 through 10 carry effective start and end times, default duration, units, and cadence so screening programs can publish predictable slot lengths.
Indicators 11 through 18 describe when consent is required, how long it is valid, and any waiting period before the service can be booked.
Use CWE with LOINC for the observation service and keep sequence numbering aligned with OM1 rows:
from zato.hl7v2.v2_9 import OM7
from zato.hl7v2.v2_9 import CWE
om7 = OM7()
om7.sequence_number_test_observation_master_file = '1'
om7.universal_service_identifier = CWE(
identifier='57634-3',
text='Nutrition screening',
name_of_coding_system='LN',
)LOC describes facility details broadly, while OM7 field 21 names the specific rooms or studios where a cataloged service may be ordered for fitness visits.
Field 24 repeats CDM keys so pricing and charge descriptions stay tied to the observation service for wellness fee schedules.
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 OM7 segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | sequence_number_test_observation_master_file | NM | Required | No | - |
| 2 | universal_service_identifier | CWE | Required | No | - |
| 3 | category_identifier | CWE | Optional | Yes | HL70412 |
| 4 | category_description | TX | Optional | No | - |
| 5 | category_synonym | ST | Optional | Yes | - |
| 6 | effective_test_service_start_date_time | DTM | Optional | No | - |
| 7 | effective_test_service_end_date_time | DTM | Optional | No | - |
| 8 | test_service_default_duration_quantity | NM | Optional | No | - |
| 9 | test_service_default_duration_units | CWE | Optional | No | HL70663 |
| 10 | test_service_default_frequency | CWE | Optional | No | - |
| 11 | consent_indicator | ID | Optional | No | HL70136 |
| 12 | consent_identifier | CWE | Optional | No | HL70413 |
| 13 | consent_effective_start_date_time | DTM | Optional | No | - |
| 14 | consent_effective_end_date_time | DTM | Optional | No | - |
| 15 | consent_interval_quantity | NM | Optional | No | - |
| 16 | consent_interval_units | CWE | Optional | No | HL70414 |
| 17 | consent_waiting_period_quantity | NM | Optional | No | - |
| 18 | consent_waiting_period_units | CWE | Optional | No | HL70414 |
| 19 | effective_date_time_of_change | DTM | Optional | No | - |
| 20 | entered_by | XCN | Optional | No | - |
| 21 | orderable_at_location | PL | Optional | Yes | - |
| 22 | formulary_status | CWE | Optional | No | HL70473 |
| 23 | special_order_indicator | ID | Optional | No | HL70136 |
| 24 | primary_key_value_cdm | CWE | Optional | Yes | - |
Get started with Zato and connect your systems in minutes.