One component, every customer's API
Keep "post the patient row" in one component, send each sender's messages through its own connection, and promote the workflow with its component from dev to staging.
Several customers send ADT through one feed, and each wants the patient row posted to its own API with its own credentials. The post is the same for all of them, so it lives in one component that every workflow can reuse. The workflow, not the component, says which connection each sender uses. Then the workflow and its component go to staging together.
Source and destination
flowchart LR
A[ADT from DH-NORTH or DH-SOUTH] --> B[Component: Post the patient row]
B -->|MSH-4 DH-NORTH| C[North API profile]
B -->|MSH-4 DH-SOUTH| D[South API profile]
B -->|anyone else| E[The component's own profile, or fail]- Source: any HL7v2 trigger (MLLP, webhook) or a manual run.
- Component:
Post the patient row, one Generic REST send step, actionwrite, endpoint/adt, through its ownDefault APIprofile. - Workflow: a destination whose steps use the component, with a connection per sender on its Component step.
- Connections: Generic REST adapter profiles
North API,South APIandDefault APIin dev, and the same three in staging with staging's hosts.
What it uses
Status
Available on this release.
Steps
-
In dev, under Adapters, create
North API(base URLhttps://north-api.example.test),South API(https://south-api.example.test) andDefault API(https://default-api.example.test). -
Build the post once: in a workflow, pick the send step that posts to
Default API({ "endpoint": "/adt" }) and choose Save as component. Name itPost the patient row. It is released as1.0.0. -
In the workflow's Steps view, open the destination. Under the Component step
Post the patient row, choose Different connection per sender. -
+ Add sender: Sender (MSH-4)
DH-NORTH, ConnectionNorth API. Again forDH-SOUTHwithSouth API. Senders not listed use the component's own connection (Default API). Save and deploy. -
Send a synthetic message from each sender:
textMSH|^~\&|ADT|DH-NORTH|MEDHOOK|MEDHOOK|20260101120000||ADT^A01|MSG0001|P|2.5.1 PID|1||TESTMRN0001^^^DH^MR||TESTPATIENT^NORTH||19800101|Fand the same with
DH-SOUTHin MSH-4 andMSG0002in MSH-10. -
Promote: on the Versions tab, open ··· and choose Promote to another workspace, and pick Staging. Check What changes there, see
Post the patient rowunder Goes with it (release 1.0.0, Created there), and map each connection to staging's own. Choose Promote to Staging. -
In Staging, open Workflows → Components → Post the patient row. It says a workflow there pins release 1.0.0; choose Publish release… (it suggests
1.0.0), then deploy the workflow there: its test cases run and another admin approves.
Test it
- In dev, the DH-NORTH message reaches the north API and the DH-SOUTH one the south API. In Messages, the step
Post the patient row › Post the rowreads "Connection: North API, for sender DH-NORTH". - A message from
DH-EASTgoes throughDefault API, the component's own connection. With Senders not listed set to fail, it fails naming its MSH-4 and nothing is sent. - In Staging, the workflow's Component step points at Staging's component, and its sender table points at Staging's connections. The workflow's Environments (in the Versions tab's ··· menu) shows Staging's deployment.
- Change the component in dev and choose Promote… on its page: Staging gets a new draft of the component, and the workflow there keeps
1.0.0until you release and pick the new one.