Identifies the location (room, suite, or clinic) where the appointment will take place, carrying the location code, location type, start date and time, and duration. It appears in SIU and SRM/SRR messages and is used by scheduling and room management systems to reserve and track facility resources for appointments.
from zato.hl7v2.v2_9 import AIL
from zato.hl7v2.v2_9 import XON, CWE
ail = AIL()
ail.ail_primary_key_value = '1'
ail.ail_set_id_ail = '1'
ail.ail_scheduling_activity_id = 'APT202401150900'
ail.ail_location_resource_id = XON(
organization_name='Active Life Wellness',
id_number='FIT001'
)
ail.ail_location_type = CWE(
identifier='ROOM',
text='Room',
name_of_coding_system='HL70464'
)
ail.ail_location_description = 'Fitness Center Room 101'How to construct and work with real-world AIL segments.
Wellness check-up appointment location
from zato.hl7v2.v2_9 import AIL
from zato.hl7v2.v2_9 import XON, CWE
ail = AIL()
ail.ail_primary_key_value = '1'
ail.ail_set_id_ail = '1'
ail.ail_scheduling_activity_id = 'APT202401150900'
ail.ail_location_resource_id = XON(
organization_name='Active Life Wellness',
id_number='FIT001'
)
ail.ail_location_type = CWE(
identifier='ROOM',
text='Room',
name_of_coding_system='HL70464'
)
ail.ail_location_description = 'Fitness Center Room 101'Dietary counseling appointment location
from zato.hl7v2.v2_9 import AIL
from zato.hl7v2.v2_9 import XON, CWE
ail = AIL()
ail.ail_primary_key_value = '2'
ail.ail_set_id_ail = '1'
ail.ail_scheduling_activity_id = 'APT20240116140000'
ail.ail_location_resource_id = XON(
organization_name='River Valley Wellness',
id_number='NUT002'
)
ail.ail_location_type = CWE(
identifier='OFFICE',
text='Office',
name_of_coding_system='HL70464'
)
ail.ail_location_description = 'Nutrition Services Office 203'Wellness program group activity location
from zato.hl7v2.v2_9 import AIL
from zato.hl7v2.v2_9 import XON, CWE
ail = AIL()
ail.ail_primary_key_value = '3'
ail.ail_set_id_ail = '1'
ail.ail_scheduling_activity_id = 'APT20240117180000'
ail.ail_location_resource_id = XON(
organization_name='Harmony Health Center',
id_number='GRP003'
)
ail.ail_location_type = CWE(
identifier='STUDIO',
text='Studio',
name_of_coding_system='HL70464'
)
ail.ail_location_description = 'Group Fitness Studio A'Step-by-step guides for working with HL7 v2 in Zato.
AIL contains appointment location information including facility details, room numbers, building information, and location codes. It's used to specify where wellness appointments and preventive care visits will take place.
Use HL70464 table values for location types like ROOM, OFFICE, or STUDIO:
ail.ail_location_type = CWE(
identifier='ROOM',
text='Room',
name_of_coding_system='HL70464'
)Include specific room numbers, building names, floor information, or descriptive details that help patients and staff locate the appointment venue within the wellness center facility.
Use XON datatype to include both the organization name and a unique location identifier. This helps map appointments to specific rooms or facilities within the wellness center.
AIL provides location details while AIP provides location preference information. Both segments work together to specify where appointments should take place and any location-related requirements.
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 AIL segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | set_id_ail | SI | Required | No | - |
| 2 | segment_action_code | ID | Optional | No | HL70206 |
| 3 | location_resource_id | PL | Optional | Yes | - |
| 4 | location_type_ail | CWE | Optional | No | HL70305 |
| 5 | location_group | CWE | Optional | No | - |
| 6 | start_date_time | DTM | Optional | No | - |
| 7 | start_date_time_offset | NM | Optional | No | - |
| 8 | start_date_time_offset_units | CNE | Optional | No | - |
| 9 | duration | NM | Optional | No | - |
| 10 | duration_units | CNE | Optional | No | - |
| 11 | allow_substitution_code | CWE | Optional | No | HL70279 |
| 12 | filler_status_code | CWE | Optional | No | HL70278 |
Get started with Zato and connect your systems in minutes.