Subject: HL7 development in C# .Net
Posted By: rashtikar Post Date: 4/21/2008 7:17:19 AM
Hi,
I want to develop an application to send and receive the HL7 message using C# .Net technology?
Is there any tool available for this which will expose the API to send and receive the messages?
Has anyone worked on the the same and what will be the approch to follow?

Thanks,
Rahul
Reply By: dparsons Reply Date: 4/21/2008 7:36:45 AM
I am unfamiliar of any API's that allow you to do this.  When I had to deal with HL7 files I wrote a simple parser that striped out all of the clincial data and then sent it to our SQL Server and related it to the patient.  I did the same thing (in reverse order of course) when I had to generate an HL7 file to be sent off to the lab.  

In so far as sending and recieving messages, I had a secure VPN tunnel set up between our office and the lab.  When they created files that needed added to our system, they had a process that would access the tunnel then drop all of the files into a directory on a server.  I had a windows service that watched this directory and was also responsible for parsing the data.  We had a similar process for sending them our files.

hth.

===========================================================
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
===========================================================
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
===========================================================
Reply By: samjudson Reply Date: 4/21/2008 7:38:03 AM
Well that depends greatly on which version of HL7 you are talking about.

I'm going to assume you mean HL7 v3 - this version is just XML, so obviously you can use .Net to create and edit HL7.

What transport mechanisms are you using? If you are using web endpoints then you can obviously use the HttpWebRequest classes to send and receive the XML.

If you have specific problems or I've assumed something you are not doing then please elaborate.

/- Sam Judson : Wrox Technical Editor -/
Reply By: rashtikar Reply Date: 4/21/2008 7:49:52 AM
Hi,
I am using HL7 version 2.1 to 2.5
I have found one open source tool for message generation and parsing. It's NHAPI. But it does not support message communication.
Actually different labs will send their HL7 files either using HTTP, FTP or TCP/IP communication protocol and on my server I need to parse that messages and store in database.
Also I will need to send the acknoweldgement to the message sender application.
The messages can be standard or can be customized like user can add custom tags to their messages.

Thanks,
Rahul
Reply By: cathal_mchale Reply Date: 7/2/2008 8:48:54 AM
Hi Rahul,
Your last post describes exactly what I am doing. I am trying to keep things simple, and at present I am only interested in parsing some HL7 messages and sticking the info in the DB. Conversely I want to build a HL7 message using C# classes, serialize and send.

So I have had a look at NHAPI. Looks very useful.
I'd be interested if you have any further details or examples that you could give me, as by the sounds of things, you have been working with a similar solution for some time now.

Thanks,
Cathal.


Reply By: MrSmoofy Reply Date: 8/6/2008 8:07:27 PM
I to am working on an integration between a product I'm working on and another product written by a third part.  The client wants the two product to talk via HL7 the third party product already does it, I need to figure out how/understand how to create/send hl7 I'm not talking about the actual network part but the data of the messages and steps.  Anyone have some good links for this?

Reply By: cathal_mchale Reply Date: 8/7/2008 5:40:27 AM
quote:
Originally posted by MrSmoofy

I to am working on an integration between a product I'm working on and another product written by a third part.  The client wants the two product to talk via HL7 the third party product already does it, I need to figure out how/understand how to create/send hl7 I'm not talking about the actual network part but the data of the messages and steps.  Anyone have some good links for this?





http://nhapi.sourceforge.net/home.php

I've been using this since my last post, and I am finding it very useful.
I recommend you take some HL7 text (e.g. a sample from the 3rd party product you mention) and use NHapi to parse it. And then using the debugger, look into the object and see how it is populated. This will give u a good idea of how to populate and send your own messages from scratch.

Cathal.


Reply By: SammyJ Reply Date: 9/4/2008 8:30:23 AM
I've been looking at the NHapi code and I've run into one little problem.  We'll be processing mainly ADT_A04 messages, however, it seems that in the framework, only models v231 and below support it.  Anyone know why this is?  If I receive a 2.4 or 2.5 ADT_A04, would it be OK to use the 231 model to process it?

thanks!


Go to topic 73857

Return to index page 1