Records periods during which a patient worked or served in a combat zone. It captures the start and end dates of the combat zone deployment, the date the information was entered, and a unique identifier for the record. This segment appears in occupational health and patient administration messages to support veteran health screening, exposure tracking, and benefits eligibility determination.
from zato.hl7v2 import OH4
oh4 = OH4()
oh4.set_id = '1'
oh4.combat_zone_start_date = '20150301'
oh4.combat_zone_end_date = '20160901'How to construct and work with real-world OH4 segments.
Records a combat zone deployment with start/end dates and entry timestamp
from zato.hl7v2.v2_9 import OH4
oh4 = OH4()
oh4.set_id = '1'
oh4.combat_zone_start_date = (
'20150301'
)
oh4.combat_zone_end_date = '20160901'
oh4.entered_date = '20240601'Combat zone record with a unique identifier for administrative tracking
from zato.hl7v2.v2_9 import OH4
from zato.hl7v2.v2_9 import EI
oh4 = OH4()
oh4.set_id = '2'
oh4.combat_zone_start_date = (
'20180601'
)
oh4.combat_zone_end_date = '20190301'
oh4.entered_date = '20240701'
oh4.combat_zone_unique_identifier = EI(
entity_identifier='OH4-2024-001',
namespace_id='MAIN'
)Active combat zone service with start date only and no end date recorded
from zato.hl7v2.v2_9 import OH4
oh4 = OH4()
oh4.set_id = '3'
oh4.action_code = 'AD'
oh4.combat_zone_start_date = (
'20230901'
)
oh4.entered_date = '20240101'Step-by-step guides for working with HL7 v2 in Zato.
OH4 records periods of combat zone service for a patient. It captures start and end dates of deployment, the entry date, and a unique identifier. It supports veteran health screening, exposure tracking, and benefits eligibility workflows.
Set the start and end dates for the deployment:
from zato.hl7v2.v2_9 import OH4
oh4 = OH4()
oh4.set_id = '1'
oh4.combat_zone_start_date = (
'20150301'
)
oh4.combat_zone_end_date = '20160901'
oh4.entered_date = '20240601'The combat_zone_unique_identifier field uses the EI datatype:
from zato.hl7v2.v2_9 import OH4, EI
oh4 = OH4()
oh4.combat_zone_unique_identifier = EI(
entity_identifier='OH4-2024-001',
namespace_id='MAIN'
)Omit the end date to indicate the deployment is still active:
from zato.hl7v2.v2_9 import OH4
oh4 = OH4()
oh4.set_id = '1'
oh4.combat_zone_start_date = (
'20230901'
)
oh4.entered_date = '20240101'The action_code field accepts standard HL7 action codes:
from zato.hl7v2.v2_9 import OH4
oh4 = OH4()
oh4.set_id = '1'
oh4.action_code = 'AD'
oh4_del = OH4()
oh4_del.set_id = '2'
oh4_del.action_code = 'DE'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 OH4 segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | set_id | SI | Required | No | - |
| 2 | action_code | ID | Optional | No | - |
| 3 | combat_zone_start_date | DT | Required | No | - |
| 4 | combat_zone_end_date | DT | Optional | No | - |
| 5 | entered_date | DT | Optional | No | - |
| 6 | combat_zone_unique_identifier | EI | Optional | No | - |
Get started with Zato and connect your systems in minutes.