HL7 Integration using Mule Healthcare Toolkit: Part 4
Continuing from Part 3 of this series, this tutorial walks you through installation of Mule Healthcare Toolkit, which facilitates integration with HL7 healthcare systems.
Join the DZone community and get the full member experience.
Join For FreeThis tutorial continues from Part 3.
In Part 4 of this series, one HL7 integration solution will be covered end to end. Three scenarios will be covered, and depending on the value of MSH.9 field, routing logic and transformations will be applied accordingly. The assumption is that you have already gone through the exercises covered in Part 1, 2, and 3.
Routing will be done depending on the below logic:
- If MSH.9 is ADT^A01, then delete the HL7 segment from inbound message. Change the value of the PID.5.1 field to ‘Mule’ and then send the outbound message on the HL7 client on the TCP/IP socket.
- If MSH.9 is ADT^A08, then change the value of MSH.5.1 field to ‘Mule’ and then send the outbound message on the HL7 client on the TCP/IP socket.
- If the value of MSH.9 is other than ADT^A01 or ADT^A08, add an OBX segment with some fields values. [OBX|Mule|ESB|Blood Test|5.5]
Now, test scenario 1: If MSH.9 is ADT^A01, then delete the HL7 segment from the inbound message. Change the value of the PID.5.1 field to ‘Mule’ and then send the outbound message on the HL7 client on the TCP/IP socket.
a. Configure the A01 HL7 Delete Segment:
b. Configure the Expression component:
c. Configure the logger and HL7 MLLP component.
d. The message type is ADT^A01 and the message is sent from the HL7 client on MLLP layer:
e. Start the flow in debugger mode:
f. flowVars.Trigger is set to A01, as shown below:
g. After passing the A01 HL7 Delete Segment component, the EVN segment is deleted.
h. Passing the Expression component; the value of the PID.5.1 field is changed to 'Mule:'
i. Then you can see the above payload in the console and the outbound message will be sent to the HL7 client on the TCP/IP socket on the configured port.
Now, test scenario 2: If MSH.9 is ADT^A08, then change the value of the MSH.5.1 field to ‘Mule’ and send the outbound message on the HL7 client on the TCP/IP socket.
a. Now set the message type to ADT^A08:
b. Configure the A08 Transformer:c. Then, configure the logger and HL7 MLLP component.
d. The message type is ADT^A08 and message is sent from the HL7 client on MLLP layer.
e. The message will be routed to the second flow where the condition of ADT^A08 is met.
f. After passing the A08 Transformer, the value of the MSH.5.1 field is changed to ‘Mule:’
g. Then you can see the above payload in the console and the outbound message will be sent to the HL7 client on the TCP/IP socket on the configured port.
Now, test scenario 3: If the value of MSH.9 is other than ADT^A01 or ADT^A08, add the OBX segment with some fields values. [OBX|Mule|ESB|Blood Test|5.5]
a. Now set the message type to ADT^A07.
b. Configure the Non A01 & A08 HL7 Append Segment:
c. Configure the logger and HL7 MLLP component.
d. The message type is ADT^A07 and message is sent from the HL7 client on the MLLP layer.
e. The message will be routed to the third flow where the condition of ADT^A07 is met:
f. After passing the Non A01 and A08 HL7 Append Segment, the segment OBX will be added to the inbound message:
g. Now you can see the above payload in the console and the outbound message will be sent to the HL7 client on the TCP/IP socket on the configured port.
For more details please refer; https://docs.mulesoft.com/healthcare-toolkit/v/3.0/
Opinions expressed by DZone contributors are their own.
Trending
-
5 Key Concepts for MQTT Broker in Sparkplug Specification
-
Writing a Vector Database in a Week in Rust
-
What Is React? A Complete Guide
-
Building a Flask Web Application With Docker: A Step-by-Step Guide
Comments