I was parsing HL7 version 2.x messages through HAPI. Now I want to parse HL7 version 3 messages, which are in XML format. HAPI does not support HL7 version 3, so how can I do this?
4 Answers
HL7 version 3 is essentially XML-formatted HL7 data. As such, you could use any old XML parser. That said, you would have to build the intelligence re: segments etc... in yourself.
It does, however, appear that there is an HL7 v3 Java Special Interest Group, which has developed an API at least for RIM.
Another option would be to look at an integration engine. An open source option here is mirth. Mirth is a interface integration engine. It is a separate product - not a library you would integrate with your own. It can, however, take over the heavy lifting of converting HL7 to something more useful in your application - a Web Service call, a database insert, a differently formatted file (pdf, edi, etc).

- 820
- 6
- 16
-
2Hey thank you..but can you tell me what is mirth? i mean is it parser? – Vishal Zanzrukia Apr 12 '12 at 07:30
-
2And one more thing, i m searching for RIM API but could not found. can you please give me any link? – Vishal Zanzrukia Apr 12 '12 at 10:00
-
1The link was in the post - it's the presentation by the HL7 v3 Java SIG. - Added additional detail re: mirth in the answer. – dividius Apr 12 '12 at 12:47
-
1ya i see that pdf file which you attached..but i did not get any api for parser which can parse ccd document..please give me download link for that..thanks dividius again..help me if possible.. – Vishal Zanzrukia Apr 13 '12 at 10:49
-
3@Vishal You may check "Unofficial Mirth Connect v3.1 Developer's Guide" eBook that reveals some details how Mirth Connect works, how to use it to parse HL7v2 or v3 messages, how to build v2/v3 messages, how to debug implementations and so on. It’s available to download at - http://mirthconnect.shamilpublishing.com – Shamil Mar 26 '15 at 23:42
Mohawk College publishes a Free and Open Source (FLOSS) API Framework for HL7 version 3 messaging and CDA Document processing called the "Everest Framework".
This framework is available for Java and .NET and comes with extensive examples and documentation on how to use HL7v3 messaging.
You can download the framework at (https://github.com/MohawkMEDIC/everest).
Support is also available via the GitHub project page.
This framework was developed through grant funding provided by the Natural Sciences and Engineering Research Council of Canada (NSERC) and Canada Health Infoway.

- 316
- 3
- 11
I used HL7 Java SIG some time ago (2008), but it is very easy to 1. create your own parser from the schemas using JAXB (Generate Java classes from .XSD files...?), or 2. create your own parser from scratch (I would suggest to use Groovy XMLSlurper http://www.groovy-lang.org/processing-xml.html).

- 1
- 1

- 3,080
- 29
- 42
You were asking for a link to the official parser for HL7v3 (go to the section under "v3 Utilities", I'll admit it's not easy to find but here it is: http://www.hl7.org/participate/toolsandresources.cfm?ref=nav
They have some examples and data files to test with as well.

- 2,889
- 1
- 24
- 30