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.
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_idHow to construct and work with real-world CSR segments.
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'
)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'
)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'
)Step-by-step guides for working with HL7 v2 in Zato.
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.
Complete list of fields in the CSR segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | sponsor_study_id | EI | Required | No | - |
| 2 | alternate_study_id | EI | Optional | No | - |
| 3 | institution_registering_the_patient | CWE | Optional | No | HL70589 |
| 4 | sponsor_patient_id | CX | Required | No | - |
| 5 | alternate_patient_id_csr | CX | Optional | No | - |
| 6 | date_time_of_patient_study_registration | DTM | Required | No | - |
| 7 | person_performing_study_registration | XCN | Optional | Yes | - |
| 8 | study_authorizing_provider | XCN | Required | Yes | - |
| 9 | date_time_patient_study_consent_signed | DTM | Optional | No | - |
| 10 | patient_study_eligibility_status | CWE | Optional | No | HL70590 |
| 11 | study_randomization_datetime | DTM | Optional | No | - |
| 12 | randomized_study_arm | CWE | Optional | No | HL70591 |
| 13 | stratum_for_study_randomization | CWE | Optional | No | HL70592 |
| 14 | patient_evaluability_status | CWE | Optional | No | HL70593 |
| 15 | date_time_ended_study | DTM | Optional | No | - |
| 16 | reason_ended_study | CWE | Optional | No | HL70594 |
| 17 | action_code | ID | Optional | No | - |
Get started with Zato and connect your systems in minutes.