Skip to content
Recipes

ADT with a patient lookup workflow

Receive ADT over MLLP, call a reusable "Look up the patient" workflow and wait for its answer, then send the admit with the patient's id.

On this page

Many ADT feeds need the same lookup before anything is sent: find the patient by medical record number and use the id the destination knows. This recipe keeps that lookup in its own workflow, so every ADT, order or result workflow calls the same one, pinned to a release.

Source and destination

flowchart LR
    A[Registration system] -->|ADT A01 over MLLP| B[ADT workflow]
    B -->|Call workflow, wait| C[Look up the patient]
    C -->|patientId| B
    B --> D[Patient API]
  • Source: HL7v2 ADT^A01 over MLLP, ordered by sender, so each sender's messages are sent in the order they arrived.
  • Destination: a REST API that takes the admit with the patient's id.

Build it

1. The lookup workflow

PartSetting
TriggerManual
Inputs it needsmrn (text, required)
Outputs it returnspatientId (text)
StepsA REST call that searches by mrn, then a data map to { "patientId": ... }

Deploy it and release it as 1.0.0 (Versions, Releases).

2. The ADT workflow

PartSetting
TriggerMLLP, message type ADT, ordered by sender
Source transformerA data map that sets mrn from PID.3.1
Source transformerCall workflow: wait, Look up the patient, release 1.0.0, save the answer as patient
DestinationThe patient API, with a data map that reads patient.patientId

3. Try it

Send a synthetic ADT^A01 for TESTPATIENT with MRN TESTMRN-0001. The execution waits for the lookup, then continues, and its page links to the lookup's run with View sub-execution.

What to know

  • While the lookup runs, the ADT message holds no queue slot. Its sender's next message waits behind it, so order holds; the wait ends after Wait up to at the latest.
  • A lookup that fails fails the call step, so the message lands on Messages › Needs action like any other failure. Set If it fails to Continue to route it on instead.
  • Deploying a new version of the lookup changes nothing for the ADT workflow until you release it and pick the new release.

Reference