Schedule a demo
Segment

Clinical study schedule master

Defines the scheduled time points (events) within a clinical study phase, carrying the time point identifier, description, and the observations or activities scheduled at that time point. It follows CM1 in MFN messages and is used to synchronize study visit schedules between clinical trial management systems and participating sites.

4fields
2required
v2.9HL7 version
cm2.py
from zato.hl7v2.v2_9 import CM2
from zato.hl7v2.v2_9 import CWE

cm2 = CM2()
cm2.scheduled_time_point = CWE(
    identifier='BASE',
    text='Baseline',
    name_of_coding_system='WELLTM',
)
cm2.events_scheduled_this_time_point = CWE(identifier='FITNESS')

Build CM2 segments in Python

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

1

Baseline assessment milestone

Set id, time point CWE, description, and fitness screening event

from zato.hl7v2.v2_9 import CM2
from zato.hl7v2.v2_9 import CWE

cm2 = CM2()
cm2.set_id_cm2 = '1'
cm2.scheduled_time_point = CWE(
    identifier='BASE',
    text='Baseline assessment',
    name_of_coding_system='WELLTM',
)
cm2.description_of_time_point = 'Opening metrics visit'
cm2.events_scheduled_this_time_point = CWE(
    identifier='FITSCR',
    text='Fitness screening',
    name_of_coding_system='WELLEV',
)
2

Mid-program check-in

Optional set id omitted; nutrition coaching event at mid point

from zato.hl7v2.v2_9 import CM2
from zato.hl7v2.v2_9 import CWE

cm2 = CM2()
cm2.scheduled_time_point = CWE(
    identifier='MID',
    text='Mid-program check',
    name_of_coding_system='WELLTM',
)
cm2.description_of_time_point = 'Week six coaching visit'
cm2.events_scheduled_this_time_point = CWE(
    identifier='NUTCOACH',
    text='Nutrition coaching',
    name_of_coding_system='WELLEV',
)
3

Final evaluation window

Closing milestone with optional description left blank

from zato.hl7v2.v2_9 import CM2
from zato.hl7v2.v2_9 import CWE

cm2 = CM2()
cm2.set_id_cm2 = '3'
cm2.scheduled_time_point = CWE(
    identifier='FINAL',
    text='Final evaluation',
    name_of_coding_system='WELLTM',
)
cm2.events_scheduled_this_time_point = CWE(
    identifier='SUMMARY',
    text='Wellness summary review',
    name_of_coding_system='WELLEV',
)

Learn by building

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

Frequently asked questions

Field 1 is optional; omit it when a single CM2 row is unambiguous or when your interface specification numbers schedule lines elsewhere.

CM1 names phases of the program, while CM2 pins calendar-style milestones and the wellness activities scheduled at each point.

Use CWE so the milestone lists a coded event bundle:

from zato.hl7v2.v2_9 import CM2
from zato.hl7v2.v2_9 import CWE

cm2 = CM2()
cm2.scheduled_time_point = CWE(
    identifier='BASE',
    text='Baseline assessment',
    name_of_coding_system='WELLTM',
)
cm2.events_scheduled_this_time_point = CWE(
    identifier='FITSCR',
    text='Fitness screening',
    name_of_coding_system='WELLEV',
)

No—it is optional. Provide free text when the milestone label alone does not explain the visit, or leave it blank for compact feeds.

You may align naming for clarity, but CM2 still needs its own CWE because it represents a timed visit, not the phase master row.

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.

CM2 field reference

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

#Python nameDatatypeUsageRepeatableTable
1set_id_cm2SIOptionalNo-
2scheduled_time_pointCWERequiredNo-
3description_of_time_pointSTOptionalNo-
4events_scheduled_this_time_pointCWERequiredNo-

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python