Nav

HL7 MLLP Connector

Premium

The Mule HL7 MLLP transport provides connectivity and parsing functionality for HL7 MLLP messages.

Prerequisites

This document assumes that you are familiar with HL7, Mule, Anypoint Connectors, Anypoint Studio essentials, elements in a Mule flow, and global elements.

Compatibility

Software Version

Mule Runtime

3.7 and later

Java

7

To Install this Connector

  1. In Anypoint Studio, click the Exchange icon in the Studio taskbar.

  2. Click Login in Anypoint Exchange.

  3. Search for the connector and click Install.

  4. 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:

  1. Click the Global Elements tab at the base of the canvas.

  2. On the Global Mule Configuration Elements screen, click Create.

  3. 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

    HL7 MLLP 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

    HL7 MLLP 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: An inbound endpoint only receives data and does not send anything back to the originating application. An outbound endpoint only sends data. * request-response: Allows two-way communication between the endpoint and the external application

  • References tab

    HL7 MLLP 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.

          
       
1
2
3
4
5
6
7
8
<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>

Using the Connector in a Mavenized Mule App

If you are coding a Mavenized Mule application, this XML snippet must be included in your pom.xml file.


          
       
1
2
3
4
5
<dependency>
  <groupId>com.mulesoft.mule.transport</groupId>
  <artifactId>mule-transport-mllp</artifactId>
  <version>1.0.0</version>
</dependency>

Demo Mule Applications Using Connector

Example Use Case - Visual Editor

This section shows the usage of HL7 MLLP as an inbound and outbound endpoint.

mllp-use-case

Send-Receive HL7 MLLP Message

  1. Drag a HTTP connector onto the canvas and configure the following parameters:

    Parameter Value

    Connector Configuration

    HTTP_Listener_Configuration

    Path

    /send

  2. Drag a HL7 MLLP component next to the HTTP endpoint.

  3. Configure HL7 MLLP with the following values in General tab:

    Parameter Value

    Host

    localhost

    Port

    5004

  4. Drag a Set Payload component before HL7 MLLP transport and set a HL7 message:

    <set-payload value="#[&quot;MSH|^~\\&amp;|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|&quot;]" doc:name="Set Payload"/>
  5. Create another flow, and set HL7 MLLP as inbound-endpoint.

  6. Configure HL7 MLLP with the following values in General tab:

    Parameter Value

    Host

    localhost

    Port

    5004

  7. Deploy the application, open a web browser and make a request to the URL http://localhost:8081/send.

  8. You should receive the message as response:

    
                  
               
    1
    2
    3
    4
    5
    6
    7
    
    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.


          
       
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<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="#[&quot;MSH|^~\\&amp;|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|&quot;]" 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>