Contact Free trial Login

HL7 MLLP Connector

Premium

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

Read through this user guide to understand how to set up and configure a basic flow using the connector.

Prerequisites

This document assumes that you are familiar with HL7 MLLP, Design Center, Mule, Anypoint connectors, Anypoint Studio, elements in a Mule flow, and global elements.

What’s New in this Connector

First Mule 4 release.

To Connect in Design Center

  1. In Design Center, click a trigger such as an HTTP Listener or Scheduler and configure the trigger.

    Because the connector has only two operations to listen (source) and to send, you can choose which one to use.

  2. For the Listener (Source), click the trigger and select Mule HL7 MLLP.

  3. Click Edit to configure the connector.

    The basic non-secured way is to just input the host and the port within the connection tab.

    Design Center General Tab

    You also can create a TLS configuration, you can set the timeout configuration and the buffer configuration.

If your app is running at mllp-rnnf.us-e1.cloudhub.io, you can send HL7 messages over MLLP to your Mule app to mule-worker-mllp-rnnf.us-e1.cloudhub.io

Send Operation Configuration

For the Send operation the procedure is the same, the only extra thing is that you can set the Local Address Settings tab within the connector config with a different host, port, and delimiter that specifies the character used to separate messages.

Design Center TLS Tab

You can also set the send or receive buffer size.

Design Center Send and Receive Buffer Size

Connect in Anypoint Studio 7

You can use this connector in Anypoint Studio by first downloading it from Exchange and configuring it as needed.

Install Connector in Studio

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

  2. Click Login in Anypoint Exchange.

  3. Search for this connector and click Install.

  4. Follow the prompts to install this connector.

When Studio has an update, a message displays in the lower right corner, which you can click to install the update.

Configure in Studio

  1. Drag and drop the connector to the Studio Canvas.

  2. For general settings, complete these fields:

    Studio General tab fields
    • Delimiter: The standard HL7 delimiter value that separates MLLP messages is a hexadecimal 0x1C character also known as FS. Applications in some clinics use a different delimiter value, which you can set in this field. The standard value in the HL7 MLLP connector is shown as 001C.

    • Host: Sets the socket`s host address.

    • Port: Sets the socket`s port.

      For an advanced connection, complete these fields:

    • Reuse address: Whether to reuse the configured socket or fail when trying to bind to the socket.

    • Send TCP With No Delay: Whether or not to transmit data immediately, or collect data for greater efficiency before sending.

    • Linger: How long in milliseconds that the socket takes to close so any remaining data transmits correctly.

    • Keep alive: Whether to close open socket connections that are unused for a long period and with an unavailable connection.

    • Fail on unresolved host: Whether the socket should fail during its creation if the host set on the endpoint cannot be resolved.

In the TLS tab you can configure a new TLS configuration, its presence implies the use of SSLServerSocket instead of plain TCP.

Studio Global Element Properties - TLS Tab

You can also set the send or receive buffer size.

Studio Send and Receive Buffer Size

Example - Read and Write Message

MLLP Demo Flow in Studio 7

MLLP Demo Flow in Studio 7

MLLP Demo Flow in Studio 7

This demo application provides a complete workflow to sequentially invoke read and write HL7 messages over the MLLP protocol.

Prerequisites

  • Java 8

  • Anypoint Studio 7.x

  • Mule Runtime 4.x.x EE or higher

About the Flows

  • writer-flow: Sends the given message through the socket to be received by the reader-flow.

  • reader-flow: Receive a MLLP message, and log the message.

The app, index, styles, app-config, rest-service, order-controller, and write-order are used to load static resources related to the user interface.

Example Use Case XML

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core" 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:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="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/core
http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd">
	<mllp:mllp-listener-config name="Mule_HL7_MLLP_Listener_config"
	doc:name="Mule HL7 MLLP Listener config">
		<mllp:mllp-listener-connection host="localhost" port="40000" />
	</mllp:mllp-listener-config>
	<mllp:request-config name="Mule_HL7_MLLP_Request_config"
	doc:name="Mule HL7 MLLP Request config">
		<mllp:mllp-requester-connection host="localhost" port="40000" >
			<mllp:local-address-settings port="49999" host="localhost" />
		</mllp:mllp-requester-connection>
	</mllp:request-config>
	<http:listener-config name="HTTP_Listener_config"
	doc:name="HTTP Listener config">
		<http:listener-connection host="localhost" port="8081" />
	</http:listener-config>
	<flow name="reader-flow">
		<mllp:mllp-listener doc:name="Mllp listener"
		config-ref="Mule_HL7_MLLP_Mllp_listener_config"/>
		<logger level="INFO" doc:name="Logger" message="#[payload]"/>
	</flow>
	<flow name="writer-flow">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		path="/send"/>
		<mllp:send doc:name="Send" config-ref="Mule_HL7_MLLP_Request_config">
		</mllp:send>
	</flow>
	<flow name="index">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		path="/"/>
		<parse-template doc:name="Parse Template"
		 location="ui-demo/index.html"/>
	</flow>
	<flow name="styles">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		path="/styles"/>
		<parse-template doc:name="Parse Template"
		location="ui-demo/styles/styles.css"/>
	</flow>
	<flow name="app-config">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/app-config"/>
		<parse-template doc:name="Parse Template"
		location="ui-demo/app-config.js"/>
	</flow>
	<flow name="app">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		path="/app"/>
		<parse-template doc:name="Parse Template"
		location="ui-demo/app.js"/>
	</flow>
	<flow name="rest-service">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		path="services/restService"/>
		<parse-template doc:name="Parse Template"
		location="ui-demo/services/restService.js"/>
	</flow>
	<flow name="order-controller">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		path="order/order.controller"/>
		<parse-template doc:name="Parse Template"
		location="ui-demo/order/order.controller.js"/>
	</flow>
	<flow name="write-order">
		<http:listener doc:name="Listener"
		config-ref="HTTP_Listener_config"
		path="/order/writeOrder"/>
		<parse-template doc:name="Parse Template"
		location="ui-demo/order/writeOrder.html"/>
	</flow>
</mule>

See Also

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.