VB.NET - I have to Create HL7 messages, and have to store it in Database Sql server ! Thank you !

Asked By arun kumar on 19-Mar-14 07:20 AM
I have to create the HL7 messages. Using .Net how can i develope the HL7 interface project. I refered lot of websites but there is no idea i got it . So if you know about that reply to me. its very urgent process.
[ have to create the Front end and back end of Sql Server 2008 R2 to create the HL7 messages  ]
Robbe Morris replied to arun kumar on 19-Mar-14 08:00 AM
HL7 messages are nothing more that delimited text files (moronic is this day and age).

http://en.wikipedia.org/wiki/Health_Level_7

As for your system, you'd most likely want to store the data relationally and capture and show your data like you would any other application.  When you are ready to send data, you'd query what is needed for the desire message and create a text oriented message with the right information in the right places.  Same thing with reading in responses.

You'll need to study all of the HL7 messages and write a library to create and read each one.
arun kumar replied to Robbe Morris on 19-Mar-14 09:35 AM
Hai sir, Thanks for Reply.

I have study some materials and created tables for relevent to that. Like Segments , Composites , Message Types.
I have developed the coding for Convertion from Existing HL7 Message to XML . But I have to Store it from XML file to Database and also have to create the HL7 messages ( Results ). In that , I have no idea to store with Database table.
This is my Issue.

Thanks for Reply.
Robbe Morris replied to arun kumar on 19-Mar-14 09:55 AM
Use a column of varchar(max) to store xml just as you would any other string.  nvarchar(max) if you need to store Unicode characters.

That said, beware of this approach.  Xml structures change over time and your code will need to accommodate for changes in structure and missing nodes.  Plus, you cannot query the contents of the xml while it is in the column.  You'd always have to retrieve each record one by one, load them up in an XPathNavigator or XmlDocument and perform xpath queries on each.  Very slow from a performance perspective.