Defines attributes for categorical (coded or enumerated) observations, such as the valid coded answers for the observation and whether multiple answers are permitted. It follows OM1 for observations with coded results (such as positive/negative or blood type) and is sent in MFN messages to synchronize valid answer sets between lab and diagnostic systems and order entry or result display systems.
from zato.hl7v2.v2_9 import OM3
from zato.hl7v2.v2_9 import CWE
om3 = OM3()
om3.sequence_number_test_observation_master_file = '1'
om3.valid_coded_answers = CWE(
identifier='OPT',
text='Optimal'
)How to construct and work with real-world OM3 segments.
Optimal and good outcomes with gentle review and priority follow-up codes
from zato.hl7v2.v2_9 import OM3
from zato.hl7v2.v2_9 import CWE
om3 = OM3()
om3.sequence_number_test_observation_master_file = '1'
om3.preferred_coding_system = CWE(
identifier='LN',
text='LOINC',
name_of_coding_system='HL70650',
)
om3.valid_coded_answers = [
CWE(
identifier='OPT',
text='Optimal',
name_of_coding_system='LN',
),
CWE(
identifier='GOOD',
text='Good',
name_of_coding_system='LN',
),
]
om3.normal_text_codes_for_categorical_observations = CWE(
identifier='OPT',
text='Optimal',
name_of_coding_system='LN'
)
om3.abnormal_text_codes_for_categorical_observations = CWE(
identifier='REV',
text='Review recommended',
name_of_coding_system='LN'
)
om3.critical_text_codes_for_categorical_observations = CWE(
identifier='PRI',
text='Priority follow-up',
name_of_coding_system='LN'
)
om3.value_type = 'CWE'Hydration and micronutrient questionnaire coded answers
from zato.hl7v2.v2_9 import OM3
from zato.hl7v2.v2_9 import CWE
om3 = OM3()
om3.sequence_number_test_observation_master_file = '2'
om3.preferred_coding_system = CWE(
identifier='NUT',
text='Nutrition score',
name_of_coding_system='ORG',
)
om3.valid_coded_answers = [
CWE(
identifier='HYD',
text='Hydrated',
name_of_coding_system='LN',
),
CWE(
identifier='BAL',
text='Balanced',
name_of_coding_system='LN',
),
]
om3.normal_text_codes_for_categorical_observations = CWE(
identifier='HYD',
text='Hydrated',
name_of_coding_system='LN'
)
om3.value_type = 'ST'Restorative sleep tiers for preventive coaching programs
from zato.hl7v2.v2_9 import OM3
from zato.hl7v2.v2_9 import CWE
om3 = OM3()
om3.sequence_number_test_observation_master_file = '3'
om3.preferred_coding_system = CWE(
identifier='SLP',
text='Sleep scale',
name_of_coding_system='ORG',
)
om3.valid_coded_answers = [
CWE(
identifier='RST',
text='Restorative',
name_of_coding_system='LN',
),
CWE(
identifier='ADE',
text='Adequate',
name_of_coding_system='LN',
),
]
om3.value_type = 'CWE'Step-by-step guides for working with HL7 v2 in Zato.
Use OM3 when the observation returns coded wellness labels instead of scalar measurements. OM2 stays on numeric chemistry markers; OM3 carries the allowed answer list and category mapping for coaching or survey style results.
Field 3 repeats with ~ between each CWE. Build a Python list of CWE values and the serializer emits the same repetition pattern.
from zato.hl7v2.v2_9 import OM3, CWE
om3 = OM3()
om3.valid_coded_answers = [
CWE(
identifier='OPT',
text='Optimal',
),
CWE(
identifier='GOOD',
text='Good',
),
]Field 4 lists codes interpreted as expected wellness outcomes. Field 5 lists codes that suggest a coaching visit or plan adjustment rather than numeric drift.
Field 7 mirrors HL70125 value types so outbound OBX segments declare compatible datatypes for categorical wellness payloads.
from zato.hl7v2.v2_9 import OM3
om3 = OM3()
om3.value_type = 'CWE'Field 2 anchors the namespace for the coded answers so receivers know whether identifiers come from LOINC, a local registry, or an organizational wellness catalog.
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 OM3 segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | sequence_number_test_observation_master_file | NM | Optional | No | - |
| 2 | preferred_coding_system | CWE | Optional | No | HL70650 |
| 3 | valid_coded_answers | CWE | Optional | Yes | HL70652 |
| 4 | normal_text_codes_for_categorical_observations | CWE | Optional | Yes | HL70654 |
| 5 | abnormal_text_codes_for_categorical_observations | CWE | Optional | Yes | HL70655 |
| 6 | critical_text_codes_for_categorical_observations | CWE | Optional | Yes | HL70656 |
| 7 | value_type | ID | Optional | No | HL70125 |
Get started with Zato and connect your systems in minutes.