HL7 MLLP Connector
Premium
The Mule HL7 MLLP transport provides connectivity and parsing functionality for HL7 MLLP messages.
To Install this Connector
-
In Studio, click the Exchange icon in the Studio taskbar.
-
Click Login in Exchange.
-
Search for the connector and click Install.
-
Follow the prompts to install the connector.
When Studio has an update, a message displays in the lower right corner, which you can click to install the update.
Configuring the Connector Global Element
Follow the steps below to create an HL7 MLLP global element:
-
Click the Global Elements tab at the base of the canvas.
-
On the Global Mule Configuration Elements screen, click Create.
-
In the Choose Global Type wizard, expand Connector Endpoints, and then select HL7 MLLP: Configuration.
The HL7 MLLP endpoint creates a channel to receive or send messages over HL7 MLLP and allows Mule applications to send and receive messages on specified ports.
A HL7 MLLP endpoint placed at the beginning of a flow is automatically configured as an inbound endpoint while an endpoint placed in the middle or the end of a flow will act as an outbound endpoint.
The HL7 MLLP endpoint configuration is explained in this section.
-
General tab
Element Description Display Name
Name of the building block as it appears in the flow.
Host
Name of the host to which the endpoint must connect.
Port
Port number for the connection.
-
Advanced tab
Element Description Address
The complete URI location of the host to which the endpoint must connect. This parameter is mutually exclusive of the other following parameters:
* Host * Port * Endpoint Reference
Response Timeout
The timeout for a response, in milliseconds.
Exchange Patterns
Select between two possible exchange patterns: one-way allows an inbound endpoint to only receive data and does not send anything back to the originating application and an outbound endpoint only sends data; request-response allows two-way communication between the endpoint and the external application.
-
References tab
Element Description Connector Reference
References an HL7 MLLP connector configured as a global element.
Endpoint Reference
Allows you to reference an HL7 MLLP endpoint configured as a global element. This parameter is mutually exclusive with the other parameters shown below:
* Host (General tab) * Port (General tab) * Address (Advanced tab).
Global Transformers
(Request section)Add transformers that the endpoint applies to information it receives. Use the Add icon next to the Global Transformers field to select transformers to add.
Global Transformers
(Response section)Add transformers that the endpoint applies to information it receives. Use the Add icon next to the Global Transformers field to select transformers to add.
Transformers to be applied
(Request and Response sections)Use the Edit icons to edit, reorder or remove selected transformers.
Using the Connector
HL7 MLLP transport supports send and receive HL7 MLLP messages.
HL7 MLLP Namespace and Schema
When designing your application in Studio, the act of dragging the connector from the palette onto the Anypoint Studio canvas should automatically populate the XML code with the connector namespace and schema location.
-
Namespace:
http://www.mulesoft.org/schema/mule/connector
-
Schema Location:
http://www.mulesoft.org/schema/mule/connector/current/mule-connector.xsd
If you are manually coding the Mule application in Studio’s XML editor or other text editor, define the namespace and schema location in the header of your Configuration XML, inside the <mule> tag.
|
<mule xmlns:mllp="http://www.mulesoft.org/schema/mule/mllp" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/mllp http://www.mulesoft.org/schema/mule/mllp/current/mule-mllp.xsd">
<!-- put your global configuration elements and flows here -->
</mule>
Demo Mule Applications Using Connector
Example Use Case - Visual Editor
This section shows the usage of HL7 MLLP as an inbound and outbound endpoint.
Send-Receive HL7 MLLP Message
-
Drag a HTTP connector onto the canvas and configure the following parameters:
Parameter Value Connector Configuration
HTTP_Listener_Configuration
Path
/send
-
Drag an HL7 MLLP component next to the HTTP endpoint.
-
Configure HL7 MLLP with the following values in General tab:
Parameter Value Host
localhost
Port
5004
-
Drag a Set Payload component before HL7 MLLP transport and set an HL7 message:
<set-payload value="#["MSH|^~\\&|system1|W|system2|UHN|200105231927||ADT^A01^ADT_A01|22139243|P|2.4\rEVN|A01|200105231927|\rPID||9999999999^^|2216506^||Duck^Donald^^^MR.^MR.||19720227|M|||123 Foo ST.^^TORONTO^ON^M6G 3E6^CA^H^~123 Foo ST.^^TORONTO^ON^M6G 3E6^CA^M^|1811|(416)111-1111||E^ ENGLISH|S| PATIENT DID NOT INDICATE|211004554^||||||||||||\rPV1|||ZFAST TRACK^WAITING^13|E^EMERGENCY||369^6^13^U EM EMERGENCY DEPARTMENT^ZFAST TRACK WAITING^FT WAIT 13^FTWAIT13^FT WAITING^FTWAIT13|^MOUSE^MICKEY^M^^DR.^MD|||SUR||||||||I|211004554^||||||||||||||||||||W|||||200105231927|||||\rPV2||F|^R/O APPENDICIAL ABSCESS|||||||||||||||||||||||||\rIN1|1||001001| OHIP||||||||||||^^^^^|||^^^^^^M^|||||||||||||||||||||||||^^^^^^M^|||||\rACC|"]" doc:name="Set Payload"/>
-
Create another flow, and set HL7 MLLP as inbound-endpoint.
-
Configure HL7 MLLP with the following values in General tab:
Parameter Value Host
localhost
Port
5004
-
Deploy the application, open a web browser and make a request to the URL
http://localhost:8081/send
. -
You should receive the message as response:
MSH|^~\&|system1|W|system2|UHN|200105231927||ADT^A01^ADT_A01|22139243|P|2.4 EVN|A01|200105231927| PID||9999999999^^|2216506^||Duck^Donald^^^MR.^MR.||19720227|M|||123 Foo ST.^^TORONTO^ON^M6G 3E6^CA^H^~123 Foo ST.^^TORONTO^ON^M6G 3E6^CA^M^|1811|(416)111-1111||E^ ENGLISH|S| PATIENT DID NOT INDICATE|211004554^|||||||||||| PV1|||ZFAST TRACK^WAITING^13|E^EMERGENCY||369^6^13^U EM EMERGENCY DEPARTMENT^ZFAST TRACK WAITING^FT WAIT 13^FTWAIT13^FT WAITING^FTWAIT13|^MOUSE^MICKEY^M^^DR.^MD|||SUR||||||||I|211004554^||||||||||||||||||||W|||||200105231927||||| PV2||F|^R/O APPENDICIAL ABSCESS||||||||||||||||||||||||| IN1|1||001001| OHIP||||||||||||^^^^^|||^^^^^^M^|||||||||||||||||||||||||^^^^^^M^||||| ACC|
Example Use Case - XML
Paste this into Anypoint Studio to interact with the example use case application discussed in this guide.
<mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:mllp="http://www.mulesoft.org/schema/mule/mllp"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/mllp
http://www.mulesoft.org/schema/mule/mllp/current/mule-mllp.xsd
http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking
http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<flow name="mllp-outbound-endpoint">
<http:listener config-ref="HTTP_Listener_Configuration" path="/send" doc:name="HTTP"/>
<set-payload value="#["MSH|^~\\&|system1|W|system2|UHN|200105231927||ADT^A01^ADT_A01|22139243|P|2.4\rEVN|A01|200105231927|\rPID||9999999999^^|2216506^||Duck^Donald^^^MR.^MR.||19720227|M|||123 Foo ST.^^TORONTO^ON^M6G 3E6^CA^H^~123 Foo ST.^^TORONTO^ON^M6G 3E6^CA^M^|1811|(416)111-1111||E^ ENGLISH|S| PATIENT DID NOT INDICATE|211004554^||||||||||||\rPV1|||ZFAST TRACK^WAITING^13|E^EMERGENCY||369^6^13^U EM EMERGENCY DEPARTMENT^ZFAST TRACK WAITING^FT WAIT 13^FTWAIT13^FT WAITING^FTWAIT13|^MOUSE^MICKEY^M^^DR.^MD|||SUR||||||||I|211004554^||||||||||||||||||||W|||||200105231927|||||\rPV2||F|^R/O APPENDICIAL ABSCESS|||||||||||||||||||||||||\rIN1|1||001001| OHIP||||||||||||^^^^^|||^^^^^^M^|||||||||||||||||||||||||^^^^^^M^|||||\rACC|"]" doc:name="Set Payload"/>
<mllp:outbound-endpoint host="localhost" port="5004" responseTimeout="10000" exchange-pattern="request-response" doc:name="HL7 MLLP"/>
</flow>
<flow name="mllp-inbound-endpoint">
<mllp:inbound-endpoint host="localhost" port="5004" responseTimeout="10000" exchange-pattern="request-response" doc:name="HL7 MLLP"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
</flow>
</mule>
Resources
-
Access the HL7 MLLP Connector Release Notes.