Schedule a demo
Segment

Clinical study registration

Contains patient registration information for a clinical study, communicating when a patient is registered, pre-registered, or removed from a clinical trial, along with identifiers for the study sponsor and patient eligibility status. It is used in CRM (Clinical Trial Message) workflows between EHRs and clinical trial management systems to keep enrollment records synchronized.

17fields
4required
v2.9HL7 version
csr.py
from zato.hl7v2.v2_9 import CSR
from zato.hl7v2.v2_9 import EI, CWE, XCN

csr = CSR()
sponsor_id = EI(entity_identifier='WELL2024001')
csr.sponsor_study_id = sponsor_id
alternate_id = EI(entity_identifier='FITNESS-TRIAL-01')
csr.alternate_study_id = alternate_id

Build CSR segments in Python

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

1

Nutrition study enrollment

Registers a participant in a nutrition wellness study with sponsor ID, patient ID, and authorizing provider

from zato.hl7v2.v2_9 import CSR
from zato.hl7v2.v2_9 import CX, EI, XCN

csr = CSR()
csr.sponsor_study_id = EI(
    entity_identifier='NUT2024001',
    namespace_id='Nutrition Research Lab'
)
csr.sponsor_patient_id = CX(id_number='SP-10042')
csr.date_time_of_patient_study_registration = '20240610090000'
csr.study_authorizing_provider = XCN(
    person_identifier='D500',
    family_name='Torres',
    given_name='Angela'
)
2

Fitness research with alternate IDs

Enrolls a participant in a fitness research program with alternate study and patient identifiers

from zato.hl7v2.v2_9 import CSR
from zato.hl7v2.v2_9 import CWE, CX, EI, XCN

csr = CSR()
csr.sponsor_study_id = EI(
    entity_identifier='FIT2024010',
    namespace_id='Wellness Sciences'
)
csr.alternate_study_id = EI(
    entity_identifier='CARDIO-B',
    namespace_id='National Fitness Registry'
)
csr.institution_registering_the_patient = CWE(
    identifier='GH',
    text='General Hospital',
    name_of_coding_system='HL70589'
)
csr.sponsor_patient_id = CX(id_number='SP-20187')
csr.alternate_patient_id_csr = CX(id_number='ALT-20187')
csr.date_time_of_patient_study_registration = '20240715100000'
csr.person_performing_study_registration = XCN(
    person_identifier='R100',
    family_name='Park',
    given_name='Emily'
)
csr.study_authorizing_provider = XCN(
    person_identifier='D600',
    family_name='Nakamura',
    given_name='Kenji'
)
3

Sleep quality study with randomization

Registers a participant in a sleep quality study including consent date and study randomization

from zato.hl7v2.v2_9 import CSR
from zato.hl7v2.v2_9 import CWE, CX, EI, XCN

csr = CSR()
csr.sponsor_study_id = EI(
    entity_identifier='SLP2024005',
    namespace_id='Sleep Research Center'
)
csr.institution_registering_the_patient = CWE(
    identifier='SWC',
    text='Sleep Wellness Clinic',
    name_of_coding_system='HL70589'
)
csr.sponsor_patient_id = CX(id_number='SP-30295')
csr.date_time_of_patient_study_registration = '20240820140000'
csr.person_performing_study_registration = XCN(
    person_identifier='R200',
    family_name='Lee',
    given_name='David'
)
csr.study_authorizing_provider = XCN(
    person_identifier='D700',
    family_name='Okafor',
    given_name='Grace'
)
csr.date_time_patient_study_consent_signed = '20240818100000'
csr.study_randomization_datetime = '20240825080000'
csr.randomized_study_arm = CWE(
    identifier='ARM-A',
    text='Morning Light Exposure',
    name_of_coding_system='HL70591'
)

Learn by building

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

Frequently asked questions

CSR contains clinical study registration information including study identifiers, sponsor details, and patient registration for wellness research studies.

Use sponsor_study_id and alternate_study_id fields:

csr.sponsor_study_id = EI(entity_identifier='WELL2024001')
csr.alternate_study_id = EI(entity_identifier='FITNESS-TRIAL-01')

CSR contains study registration while CSP contains study phase information. Both work together to track patient participation in wellness research.

Use patient_study_eligibility_status to indicate if the patient is eligible, enrolled, or withdrawn from the wellness study.

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.

CSR field reference

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

#Python nameDatatypeUsageRepeatableTable
1sponsor_study_idEIRequiredNo-
2alternate_study_idEIOptionalNo-
3institution_registering_the_patientCWEOptionalNoHL70589
4sponsor_patient_idCXRequiredNo-
5alternate_patient_id_csrCXOptionalNo-
6date_time_of_patient_study_registrationDTMRequiredNo-
7person_performing_study_registrationXCNOptionalYes-
8study_authorizing_providerXCNRequiredYes-
9date_time_patient_study_consent_signedDTMOptionalNo-
10patient_study_eligibility_statusCWEOptionalNoHL70590
11study_randomization_datetimeDTMOptionalNo-
12randomized_study_armCWEOptionalNoHL70591
13stratum_for_study_randomizationCWEOptionalNoHL70592
14patient_evaluability_statusCWEOptionalNoHL70593
15date_time_ended_studyDTMOptionalNo-
16reason_ended_studyCWEOptionalNoHL70594
17action_codeIDOptionalNo-

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python