Stream: implementers
Topic: parse HL7 messeage to a FHIR json or xml
Fruei (Jun 19 2019 at 14:35):
Hi, i want to know, if there is a c# library to read HL7 messeages and parse them to an CCDA file or FHIR ( json or XML ) file. Please Help
Yunwei Wang (Jun 19 2019 at 18:39):
You can use FHIR C# library to parse FHIR json/xml message to FHIR object. You cannot do that between FHIR and C-CDA
Fruei (Jun 20 2019 at 18:51):
hi , thanks for answer my question , can you post the link of the FHIR library please ?. Another person tolds me that HL7 messeages are ccda already , its that true ? , can i parse an hl7 messeage in his XAML format , to an FHIR messeage ?
Jean Duteau (Jun 20 2019 at 19:26):
Another person tolds me that HL7 messeages are ccda already , its that true ? , can i parse an hl7 messeage in his XAML format , to an FHIR messeage ?
You will need to do some more reading up on HL7 and its standards (and possibly get that other person to do as well). HL7 has published four main standards over its history. HL7 v2 was a healthcare messaging standard that is normally conveyed in a custom format, i.e. not XML. HL7 v3 was a healthcare messaging standard that is conveyed in XML (but it did not get a large uptake so you probably aren't talking about that). HL7 CDA was based on v3 but is a Document standard. It is also conveyed in XML. CCDA stands for Consolidated CDA and is an Implementation Guide that provides a bunch of templates of HL7 CDA. To answer your questions:
1) No, HL7 messages are not CCDA. HL7 messages will either be V2 or V3. Any of the CCDA defined documents will be a HL7 CDA document and therefore not a HL7 v2 or v3 message.
2) You will need to convert the HL7 v2 or v3 message into FHIR. There is no library that automatically does this because there is so many different types of v2 or v3 messages. Similarly, there is no library that automatically does a conversion of CDA documents into FHIR documents. Work is being done on a standard set of v2 to FHIR conversions and a standard set of CDA to FHIR conversions, but that work is not complete yet.
Fruei (Jun 20 2019 at 19:41):
I understand, I think what I'm trying to do for now is impossible or very complex, so I'm going to follow the path of transforming my messages hl7 v2 to FHIR, the standards you mention can be used in code? Where do I find these standards v2 to FHIR?
Grahame Grieve (Jun 20 2019 at 19:42):
see https://chat.fhir.org/#narrow/stream/179188-v2-to.20FHIR
Lloyd McKenzie (Jun 22 2019 at 02:22):
And note that it's a starting point. @Fruei you will have to customize it for each v2 source you have.
Yunwei Wang (Jun 26 2019 at 17:51):
@Fruei Sorry for the late reply. Here is the github location: https://github.com/FirelyTeam/fhir-net-api
James Agnew (Jun 27 2019 at 17:09):
FYI here is NHAPI, which is an HL7 v2 parser for C# as well: https://github.com/duaneedwards/nHapi
(Note, I don't believe the authors of that library are on chat.fhir.org)
Yunwei Wang (Jun 30 2019 at 22:24):
@James Agnew Interesting. :joy:
Last updated: Apr 12 2022 at 19:14 UTC