Mapping HL7v2 SIU^S12 to FHIR Appointment: Field Reference
New appointment booking. Maps SCH/AIL into a FHIR Appointment (status, type, start/end, location).
Field-by-field mapping
Every rule in the Interoperall template is shown below: the source field, the FHIR target path it populates, and the transform applied. This table is generated from the live template, so it matches exactly what runs when you fork it.
| Source | FHIR path | Transform |
|---|---|---|
| (literal "booked") | Appointment.status | Copied directly |
| SCH-1.1 | Appointment.identifier[0].value | Copied directly |
| SCH-7.1 | Appointment.serviceType[0].coding[0].code | Copied directly |
| SCH-7.2 | Appointment.serviceType[0].coding[0].display | Copied directly |
| SCH-8 | Appointment.minutesDuration | Copied directly |
| SCH-11.4 | Appointment.start | Date reformat %Y%m%d%H%M → %Y-%m-%dT%H:%M:00 |
| SCH-11.5 | Appointment.end | Date reformat %Y%m%d%H%M → %Y-%m-%dT%H:%M:00 |
| AIL-3.2 | Appointment.participant[0].actor.display | Copied directly |
| (literal "accepted") | Appointment.participant[0].status | Copied directly |
Source HL7v2 message
The sample input this template is designed to handle:
MSH|^~\&|SCHED|HOSP|REC|REC|20240116090000||SIU^S12|MSGCTRL5555|P|2.5.1
SCH|APPT123^SCHED||||||CONSULT^Consultation|30|min|^^30^202402011400^202402011430|||||DOE^JOHN^A
PID|1||MRN12345^^^EPIC^MR||DOE^JOHN^A||19800101|M
PV1|1|O|CLINIC^A^1
RGS|1|A
AIL|1||CLINIC^Cardiology Clinic^DEPTCommon gotchas
- HL7v2 identifiers (PID-3) carry an assigning authority and ID type in later components. FHIR needs an `identifier.system` (a URI/OID), so you must map your local authority to a real, stable system URI, not just copy the code.
- HL7v2 dates are `YYYYMMDD` (or `YYYYMMDDHHMMSS`); FHIR `date`/`dateTime` need ISO-8601 (`YYYY-MM-DD`). A date-format transform is required or validation will reject the value.
- Coded fields (gender, status, units) almost always need a value-set lookup. HL7v2 `M`/`F` is not the same token as FHIR `male`/`female`, and an unmapped code should fall back rather than pass through raw.
- Repeating segments (multiple OBX, multiple PID-11 address repetitions) map to FHIR arrays. A single template rule targets one array index, so duplicate the rules (or iterate) for additional repetitions.
Frequently asked questions
How do I map an HL7v2 SIU^S12 message to a FHIR Appointment?
Parse the SIU^S12 message into segments, then map each relevant field to its FHIR path: identifiers and coded values need value-set lookups, and HL7v2 date fields need reformatting to ISO-8601. The field table on this page lists every source-to-target rule used by the Interoperall template, which you can fork and run in the Mapping Builder.
Which segments does the SIU^S12 → Appointment mapping read?
It reads the SCH and AIL segments. Other segments in the message are left unmapped unless you add rules for them.
Is this Appointment mapping US Core compliant?
It produces a base FHIR R4 Appointment. Validate the output to confirm it meets whichever profile your downstream system requires.
Can I customize this mapping?
Yes. Fork the template in the Mapping Builder to get an editable copy, then add, remove, or re-target rules, for example to handle repeating segments, extra identifiers, or a different value set.