Schedule a demo
Segment

Common order

Carries order-level control information shared across all order types, including placer and filler order numbers, order status, order control codes (new, cancel, hold, discontinue), and ordering provider. It appears in virtually every order message (ORM, OML, OMG, RDE, RDS, RGV, RAS, and others) and is the universal wrapper that pairs with a detail segment like OBR, RXO, or BPO to form a complete order. CPOE systems, EHRs, LIS, pharmacy, and radiology systems all send and receive ORC segments to coordinate order workflows.

26fields
1required
v2.9HL7 version
orc.py
from zato.hl7v2 import ORC, EI

orc = ORC()
orc.order_control = 'NW'
orc.placer_order_number = EI(entity_identifier='ORD001')

Build ORC segments in Python

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

1

Wellness screening order

New order for a preventive screening with placer, filler, and group identifiers

from zato.hl7v2.v2_9 import ORC
from zato.hl7v2.v2_9 import CWE, EI, EIP, PL, XTN

orc = ORC()
orc.order_control = 'NW'
orc.placer_order_number = EI(
    entity_identifier='SCR001',
    universal_id_type='WELLNESS',
)
orc.filler_order_number = EI(
    entity_identifier='LAB001',
    universal_id_type='GREENVALLEY',
)
orc.placer_order_group_number = EI(entity_identifier='GRP2024',)
orc.order_status = 'IP'
orc.parent_order = [
    EIP(
        placer_assigned_identifier='PO123^^^',
        filler_assigned_identifier='FI456^^^LAB',
    ),
]
orc.date_time_of_order_event = '20240415103000'
orc.enterers_location = PL(
    point_of_care='WELL',
    room='101',
    bed='A',
)
orc.call_back_phone_number = XTN(
    telephone_number='5551234567',
    telecommunication_use_code='PRN',
    telecommunication_equipment_type='PH',
)
orc.order_effective_date_time = '20240415100000'
orc.order_control_code_reason = CWE(
    identifier='WELL',
    text='Wellness screening',
    name_of_coding_system='L',
)
orc.advanced_beneficiary_notice_code = CWE(
    identifier='OPTED',
    text='Patient opted in',
    name_of_coding_system='L',
)
orc.order_status_modifier = CWE(
    identifier='ACTIVE',
    text='In progress',
    name_of_coding_system='L',
)
orc.advanced_beneficiary_notice_override_reason = CWE(
        identifier='PATIENT',
        text='Discussed options',
        name_of_coding_system='L',
    )
2

Nutrition consultation

Change order for a nutrition visit with legacy quantity text and parent order link

from zato.hl7v2.v2_9 import ORC
from zato.hl7v2.v2_9 import CWE, EI, EIP, PL, XTN

orc = ORC()
orc.order_control = 'XO'
orc.placer_order_number = EI(
    entity_identifier='NUT200',
    universal_id_type='CLINIC',
)
orc.filler_order_number = EI(
    entity_identifier='REG88',
    universal_id_type='INTAKE',
)
orc.placer_order_group_number = EI(entity_identifier='GRP-NUT-01',)
orc.order_status = 'CM'
orc.parent_order = [
    EIP(
        placer_assigned_identifier='PO200^^^',
        filler_assigned_identifier='REG88^^^',
    ),
]
orc.date_time_of_order_event = '20240510140000'
orc.enterers_location = PL(
    point_of_care='NUT',
    room='220',
    bed='B',
)
orc.call_back_phone_number = XTN(
    telephone_number='5552003000',
    telecommunication_use_code='ORN',
    telecommunication_equipment_type='PH',
)
orc.order_effective_date_time = '20240510120000'
orc.order_control_code_reason = CWE(
    identifier='CONSULT',
    text='Nutrition consult',
    name_of_coding_system='L',
)
orc.advanced_beneficiary_notice_code = CWE(
    identifier='NOTIC',
    text='Notice on file',
    name_of_coding_system='L',
)
orc.order_status_modifier = CWE(
    identifier='SCHED',
    text='Scheduled',
    name_of_coding_system='L',
)
orc.advanced_beneficiary_notice_override_reason = CWE(
        identifier='COORD',
        text='Care team',
        name_of_coding_system='L',
    )
3

Fitness assessment

