I'm looking to build an HL7 listener in C#. We are already parsing messages that are sent to us as text files and importing them into the database, so I have an understanding of what HL7 messages are and how to parse them.
My main question regarding the listener. Is the listener simply a TCP listener? If so, could I put together a basic TCP listener that gets the message and parses the results, importing them into our database?
My second questions is regarding the ACK. My understanding of this is it's simply a message sent back to the sender after receiving a message. It's simply another HL7 message designated as a response message.
Am I correct in my understanding? Also if anyone has any additional info or pointers I would appreciate any help.
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.
HL7 messages are sent via a variety of TCP/IP transports, some of which include: Lower Layer Protocol (LLP) File Transfer Protocol (FTP) Simple Object Access Protocol (SOAP)
Yes it's just a simple TCP listener.
To acknowledge a message you have to return an MSH message which should look somehting like this:
<11> this means a byte represented in a decimal value. this is VT from the ascii table.
<11>MSH|^~\&|KS||LAB||20040915080800||ACK|59793000678|P|2.2|59793000678<13>
MSA|AA|59793000678<13>
<28><13>
You should probably look at: http://nhapi.sourceforge.net/home.php
Several items:
Disclosure: I'm co-chair of the HL7 Infrastructure and Message (InM) committee, CTO at Corepoint, and Chief Architect of the Cloverleaf integration engine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With