Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

HL7 Integration using Mule Healthcare Toolkit: Part 4

DZone's Guide to

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.

· Integration Zone ·
Free Resource

SnapLogic is the leading self-service enterprise-grade integration platform. Download the 2018 GartnerMagic Quadrant for Enterprise iPaaS or play around on the platform, risk free, for 30 days.

This 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:

  1. 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.
  2. 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.
  3. 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]Image titleImage title

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:Image title

b. Configure the Expression component:

Image title

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:Image title

Image title

e. Start the flow in debugger mode:

Image title


f. flowVars.Trigger is set to A01, as shown below:

Image title

g. After passing the A01 HL7 Delete Segment component, the EVN segment is deleted.

Image title

Image title

h. Passing the Expression component; the value of the PID.5.1 field is changed to 'Mule:'

Image title

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:Image title
b. Configure the A08 Transformer:Image titlec. 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.Image title
f. After passing the A08 Transformer, the value of the MSH.5.1 field is changed to ‘Mule:’ Image title
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:Image title
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:Image title
f. After passing the Non A01 and A08 HL7 Append Segment, the segment OBX will be added to the inbound message:Image title
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/

Download A Buyer's Guide to Application and Data Integration, your one-stop-shop for research, checklists, and explanations for an application and data integration solution.

Topics:
mule esb ,integration ,hl7 ,mule

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}