Schedule a demo
Segment

Appointment location

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.

12fields
1required
v2.9HL7 version
ail.py
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'

Build AIL segments in Python

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

1

Fitness center room

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'
2

Nutrition services office

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'
3

Group fitness studio

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'

Learn by building

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

Frequently asked questions

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.

AIL field reference

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

#Python nameDatatypeUsageRepeatableTable
1set_id_ailSIRequiredNo-
2segment_action_codeIDOptionalNoHL70206
3location_resource_idPLOptionalYes-
4location_type_ailCWEOptionalNoHL70305
5location_groupCWEOptionalNo-
6start_date_timeDTMOptionalNo-
7start_date_time_offsetNMOptionalNo-
8start_date_time_offset_unitsCNEOptionalNo-
9durationNMOptionalNo-
10duration_unitsCNEOptionalNo-
11allow_substitution_codeCWEOptionalNoHL70279
12filler_status_codeCWEOptionalNoHL70278

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python