Schedule a demo
Segment

Appointment information

Identifies the service or procedure scheduled for an appointment, including the universal service identifier, start date and time, duration, and filler status code. It appears in SIU and SRM/SRR messages and is required when a universal service identifier was provided in the appointment request. It tells receiving systems what clinical service the appointment is for.

12fields
2required
v2.9HL7 version
ais.py
from zato.hl7v2.v2_9 import AIS
from zato.hl7v2.v2_9 import XCN, CWE, DTM

ais = AIS()
ais.ais_primary_key_value = '1'
ais.ais_set_id_ais = '1'
ais.ais_scheduling_activity_id = 'APT202401150900'
ais.ais_patient_id = XCN(
    person_identifier_type='MRN',
    id_number='12345',
    family_name='Smith',
    given_name='John'
)
ais.ais_appointment_type = CWE(
    identifier='ROUTINE',
    text='Routine',
    name_of_coding_system='HL70276'
)
ais.ais_appointment_reason = CWE(
    identifier='PREVENTIVE',
    text='Preventive Care',
    name_of_coding_system='HL70464'
)

Build AIS segments in Python

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

1

Wellness check-up appointment

Routine preventive care visit appointment information

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

ais = AIS()
ais.ais_primary_key_value = '1'
ais.ais_set_id_ais = '1'
ais.ais_scheduling_activity_id = 'APT202401150900'
ais.ais_patient_id = XCN(
    person_identifier_type='MRN',
    id_number='12345',
    family_name='Smith',
    given_name='John'
)
ais.ais_appointment_type = CWE(
    identifier='ROUTINE',
    text='Routine',
    name_of_coding_system='HL70276'
)
ais.ais_appointment_reason = CWE(
    identifier='PREVENTIVE',
    text='Preventive Care',
    name_of_coding_system='HL70464'
)
ais.ais_appointment_location = CWE(
    identifier='FITNESS',
    text='Fitness Center',
    name_of_coding_system='HL70464'
)
ais.ais_start_date_time = DTM('20240115090000')
ais.ais_confirm_appointment = 'Y'
2

Nutrition consultation appointment

Dietary counseling session appointment information

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

ais = AIS()
ais.ais_primary_key_value = '2'
ais.ais_set_id_ais = '1'
ais.ais_scheduling_activity_id = 'APT20240116140000'
ais.ais_patient_id = XCN(
    person_identifier_type='MRN',
    id_number='67890',
    family_name='Johnson',
    given_name='Maria'
)
ais.ais_appointment_type = CWE(
    identifier='NUTRITION',
    text='Nutrition Counseling',
    name_of_coding_system='HL70276'
)
ais.ais_appointment_reason = CWE(
    identifier='DIETARY',
    text='Dietary Counseling',
    name_of_coding_system='HL70464'
)
ais.ais_appointment_location = CWE(
    identifier='NUTRITION',
    text='Nutrition Services',
    name_of_coding_system='HL70464'
)
ais.ais_start_date_time = DTM('20240116140000')
ais.ais_confirm_appointment = 'Y'
3

Group fitness class appointment

Wellness program group activity appointment information

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

ais = AIS()
ais.ais_primary_key_value = '3'
ais.ais_set_id_ais = '1'
ais.ais_scheduling_activity_id = 'APT20240117180000'
ais.ais_patient_id = XCN(
    person_identifier_type='MRN',
    id_number='54321',
    family_name='Brown',
    given_name='Robert'
)
ais.ais_appointment_type = CWE(
    identifier='GROUP',
    text='Group Class',
    name_of_coding_system='HL70276'
)
ais.ais_appointment_reason = CWE(
    identifier='FITNESS',
    text='Fitness Program',
    name_of_coding_system='HL70464'
)
ais.ais_appointment_location = CWE(
    identifier='GROUP',
    text='Group Fitness Room',
    name_of_coding_system='HL70464'
)
ais.ais_start_date_time = DTM('20240117180000')
ais.ais_confirm_appointment = 'Y'

Learn by building

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

Frequently asked questions

AIS contains appointment information including patient details, appointment types, scheduling preferences, and special needs. It's used to coordinate wellness appointments and preventive care visits.

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

ais.ais_appointment_type = CWE(
    identifier='ROUTINE',
    text='Routine',
    name_of_coding_system='HL70276'
)

Use MRN (Medical Record Number) for internal patient identification. For external systems, you can also use other identifiers like patient account numbers or external IDs.

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

ais.ais_start_date_time = DTM('20240115090000')

Y indicates the appointment is confirmed, while N means it's tentative or pending confirmation. This helps track appointment status in wellness center scheduling systems.

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.

AIS field reference

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

#Python nameDatatypeUsageRepeatableTable
1set_id_aisSIRequiredNo-
2segment_action_codeIDOptionalNoHL70206
3universal_service_identifierCWERequiredNo-
4start_date_timeDTMOptionalNo-
5start_date_time_offsetNMOptionalNo-
6start_date_time_offset_unitsCNEOptionalNo-
7durationNMOptionalNo-
8duration_unitsCNEOptionalNo-
9allow_substitution_codeCWEOptionalNoHL70279
10filler_status_codeCWEOptionalNoHL70278
11placer_supplemental_service_informationCWEOptionalYesHL70411
12filler_supplemental_service_informationCWEOptionalYesHL70411

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python