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.
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'
)How to construct and work with real-world AIS segments.
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'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'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'Step-by-step guides for working with HL7 v2 in Zato.
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.
Complete list of fields in the AIS segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | set_id_ais | SI | Required | No | - |
| 2 | segment_action_code | ID | Optional | No | HL70206 |
| 3 | universal_service_identifier | CWE | Required | No | - |
| 4 | start_date_time | DTM | Optional | No | - |
| 5 | start_date_time_offset | NM | Optional | No | - |
| 6 | start_date_time_offset_units | CNE | Optional | No | - |
| 7 | duration | NM | Optional | No | - |
| 8 | duration_units | CNE | Optional | No | - |
| 9 | allow_substitution_code | CWE | Optional | No | HL70279 |
| 10 | filler_status_code | CWE | Optional | No | HL70278 |
| 11 | placer_supplemental_service_information | CWE | Optional | Yes | HL70411 |
| 12 | filler_supplemental_service_information | CWE | Optional | Yes | HL70411 |
Get started with Zato and connect your systems in minutes.