Schedule a demo
Segment

Clinical study phase

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.

4fields
2required
v2.9HL7 version
csp.py
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')

Build CSP segments in Python

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

1

Baseline assessment phase

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

Intervention phase

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

Follow-up phase

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

Learn by building

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

Frequently asked questions

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.

CSP field reference

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

#Python nameDatatypeUsageRepeatableTable
1study_phase_identifierCWERequiredNo-
2datetime_study_phase_beganDTMRequiredNo-
3datetime_study_phase_endedDTMOptionalNo-
4study_phase_evaluabilityCWEOptionalNoHL70588

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python