Identifies the phase of the clinical trial a patient is currently in, including the phase identifier, start and end dates, and phase completion status. It appears in CRM workflows to track patient progression through study phases (such as screening, treatment, and follow-up) and is typically sent from a clinical trial management system to an EHR or regulatory reporting system.
from zato.hl7v2.v2_9 import CSP
from zato.hl7v2.v2_9 import CWE, DTM
csp = CSP()
csp.study_phase_identifier = CWE(
identifier='BASELINE',
text='Baseline Assessment'
)
csp.date_time_study_phase_began = DTM('20260115')How to construct and work with real-world CSP segments.
Initial wellness study phase
from zato.hl7v2.v2_9 import CSP
from zato.hl7v2.v2_9 import CWE, DTM
csp = CSP()
csp.study_phase_identifier = CWE(
identifier='BASELINE',
text='Baseline Assessment'
)
csp.date_time_study_phase_began = DTM('20240115')
csp.date_time_study_phase_ended = DTM('20240215')
csp.study_phase_evaluability = CWE(
identifier='C',
text='Completed'
)Active wellness intervention phase
from zato.hl7v2.v2_9 import CSP
from zato.hl7v2.v2_9 import CWE, DTM
csp = CSP()
csp.study_phase_identifier = CWE(
identifier='INTERV',
text='Intervention Phase'
)
csp.date_time_study_phase_began = DTM('20240216')
csp.date_time_study_phase_ended = DTM('20240516')
csp.study_phase_evaluability = CWE(
identifier='A',
text='Active'
)Post-intervention follow-up phase
from zato.hl7v2.v2_9 import CSP
from zato.hl7v2.v2_9 import CWE, DTM
csp = CSP()
csp.study_phase_identifier = CWE(
identifier='FOLLOWUP',
text='Follow-up Phase'
)
csp.date_time_study_phase_began = DTM('20240517')
csp.date_time_study_phase_ended = DTM('20240817')
csp.study_phase_evaluability = CWE(
identifier='P',
text='Planned'
)Step-by-step guides for working with HL7 v2 in Zato.
CSP contains clinical study phase information including phase identifiers, dates, and status for tracking wellness research study phases.
Use study_phase_identifier field with CWE datatype:
csp.study_phase_identifier = CWE(
identifier='BASELINE',
text='Baseline Assessment'
)Common status values include C (Completed), A (Active), and P (Planned). These indicate the current state of each wellness study phase.
CSR contains study registration while CSP contains phase details. Multiple CSP segments can follow a CSR to track different phases of a wellness research 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 CSP segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | study_phase_identifier | CWE | Required | No | - |
| 2 | datetime_study_phase_began | DTM | Required | No | - |
| 3 | datetime_study_phase_ended | DTM | Optional | No | - |
| 4 | study_phase_evaluability | CWE | Optional | No | HL70588 |
Get started with Zato and connect your systems in minutes.