Schedule a demo
Message type

Automated time intervals for reporting clinical trials

Reports automated time intervals for clinical trial monitoring. The CSR segment identifies the study and CSP/CSS segments carry phase and schedule details.

28segments
11required
6groups
v2.9HL7 version
csu-c09.py
# Zato
from zato.hl7v2 import HL7Message

# An incoming message ..
raw = 'MSH|^~\&|SENDER|FAC|RCV|DEST|20260701||' \
      'CSU^C09^CSU_C09|MSG001|P|2.9\r' \
      'PID|1||MRN-10045||SMITH^JOHN||19850315|M\r' \
      'PV1|1|I|MED^201^A'

# .. parsed into a Python object ..
msg = HL7Message.parse(raw)

# .. whose fields we can now access.
name = msg.pid.patient_name
dob = msg.pid.date_time_of_birth
patient_class = msg.pv1.patient_class
location = msg.pv1.assigned_patient_location

Build and parse CSU^C09 messages in Python

How to construct, send, receive, and extract fields from real-world CSU^C09 messages.

1

Parse an incoming CSU^C09 message

Demonstrates receiving and extracting key fields from a automated time intervals for reporting clinical trials transaction

# Zato
from zato.hl7v2 import HL7Message

# An incoming message ..
raw = 'MSH|^~\&|SENDER|FAC|RCV|DEST|20260701||' \
      'CSU^C09^CSU_C09|MSG001|P|2.9\r' \
      'PID|1||MRN-10045||SMITH^JOHN||19850315|M\r' \
      'PV1|1|I|MED^201^A'

# .. parsed into a Python object ..
msg = HL7Message.parse(raw)

# .. whose fields we can now access.
name = msg.pid.patient_name
dob = msg.pid.date_time_of_birth
patient_class = msg.pv1.patient_class
location = msg.pv1.assigned_patient_location

Learn by building

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

Frequently asked questions

Use the HL7v2 message parser to extract the typed structure. The parsed message gives you direct access to every segment and field by name.

from zato.hl7v2 import HL7Message

raw = 'MSH|^~\&|SENDER|FACILITY|RECEIVER|DEST|20260401120000||CSU^C09^CSU_C09|MSG00001|P|2.9'
msg = HL7Message.parse(raw)

name = msg.pid.patient_name
dob = msg.pid.date_time_of_birth

Beyond the mandatory MSH header, the required segments are: PID, PV1, CSR, ORC, OBR, TQ1, OBX, ORC. Optional segments provide additional detail when available.

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.

CSU^C09 segment composition

Segments that make up the CSU^C09 message, in order. Groups are shown with their child segments.

#SegmentUsageRepeatsDescriptionGroup
1MSHRequiredNoMessage header-
2ARVOptionalYesAccess restriction-
3SFTOptionalYesSoftware segment-
4UACOptionalNoUser authentication credential-
5PIDRequiredNoPatient identificationPATIENT
6PD1OptionalNoPatient additional demographicPATIENT
7PRTOptionalYesParticipation informationPATIENT
8ARVOptionalYesAccess restrictionPATIENT
9NTEOptionalYesNotes and commentsPATIENT
10PV1RequiredNoPatient visitPATIENT
11PV2OptionalNoPatient visit - additional infoPATIENT
12PRTOptionalYesParticipation informationPATIENT
13CSRRequiredNoClinical study registrationPATIENT
14CSPOptionalNoClinical study phasePATIENT
15CSSOptionalNoClinical study data schedule segmentSTUDY_SCHEDULE
16ORCRequiredNoCommon orderSTUDY_OBSERVATION_ORDER
17PRTOptionalYesParticipation informationSTUDY_OBSERVATION_ORDER
18OBRRequiredNoObservation requestSTUDY_SCHEDULE
19PRTOptionalYesParticipation informationSTUDY_SCHEDULE
20TQ1RequiredNoTiming / quantityTIMING_QTY
21TQ2OptionalYesTiming / quantity relationshipTIMING_QTY
22OBXRequiredNoObservation resultSTUDY_SCHEDULE
23PRTOptionalYesParticipation informationSTUDY_SCHEDULE
24ORCRequiredNoCommon orderCOMMON_ORDER
25PRTOptionalYesParticipation informationCOMMON_ORDER
26RXARequiredNoPharmacy / treatment administrationRX_ADMIN
27RXRRequiredNoPharmacy / treatment routeRX_ADMIN
28PRTOptionalYesParticipation informationRX_ADMIN

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python