Schedule a demo
Segment

Response control parameter

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.

7fields
0required
v2.9HL7 version
rcp.py
from zato.hl7v2 import RCP

rcp = RCP()
rcp.query_priority = 'I'

Build RCP segments in Python

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

1

Immediate query with limit

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'
)
2

Deferred batch response

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'
3

Subscription modification

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'

Learn by building

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

Frequently asked questions

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.

RCP field reference

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

#Python nameDatatypeUsageRepeatableTable
1query_priorityIDOptionalNoHL70091
2quantity_limited_requestCQOptionalNoHL70126
3response_modalityCNEOptionalNoHL70394
4execution_and_delivery_timeDTMOptionalNo-
5modify_indicatorIDOptionalNoHL70395
6sort_by_fieldSRTOptionalYes-
7segment_group_inclusionIDOptionalYesHL70391

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python