How to: Receive one ADT/A17 message, send two A02's in DTL

Primary tabs

Ensemble beginner here. One of the downstream applications requires to send two A02 messages instead of one A17. We do it easily in Cloverleaf - either in translation or TCL. How do I create 2 target messages out of one source message in DTL? 


In the routing engine, you can transform and send one message to as many transformations and targets you want to.

If the order of the A02s is not important, you can simply  create a routing rule with two Send actions for the same target; the first Send is configured with a DTL that creates an A02 for the first transfer, and the second a DTL for the second transfer.

Many receiving systems will have an issue with this, though, as both patients temporarily end up in the same bed. While it might be fun for the patient, the transfers may be rejected. In some cases you may need to perform 3 transfers: Transfer patient 1 to a dummy bed, transfer patient 2 to patient 1's prior location, transfer patient 1 to patient 2's prior location. In this scenario, it would probably be prudent to use a BPL to enforce synchronous behavior, guaranteeing that the transfers happen in a specific order.

Hey Jeffrey, In routing engine if you say Yes to - Force Sync Send this could be avoided, isn't it?

Yes Neerav, that will avoid it, but at the possible expense of both performance and robustness. If one process called from the routing rule doesn't complete, nothing else does either.

In a BPL you have more granular control over sync/async works.

On that note, I had one question.

ForceSyncSend is true.

Let's say I have 2 transform & send in one rule. If first transform is successful and sends to first target and that target returns a false in a response status property as 0 - Can we stop all next sends to not do anything depending on the response or should the first target throw an exception instead of sending 0 in a response property. 

While I haven't tried it, I'm fairly confident that this would be handled via ReplyCodeActions in the router.

Thank you Jeffrey. The receiving system doesn't care - they just need to know where to find the patient. So as long as the location is updated for both patients they are good. We've been sending this through Cloverleaf for many years now, but we are switching to Ensemble and converting our interfaces.