Identifies a general resource (equipment, device, or other non-personnel, non-location resource) needed for the appointment, including the resource identifier, type, start time, and duration. It appears in SIU and SRM/SRR messages when specific resources like portable imaging equipment or specialized instruments must be scheduled alongside the appointment.
from zato.hl7v2.v2_9 import AIG
from zato.hl7v2.v2_9 import XCN, CWE, DTM
aig = AIG()
aig.aig_primary_key_value = '1'
aig.aig_set_id_aig = '1'
aig.aig_scheduling_activity_id = 'APT202401150900'
aig.aig_action_code = CWE(
identifier='NEW',
text='New Appointment',
name_of_coding_system='HL70287'
)
aig.aig_appointment_type = CWE(
identifier='ROUTINE',
text='Routine',
name_of_coding_system='HL70276'
)
aig.aig_appointment_reason = CWE(
identifier='PREVENTIVE',
text='Preventive Care',
name_of_coding_system='HL70464'
)How to construct and work with real-world AIG segments.
New routine preventive care visit appointment
from zato.hl7v2.v2_9 import AIG
from zato.hl7v2.v2_9 import XCN, CWE, DTM
aig = AIG()
aig.aig_primary_key_value = '1'
aig.aig_set_id_aig = '1'
aig.aig_scheduling_activity_id = 'APT202401150900'
aig.aig_action_code = CWE(
identifier='NEW',
text='New Appointment',
name_of_coding_system='HL70287'
)
aig.aig_appointment_type = CWE(
identifier='ROUTINE',
text='Routine',
name_of_coding_system='HL70276'
)
aig.aig_appointment_reason = CWE(
identifier='PREVENTIVE',
text='Preventive Care',
name_of_coding_system='HL70464'
)
aig.aig_appointment_location = CWE(
identifier='FITNESS',
text='Fitness Center',
name_of_coding_system='HL70464'
)
aig.aig_start_date_time = DTM('20240115090000')
aig.aig_end_date_time = DTM('20240115100000')
aig.aig_appointment_status = 'SCHEDULED'Follow-up nutrition counseling appointment
from zato.hl7v2.v2_9 import AIG
from zato.hl7v2.v2_9 import XCN, CWE, DTM
aig = AIG()
aig.aig_primary_key_value = '2'
aig.aig_set_id_aig = '1'
aig.aig_scheduling_activity_id = 'APT20240116140000'
aig.aig_action_code = CWE(
identifier='MODIFY',
text='Modify Appointment',
name_of_coding_system='HL70287'
)
aig.aig_appointment_type = CWE(
identifier='NUTRITION',
text='Nutrition Counseling',
name_of_coding_system='HL70276'
)
aig.aig_appointment_reason = CWE(
identifier='DIETARY',
text='Dietary Counseling',
name_of_coding_system='HL70464'
)
aig.aig_appointment_location = CWE(
identifier='NUTRITION',
text='Nutrition Services',
name_of_coding_system='HL70464'
)
aig.aig_start_date_time = DTM('20240116140000')
aig.aig_end_date_time = DTM('20240116150000')
aig.aig_appointment_status = 'CONFIRMED'New group fitness program appointment
from zato.hl7v2.v2_9 import AIG
from zato.hl7v2.v2_9 import XCN, CWE, DTM
aig = AIG()
aig.aig_primary_key_value = '3'
aig.aig_set_id_aig = '1'
aig.aig_scheduling_activity_id = 'APT20240117180000'
aig.aig_action_code = CWE(
identifier='NEW',
text='New Appointment',
name_of_coding_system='HL70287'
)
aig.aig_appointment_type = CWE(
identifier='GROUP',
text='Group Class',
name_of_coding_system='HL70276'
)
aig.aig_appointment_reason = CWE(
identifier='FITNESS',
text='Fitness Program',
name_of_coding_system='HL70464'
)
aig.aig_appointment_location = CWE(
identifier='GROUP',
text='Group Fitness Room',
name_of_coding_system='HL70464'
)
aig.aig_start_date_time = DTM('20240117180000')
aig.aig_end_date_time = DTM('20240117190000')
aig.aig_appointment_status = 'PENDING'Step-by-step guides for working with HL7 v2 in Zato.
AIG contains appointment information including general details, resource allocation, scheduling preferences, and appointment status. It's used to coordinate wellness appointments and preventive care visits.
Use HL70287 table values for appointment actions like NEW, MODIFY, or CANCEL:
aig.aig_action_code = CWE(
identifier='NEW',
text='New Appointment',
name_of_coding_system='HL70287'
)Common status values include SCHEDULED, CONFIRMED, PENDING, CANCELLED, or COMPLETED. These help track the lifecycle of wellness center appointments.
Use DTM datatype with YYYYMMDDHHMMSS format for appointment date-time values:
aig.aig_start_date_time = DTM('20240115090000')
aig.aig_end_date_time = DTM('20240115100000')AIS contains patient-specific appointment information, while AIG contains general appointment details and resource allocation. Both are used together for complete appointment management in wellness centers.
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 AIG segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | set_id_aig | SI | Required | No | - |
| 2 | segment_action_code | ID | Optional | No | HL70206 |
| 3 | resource_id | CWE | Optional | No | - |
| 4 | resource_type | CWE | Required | No | - |
| 5 | resource_group | CWE | Optional | Yes | - |
| 6 | resource_quantity | NM | Optional | No | - |
| 7 | resource_quantity_units | CNE | Optional | No | - |
| 8 | start_date_time | DTM | Optional | No | - |
| 9 | start_date_time_offset | NM | Optional | No | - |
| 10 | start_date_time_offset_units | CNE | Optional | No | - |
| 11 | duration | NM | Optional | No | - |
| 12 | duration_units | CNE | Optional | No | - |
| 13 | allow_substitution_code | CWE | Optional | No | HL70279 |
| 14 | filler_status_code | CWE | Optional | No | HL70278 |
Get started with Zato and connect your systems in minutes.