Schedule a demo
Segment

Scheduling activity information

Serves as the core segment in scheduling notification (SIU) messages sent by the filler or scheduling application to auxiliary systems. It carries the filler and placer appointment identifiers, schedule identifier, appointment reason, appointment type, duration, and the ordering provider. It appears in SIU messages (S12 through S26) to notify EHR, registration, and departmental systems of appointment bookings, cancellations, reschedules, and status changes.

26fields
3required
v2.9HL7 version
sch.py
from zato.hl7v2.v2_9 import SCH
from zato.hl7v2.v2_9 import XCN, CWE, DTM

sch = SCH()
sch.sch_primary_key_value = '1'
sch.sch_filler_appointment_id = 'APT202601150900'
sch.sch_event_reason_code = CWE(
    identifier='ROUTINE',
    text='Routine',
    name_of_coding_system='HL70276'
)
sch.sch_booking_time = DTM('20260110080000')
sch.sch_start_date_time = DTM('20260115090000')

Build SCH segments in Python

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

1

Wellness check-up appointment

Routine preventive care visit scheduling

from zato.hl7v2.v2_9 import SCH
from zato.hl7v2.v2_9 import XCN, CWE, DTM

sch = SCH()
sch.sch_primary_key_value = '1'
sch.sch_filler_appointment_id = 'APT202401150900'
sch.sch_event_reason_code = CWE(
    identifier='ROUTINE',
    text='Routine',
    name_of_coding_system='HL70276'
)
sch.sch_booking_time = DTM('20240110080000')
sch.sch_start_date_time = DTM('20240115090000')
sch.sch_end_date_time = DTM('20240115100000')
sch.sch_location = CWE(
    identifier='FITNESS',
    text='Fitness Center',
    name_of_coding_system='HL70464'
)
sch.sch_resource = XCN(
    person_identifier_type='NPI',
    id_number='1234567890',
    family_name='Johnson',
    given_name='Sarah'
)
sch.sch_resource_type = CWE(
    identifier='PATIENT',
    text='Patient',
    name_of_coding_system='HL70464'
)
2

Nutrition consultation appointment

Dietary counseling session scheduling

from zato.hl7v2.v2_9 import SCH
from zato.hl7v2.v2_9 import XCN, CWE, DTM

sch = SCH()
sch.sch_primary_key_value = '2'
sch.sch_filler_appointment_id = 'APT20240116140000'
sch.sch_event_reason_code = CWE(
    identifier='NUTRITION',
    text='Nutrition Counseling',
    name_of_coding_system='HL70276'
)
sch.sch_booking_time = DTM('20240112090000')
sch.sch_start_date_time = DTM('20240116140000')
sch.sch_end_date_time = DTM('20240116150000')
sch.sch_location = CWE(
    identifier='NUTRITION',
    text='Nutrition Services',
    name_of_coding_system='HL70464'
)
sch.sch_resource = XCN(
    person_identifier_type='NPI',
    id_number='5551112222',
    family_name='Chen',
    given_name='Lisa'
)
sch.sch_resource_type = CWE(
    identifier='DIETITIAN',
    text='Dietitian',
    name_of_coding_system='HL70464'
)
3

Group fitness class appointment

Wellness program group activity scheduling

from zato.hl7v2.v2_9 import SCH
from zato.hl7v2.v2_9 import XCN, CWE, DTM

sch = SCH()
sch.sch_primary_key_value = '3'
sch.sch_filler_appointment_id = 'APT20240117180000'
sch.sch_event_reason_code = CWE(
    identifier='GROUP',
    text='Group Class',
    name_of_coding_system='HL70276'
)
sch.sch_booking_time = DTM('20240113100000')
sch.sch_start_date_time = DTM('20240117180000')
sch.sch_end_date_time = DTM('20240117190000')
sch.sch_location = CWE(
    identifier='GROUP',
    text='Group Fitness Room',
    name_of_coding_system='HL70464'
)
sch.sch_resource = XCN(
    person_identifier_type='NPI',
    id_number='9876543210',
    family_name='Miller',
    given_name='Michael'
)
sch.sch_resource_type = CWE(
    identifier='INSTRUCTOR',
    text='Instructor',
    name_of_coding_system='HL70464'
)

Learn by building

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

Frequently asked questions

SCH contains scheduling activity information including appointment details, resource allocation, time slots, and scheduling status. It's used to coordinate wellness appointments, nutrition consultations, and preventive care visits.

Use HL70276 table values for appointment reasons like ROUTINE, NUTRITION, or GROUP:

sch.sch_event_reason_code = CWE(
    identifier='ROUTINE',
    text='Routine',
    name_of_coding_system='HL70276'
)

Use a unique identifier for each appointment. Common formats include APT followed by date and time (APT202401150900) or facility-specific appointment numbering systems.

Use DTM datatype with YYYYMMDDHHMMSS format for date-time values:

sch.sch_start_date_time = DTM('20240115090000')
sch.sch_end_date_time = DTM('20240115100000')

Use HL70464 table values like PATIENT, DIETITIAN, or INSTRUCTOR to specify the type of resource being scheduled. This helps organize wellness center staff and facility resources.

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.

SCH field reference

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

#Python nameDatatypeUsageRepeatableTable
1placer_appointment_idEIOptionalNo-
2filler_appointment_idEIOptionalNo-
3occurrence_numberNMOptionalNo-
4placer_order_group_numberEIOptionalNo-
5schedule_idCWEOptionalNo-
6event_reasonCWERequiredNo-
7appointment_reasonCWEOptionalNoHL70276
8appointment_typeCWEOptionalNoHL70277
10appointment_duration_unitsCNEOptionalNo-
12placer_contact_personXCNOptionalYes-
13placer_contact_phone_numberXTNOptionalNo-
14placer_contact_addressXADOptionalYes-
15placer_contact_locationPLOptionalNo-
16filler_contact_personXCNRequiredYes-
17filler_contact_phone_numberXTNOptionalNo-
18filler_contact_addressXADOptionalYes-
19filler_contact_locationPLOptionalNo-
20entered_by_personXCNRequiredYes-
21entered_by_phone_numberXTNOptionalYes-
22entered_by_locationPLOptionalNo-
23parent_placer_appointment_idEIOptionalNo-
24parent_filler_appointment_idEIOptionalNo-
25filler_status_codeCWEOptionalNoHL70278
26placer_order_numberEIOptionalYes-
27filler_order_numberEIOptionalYes-
28alternate_placer_order_group_numberEIPOptionalNo-

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python