Replacement order linking a new placer id to a prior parent order

from zato.hl7v2.v2_9 import ORC
from zato.hl7v2.v2_9 import CWE, EI, EIP, PL, XTN

orc = ORC()
orc.order_control = 'RP'
orc.placer_order_number = EI(
    entity_identifier='FIT501',
    universal_id_type='GYM',
)
orc.filler_order_number = EI(
    entity_identifier='SES777',
    universal_id_type='COACH',
)
orc.placer_order_group_number = EI(entity_identifier='GRP-FIT-02',)
orc.order_status = 'SC'
orc.parent_order = [
    EIP(
        placer_assigned_identifier='FIT400^^^',
        filler_assigned_identifier='SES777^^^',
    ),
]
orc.date_time_of_order_event = '20240601100000'
orc.enterers_location = PL(
    point_of_care='GYM',
    room='STUDIO',
    bed='1',
)
orc.call_back_phone_number = XTN(
    telephone_number='5554005000',
    telecommunication_use_code='PRN',
    telecommunication_equipment_type='PH',
)
orc.order_effective_date_time = '20240601090000'
orc.order_control_code_reason = CWE(
    identifier='FITNESS',
    text='Fitness assessment',
    name_of_coding_system='L',
)
orc.order_status_modifier = CWE(
    identifier='REPL',
    text='Replacement',
    name_of_coding_system='L',
)
orc.advanced_beneficiary_notice_override_reason = CWE(
        identifier='LINK',
        text='Linked visit',
        name_of_coding_system='L',
    )

Learn by building

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

Frequently asked questions

ORC is the common order segment: it carries order control codes, placer and filler identifiers, status, timing, who touched the order, and facility or contact details. It groups the administrative shell around an order before detail segments such as OBR, TQ1, or RXO.

Create or obtain an ORC segment and access its typed fields directly:

from zato.hl7v2.v2_9 import ORC
from zato.hl7v2.v2_9 import EI

orc = ORC()
orc.order_control = 'NW'
orc.placer_order_number = EI(
    entity_identifier='ORD001',
    universal_id_type='WELLNESS',
)

code = orc.order_control
placer = orc.placer_order_number

That field was withdrawn in favor of TQ1 for timing and quantity. Many interfaces leave it blank and use TQ1 (or message-specific segments) for schedule details while ORC still holds order control and identifiers.

The placer order number is assigned by the system that creates the order request. The filler order number is assigned by the system that performs or fulfills the order. Together they let two sites reference the same workflow.

Use XCN with person_identifier, family name, and given name for clinicians or staff named on the order:

from zato.hl7v2.v2_9 import XCN

provider = XCN(
    person_identifier='7003',
    family_name='COLE',
    given_name='JAMIE',
    suffix='MD',
)

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.

ORC field reference

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

#Python nameDatatypeUsageRepeatableTable
1order_controlIDRequiredNoHL70119
2placer_order_numberEIOptionalNo-
3filler_order_numberEIOptionalNo-
4placer_order_group_numberEIOptionalNo-
5order_statusIDOptionalNoHL70038
6response_flagIDOptionalNoHL70121
8parent_orderEIPOptionalYes-
9date_time_of_order_eventDTMOptionalNo-
13enterers_locationPLOptionalNo-
14call_back_phone_numberXTNOptionalNo-
15order_effective_date_timeDTMOptionalNo-
16order_control_code_reasonCWEOptionalNoHL70949
20advanced_beneficiary_notice_codeCWEOptionalNoHL70339
25order_status_modifierCWEOptionalNoHL70950
26advanced_beneficiary_notice_override_reasonCWEOptionalNoHL70552
27fillers_expected_availability_date_timeDTMOptionalNo-
28confidentiality_codeCWEOptionalNoHL70177
29order_typeCWEOptionalNoHL70482
30enterer_authorization_modeCNEOptionalNoHL70483
32advanced_beneficiary_notice_dateDTOptionalNo-
33alternate_placer_order_numberCXOptionalYes-
34order_workflow_profileCWEOptionalYesHL70934
35action_codeIDOptionalNo-
36order_status_date_rangeDROptionalNo-
37order_creation_date_timeDTMOptionalNo-
38filler_order_group_numberEIOptionalNo-

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python