Carries the master definition of a clinical study or trial, including the sponsor study identifier, study title, IRB approval date, total accrual, and contact information. It is used in MFN messages for clinical trial master file synchronization between clinical trials management systems and participating sites.
from zato.hl7v2.v2_9 import CM0
from zato.hl7v2.v2_9 import EI
cm0 = CM0()
cm0.set_id_cm0 = '1'
cm0.sponsor_study_id = EI(
entity_identifier='WELL2026',
namespace_id='ACME',
universal_id='Community Wellness',
universal_id_type='DNS',
)
cm0.title_of_study = 'Community Wellness Initiative'How to construct and work with real-world CM0 segments.
Sponsor EI, chair and study contact XCN, totals, phone, and mailing address
from zato.hl7v2.v2_9 import CM0
from zato.hl7v2.v2_9 import EI, XAD, XCN, XTN
cm0 = CM0()
cm0.set_id_cm0 = '1'
cm0.sponsor_study_id = EI(
entity_identifier='WELL2026',
namespace_id='ACME',
universal_id='Community Research',
universal_id_type='DNS',
)
cm0.alternate_study_id = EI(
entity_identifier='ALT88',
namespace_id='SPONSOR',
universal_id='Alt study',
universal_id_type='DNS',
)
cm0.title_of_study = 'Community Wellness Initiative'
cm0.chairman_of_study = [
XCN(
person_identifier='5678',
family_name='Rivera',
given_name='Maria',
suffix='MD',
),
]
cm0.last_irb_approval_date = '20260315'
cm0.total_accrual_to_date = '120'
cm0.last_accrual_date = '20260301'
cm0.contact_for_study = [
XCN(
person_identifier='9012',
family_name='Chen',
given_name='Jordan',
suffix='MD',
),
]
cm0.contacts_telephone_number = XTN(
telecommunication_use_code='PRN',
telecommunication_equipment_type='PH',
country_code='1',
area_city_code='555',
local_number='1234567',
)
cm0.contacts_address = [
XAD(
street_address='123 Main St',
city='Springfield',
state_or_province='IL',
zip_or_postal_code='62701',
country='USA',
),
]Compact row with sponsor EI, title, and enrollment counts
from zato.hl7v2.v2_9 import CM0
from zato.hl7v2.v2_9 import EI, XCN
cm0 = CM0()
cm0.set_id_cm0 = '2'
cm0.sponsor_study_id = EI(
entity_identifier='FIT2025',
namespace_id='CORP',
universal_id='Workplace Research',
universal_id_type='DNS',
)
cm0.title_of_study = 'Workplace Fitness Benchmark Study'
cm0.chairman_of_study = [
XCN(
person_identifier='3344',
family_name='Ng',
given_name='Sam',
suffix='MD',
),
]
cm0.last_irb_approval_date = '20260201'
cm0.total_accrual_to_date = '85'
cm0.last_accrual_date = '20260228'Study office phone and address with coordinator contact
from zato.hl7v2.v2_9 import CM0
from zato.hl7v2.v2_9 import EI, XAD, XCN, XTN
cm0 = CM0()
cm0.set_id_cm0 = '3'
cm0.sponsor_study_id = EI(
entity_identifier='NUT2024',
namespace_id='UNI',
universal_id='Nutrition Research',
universal_id_type='DNS',
)
cm0.alternate_study_id = EI(
entity_identifier='SEC99',
namespace_id='GRANT',
universal_id='Secondary id',
universal_id_type='DNS',
)
cm0.title_of_study = 'Nutrition Screening Effectiveness Study'
cm0.chairman_of_study = [
XCN(
person_identifier='4455',
family_name='Patel',
given_name='Ravi',
suffix='MD',
),
]
cm0.last_irb_approval_date = '20260120'
cm0.total_accrual_to_date = '200'
cm0.last_accrual_date = '20260305'
cm0.contact_for_study = [
XCN(
person_identifier='7788',
family_name='Moore',
given_name='Alex',
suffix='MD',
),
]
cm0.contacts_telephone_number = XTN(
telecommunication_use_code='WPN',
telecommunication_equipment_type='PH',
country_code='1',
area_city_code='312',
local_number='5550199',
)
cm0.contacts_address = [
XAD(
street_address='400 Lake Shore Dr',
city='Chicago',
state_or_province='IL',
zip_or_postal_code='60611',
country='USA',
),
]Step-by-step guides for working with HL7 v2 in Zato.
CM0 names the study and contacts, while CM1 and CM2 add phase and visit schedule detail when those master segments follow in the same message.
Sponsors publish a canonical EI while partner systems may register a secondary grant or registry key—both appear as EI values for cross-site matching.
Use EI with all four components split across lines:
from zato.hl7v2.v2_9 import CM0
from zato.hl7v2.v2_9 import EI
cm0 = CM0()
cm0.sponsor_study_id = EI(
entity_identifier='WELL2026',
namespace_id='ACME',
universal_id='Community Research',
universal_id_type='DNS',
)Yes—DT fields use YYYYMMDD text without a datatype constructor, matching ethics review and enrollment milestone dates for the study.
Populate them when study offices publish a dedicated recruitment line and mailing address; optional XTN and XAD repeats follow the same rules as other segments when multiple sites are listed.
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 CM0 segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | set_id_cm0 | SI | Optional | No | - |
| 2 | sponsor_study_id | EI | Required | No | - |
| 3 | alternate_study_id | EI | Optional | No | - |
| 4 | title_of_study | ST | Required | No | - |
| 5 | chairman_of_study | XCN | Optional | Yes | - |
| 6 | last_irb_approval_date | DT | Optional | No | - |
| 7 | total_accrual_to_date | NM | Optional | No | - |
| 8 | last_accrual_date | DT | Optional | No | - |
| 9 | contact_for_study | XCN | Optional | Yes | - |
| 10 | contacts_telephone_number | XTN | Optional | No | - |
| 11 | contacts_address | XAD | Optional | Yes | - |
Get started with Zato and connect your systems in minutes.