Recipes
ADT to FHIR Patient and Encounter
Turn HL7v2 ADT admit, register and update events into FHIR R4 Patient and Encounter resources on a FHIR server.
A healthcare organization's registration system sends an ADT message every time a patient is admitted, registered or updated. This recipe writes those events to a FHIR R4 server: each ADT message becomes a Patient and an Encounter, written in one transaction.
Source and destination
The sending system connects to the engine's MLLP listener. The engine answers with an ACK, converts the message and POSTs one transaction Bundle to the FHIR server.
flowchart LR
A[Registration system] -->|ADT over MLLP| B[MLLP trigger]
B --> C[HL7v2 to FHIR]
C -->|transaction Bundle| D[FHIR R4 server]- Source: HL7v2 ADT^A01, ADT^A04 and ADT^A08 over MLLP.
- Destination: any FHIR R4 server a FHIR REST profile can reach, or the Medplum server in the Compose stack.
- Result: one Patient (from PID) and one Encounter (from PV1) per message. The template turns on conditional create, so a repeated message does not create a duplicate Patient or Encounter.
What it uses
- Template HL7v2 over MLLP → FHIR R4 (POST) (
hl7v2-mllp-to-fhir-r4). See the Workflow catalog. - Template HL7v2 over MLLP → FHIR R4 (POST) (
hl7v2-mllp-to-fhir-r4), for a feed that carries several message types (ADT, SIU, ORU) to one FHIR server. The manual-run starter HL7v2 ADT → FHIR Patient Sync is retired; its address opens this template. - The MLLP trigger and its ACKs.
- The HL7v2 to FHIR transform.
- Adapter
fhir-restormedplum.
Status
Available on this release. The guide HL7v2 over MLLP to FHIR R4 builds it end to end, test included.
Know the limits before you go live:
- With conditional create, the first message about a patient or visit wins: a later ADT^A08 update is not applied. Set
conditionalUpdateon the transform step to apply updates instead. See Understand the conditional create. - Merges and identifier changes (ADT^A34, A40, A47 and similar) are not applied. The step warns.
- The engine drops the SSN unless you set
includeSsn. - The template keeps Z-segments on the Patient as a raw extension. They can carry PHI, so set
zSegmentstoskipunless the destination needs them.