HL7 ADT_A17 Swap Patients

HL7 message structure ADT_A17 groups and segments from HL7 v2.5.1 Hide structure

These are the generated groups and segments for the version selected at the top of the page. The article explains the workflow, and this panel follows the chosen HL7 version.

Message Structure

SegmentNameRequiredRepeatable
Message Header Yes No
Software Segment No Yes
Event Type Yes No
Patient Identification Yes No
Patient Additional Demographic No No
Patient Visit Yes No
Patient Visit - Additional Information No No
Disability No Yes
Observation/Result No Yes
Patient Identification Yes No
Patient Additional Demographic No No
Patient Visit Yes No
Patient Visit - Additional Information No No
Disability No Yes
Observation/Result No Yes

ADT_A17 is used when two patients exchange beds. It is a rare event, but it is not complicated in concept: the message carries patient and visit data for both patients so receivers can update both locations as one coordinated change.

This is the kind of ADT event that deserves cautious handling. If only one side of the swap is applied, one patient can appear in two beds and the other can vanish from the board.

A small A17 example

MSH|^~\&|BEDBOARD|CITYHOSP|EHR|CITYHOSP|20260715131500||ADT^A17^ADT_A17|ADT170001|P|2.5.1 EVN|A17|20260715131400 PID|1||123456^^^CITYHOSP^MR||Smith^Jane^Anne^^Ms^^L||19800314|F PV1|1|I|WARD1^102^1^CITYHOSP^^BED|||WARD1^101^1^CITYHOSP^^BED||||||||||||VN000345^^^CITYHOSP^VN PID|2||555222^^^CITYHOSP^MR||Brown^Alex^^^Mr^^L||19751209|M PV1|1|I|WARD1^101^1^CITYHOSP^^BED|||WARD1^102^1^CITYHOSP^^BED||||||||||||VN000346^^^CITYHOSP^VN

What systems do with it

The sender is usually the PAS/EHR or bed management system. Receivers update bed boards, dietary routing, nurse station lists, medication delivery context, and any downstream application that keys active patient context from visit location.

Because the message represents one swap, receivers should process the two patient groups as a unit where possible. If one patient update succeeds and the other fails, the interface needs a clear operational alert.

How to read the structure

After MSH and EVN, the structure repeats the patient visit pattern twice: PID, optional PD1, PV1, optional PV2, and optional supporting segments. The first patient group and second patient group are both required in the local structure.

Implementation traps

Do not split A17 into two unrelated A02 updates unless your integration design intentionally does that and can recover cleanly. The safety problem is not syntax; it is preserving the pairwise nature of the bed exchange.

Reference notes

The HL7 v2+ ADT_A17 page describes A17 as an event where two patients exchange beds and the patient ID and visit data repeat for the two patients changing places.