Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HL7 servers and HL7 listener

Tags:

hl7

We have developed a web service that suppose to get HL7 file from client and parse it into XML then push data into database.

Now my question is, what do we need to focus for this requirement. I have heard that usually EMR system send HL7 file through tcp.

How does actually HL7 servers work?

Do we need to create a HL7 listener?

Is this HIPAA compliance that HL7 should always push to server through tcp?

Can any explain it all?

like image 310
Amit Soni Avatar asked May 13 '15 07:05

Amit Soni


People also ask

What is HL7 listener?

Message player is a free tool provided by Caristix to send and receive HL7 messages. With this tool, it's possible to validate connectivity between HL7 systems, simulate a HL7 system receiving messages from a sending system or simulate a HL7 system sending messages.

What protocol does HL7 use?

HL7 messages are transferred using the TCP/IP protocol. TCP/IP data is sent as a stream of bytes. So, multiple HL7 messages may be sent as a continuous stream.


4 Answers

This is a quite broad question... answering it all would take more than just a few paragraphs.

HL7 is an hairy beast. Each integration would probably require some work. The key is to have an architecture minimizing this integration work. See this link for some insights about HL7: https://softwareengineering.stackexchange.com/questions/47855/what-issues-tend-to-arise-when-working-with-hl7-messages/48171#48171

I recommend you consider using an integration engine supporting HL7 to handle it. It would handle protocols, listeners, message acknowledgment if needed and could help to store HL7 data in a database. It would also help dealing with the standard flexibility.

HIPAA compliance is about protecting patient data. It doesn’t mandate for any specific technology. Most HL7 data exchanges are handled through MLLP (based on tcp with message framing). You can add a VPN layer over it. Other protocols can also be used but you need to make sure the system on the other side of the data communication channel supports it.

caristix.com

like image 83
jlmorin Avatar answered Oct 17 '22 08:10

jlmorin


I solved this problem using Camel (http://camel.apache.org) with the component mina2 that allows to open these kind of listeners:

mina2:tcp://hostname[:port][?options]
mina2:udp://hostname[:port][?options]
mina2:vm://hostname[:port][?options]

Camel (What exactly is Apache Camel?) is an open source Java framework that focuses on making integration easier. With Camel you can define some routes and, in this case, your route can be something similar to this:

<route>
    <from uri="mina2:tcp://localhost:2575?sync=true&amp;codec=#hl7codec" />
    <log message="[1] ********* MINA2 Message received *********" />
    <to uri="direct:HL7Process"/>
</route>

<route>
    <from uri="direct:HL7Process"/>
    <log message="[2] ********* MINA2 processing Message" />
    <bean ref="hl7Processor" method="removeUtf8Bom" />
    <process ref="hl7Processor" />
    <onException>
        <exception>org.apache.camel.RuntimeCamelException</exception>
        <exception>ca.uhn.hl7v2.HL7Exception</exception>
        <redeliveryPolicy maximumRedeliveries="0" />
        <handled>
            <constant>true</constant>
        </handled>
        <log message="*[3] ******** MINA2 sending ACKError" />
        <bean ref="hl7Processor" method="sendACKError" />
    </onException>
    <log message="[4] ********* MINA2 sending ACK" />
    <bean ref="hl7Processor" method="sendACK" />
    <log message="[4] ********* MINA2 Message processed" />
</route>

First part define a listener on tcp port to receive hl7 messages. HL7Process define what to do with the message you'll receive. hl7Processor can implement the hl7ToXML translator and the logic to store the messages on the database.

like image 29
Andrea Girardi Avatar answered Oct 17 '22 08:10

Andrea Girardi


HL7 v2.x messages are usually interchanges using MLLP (TCP with markers). All TCP servers I know can send and receive HL7 v2.x messages through MLLP. In current developments there is a tendency to use HL7 over HTTP (in the ER7 form or in it's XML form). Using SOAP services is not so usual, since SOAP (Simple Object Access Protocol) is used to exchange objects not messages.

like image 2
Pablo Pazos Avatar answered Oct 17 '22 07:10

Pablo Pazos


The general flow could be like below:

  1. Create a TCP/IP port: To listen and receive HL7 messages from the sender. E.g. TCT/IP Server point

  2. Mapping HL7 To XML: Receive and parse the HL7 message based on its type (E.g.ADT, ORM, ORU etc) and map with XML scheme of underlying database table.

  3. Make entry into database table using above XML.

  4. Return HL7 acknowledgement message back to the sender here or just after step#1.

You can do this in two ways:

  • Implement a process/program from scratch level by writing code. OR
  • Use an integration tool (like Rhapsody from OrionHealth) which generally consists of three modules : (1) IDE to create the process which is mainly drag and drop of components. (2) Engine to deploy the process and (3) Monitor using browser to see the processes

Using integration tool is much easier, faster and convenient for development and maintenance.

Hope it helps.

like image 2
Ashique Avatar answered Oct 17 '22 08:10

Ashique