Q: How to convert HL7 file to user readable format I have a file that has extension .hl7 and file format like:

MSH|^~\&|^CCHITLabs^L-CL|^CCHIT^L-CL|^^|^^|20100407121000||ORU^R01^ORU_R01|20100407121000|P|2.5.1|0001||AL||||MT-ORU-2_R1 
  PID|1|12|00000333^^^^AN||Grayson^Jim^^^^^L||19430309|M|||834 Ocean Vista Avenue^Apt. 202^Santa Monica^CA^90401||3105552233 
  ORC|RE|||3^EHR-System 
  .
  .
  .
  .
  OBX|4|NM|14927-8^Triglycerides^LN||100|mg/dL|< 149||||F|||||^DOE^JOHN|||||||AccuLabs^^^^^CLIA^^^^10D987432|432 Administration Ave.^^St. Louis^MO^63146|^Smith^John^^^Dr.^MD
  NTE|0|L|

I want to read this file and dump the data in a database. Is there any API or program for .NET to read this file and dump the data in a database? Or any other way to do this?

A: All good comments.
I do this for a living and would agree that Nhapi is the best way to go from a C# programmers perspective. The open source engines are wonderful, but typically require a bit more knowledge of HL7 (from my perspective).
I would also suggest visiting this site for some very good examples of parsing HL7 messages using Nhapi.
If you lean towards Java, then visit this site for HAPI (the Java version of NHAPI). There are also plenty of examples of how to accomplish what you are trying to do.
Good Luck

A: Have a look at NHapi.
NHapi allows Microsoft .NET developers to easily use an HL7 2.x object model. This object model allows for parsing and encoding HL7 2.x data to/from Pipe Delimited or XML formats
This should give you a clue for .NET
HL7 is an ANSI protocol standard for information exchange of medical, financial or administrative data in the health industry. It's mostly used in hospitals between providers of the data e.g. laboratory, radiology and the consuming sites. It defines triggers and formats of the messages to be exchanged. Your file belongs to the version 2 protocol family. Version 3 is XML based and much more strict, so many companies prefer the version 2.

A: Nhapi for one can be used, but be aware that you are going to step in a lot of 1st hand programming. 
If I was at your place, I would have simply downloaded 
Mirth and  
connect it to your database, and use a database writer connector to write your own database script.
The advantage is that you will save a LOT of time by avoididn to parse the message and have the contents processed to a DB. Once your db query is ready you can just drag and drop components which you need to write to the database. 

A: Currently we don't have any specific API to read HL7 data.
The fact that HL7 message encoding uses specified delimiters limits the ability of a developer to introduce new ways of subdividing the data. There can be no sub-subcomponent, since this would require invention of a new delimiter type.
The first HL7 specifications did not define the abstract message.
Regards, Jay
