Controls how the responding system delivers query results in HL7 v2 conformance-based messaging. It specifies the query execution priority, a quantity limit on returned records, the response modality (real-time, batch, or deferred), an execution deadline, and a modify indicator for subscription-based queries. RCP appears in QBP request messages alongside QPD to shape the response behavior.
from zato.hl7v2 import RCP
rcp = RCP()
rcp.query_priority = 'I'How to construct and work with real-world RCP segments.
Requests immediate execution returning at most 10 records in real-time
from zato.hl7v2.v2_9 import RCP
from zato.hl7v2.v2_9 import CQ, CNE
rcp = RCP()
rcp.query_priority = 'I'
rcp.quantity_limited_request = CQ(
quantity='10',
units='RD'
)
rcp.response_modality = CNE(
identifier='R',
text='Real time',
name_of_coding_system='HL70394'
)Schedules a batch response with a delivery deadline
from zato.hl7v2.v2_9 import RCP
from zato.hl7v2.v2_9 import CQ, CNE
rcp = RCP()
rcp.query_priority = 'D'
rcp.quantity_limited_request = CQ(
quantity='50',
units='RD'
)
rcp.response_modality = CNE(
identifier='B',
text='Batch',
name_of_coding_system='HL70394'
)
rcp.execution_and_delivery_time = '20240601180000'Modifies an existing subscription query with a new record limit
from zato.hl7v2.v2_9 import RCP
from zato.hl7v2.v2_9 import CQ, CNE
rcp = RCP()
rcp.query_priority = 'I'
rcp.quantity_limited_request = CQ(
quantity='25',
units='RD'
)
rcp.response_modality = CNE(
identifier='R',
text='Real time',
name_of_coding_system='HL70394'
)
rcp.modify_indicator = 'M'Step-by-step guides for working with HL7 v2 in Zato.
RCP controls how a responding system delivers query results. It sets the execution priority, limits the number of returned records, chooses real-time vs. batch delivery, and optionally sets a deadline or modify flag for subscription queries.
The field uses HL7 table 0091. Common values are I (immediate), D (deferred), and S (stat/urgent):
from zato.hl7v2.v2_9 import RCP
rcp = RCP()
# I = Immediate
rcp.query_priority = 'I'
# D = Deferred
rcp.query_priority = 'D'Use the quantity_limited_request field with the CQ datatype:
from zato.hl7v2.v2_9 import RCP, CQ
rcp = RCP()
rcp.quantity_limited_request = CQ(
quantity='10',
units='RD'
)The field uses HL7 table 0394 with values like R (real-time), B (batch), and T (bolus/one-time dump):
from zato.hl7v2.v2_9 import RCP, CNE
rcp = RCP()
rcp.response_modality = CNE(
identifier='R',
text='Real time',
name_of_coding_system='HL70394'
)It uses HL7 table 0395 and indicates whether a subscription query is being modified (M) or created new (N). It only applies to subscription-based query patterns:
from zato.hl7v2.v2_9 import RCP
rcp = RCP()
rcp.query_priority = 'I'
rcp.modify_indicator = 'M'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 RCP segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | query_priority | ID | Optional | No | HL70091 |
| 2 | quantity_limited_request | CQ | Optional | No | HL70126 |
| 3 | response_modality | CNE | Optional | No | HL70394 |
| 4 | execution_and_delivery_time | DTM | Optional | No | - |
| 5 | modify_indicator | ID | Optional | No | HL70395 |
| 6 | sort_by_field | SRT | Optional | Yes | - |
| 7 | segment_group_inclusion | ID | Optional | Yes | HL70391 |
Get started with Zato and connect your systems in minutes.