Stream: cda to fhir
Topic: How to map CDA to fhir
Anthony Dagneaux (Sep 27 2019 at 19:51):
Hi everyone! I have a project to do for my school and I need to map CDA to FHIR. Do you have any tips to figure out how to do? Thank you in advance to any one who may be able to give me some ideas
Lloyd McKenzie (Sep 28 2019 at 02:01):
@Anthony Dagneaux, you must have a particularly nasty professor...
There's been quite a bit of work on mapping the Consolidated CDA (C-CDA) spec to FHIR. You can see the discussion here: #CCDA / FHIR mapping stream. However, the base CDA specification is extremely abstract. The same information can be represented numerous ways and different CDA implementations might have different interpretations of the same data structures. As a result, unless you're just mapping the CDA header, reliable mappings are pretty much impossible unless you're mapping to and from a relatively strict set of templates that indicate exactly how the CDA instance should be constructed and what each element means.
Anthony Dagneaux (Sep 28 2019 at 14:10):
Thank you for your answer! I asked for more details to my teacher, and he said that I need to work with CDA-R2. I will check your link, thanks again :)
Lloyd McKenzie (Sep 28 2019 at 14:19):
Then I would focus on mapping the header. If he wants you to do more, suggest that he comes here to discuss.
Anthony Dagneaux (Sep 28 2019 at 14:35):
Ok I will focus my work on the headers. I will try to find if someone has already done something. Thank you again for your time!
Oliver Egger (Sep 28 2019 at 15:04):
see also the fhir cda logical model https://github.com/HL7/cda-core-2.0/ which can be used as a base for mapping
Anthony Dagneaux (Oct 15 2019 at 12:25):
Thanks a lot! Actually I'm trying to identify the resources that I need to use for the mapping :) Will keep you informed of my progress!
Keith Boone (Nov 08 2019 at 07:12):
Just some thoughts: Production quality FHIR to CDA (the reverse process) is just about as picky, and took me with a team of 3 about 6 months. Definately want to keep the scope small. Lantana did some work here based on XSLT 2.0, which I eventually managed to get working in XSLT 1.0 but it still needs a good bit of work to be production quality. It's completely adequate for a class project (or for what I'd think of as prototype needing about 4 man-months to clean up that marketing would want to ship next week).
Lisa Nelson (Mar 07 2020 at 12:59):
The most relevant work on establishing guidance on how to map C-CDA to FHIR (IMO) can be found here:
https://confluence.hl7.org/display/SOA/Project+Documents
@Jean Duteau , @Matt Lord Can one of you please post info that links to the ballot materials for this work in the HL7 ballot site?
Vibin_chander (Jul 17 2020 at 06:53):
Hi,
This may sound like a dumb question. Im converting the CCDA to FHIR resources, We wanted to get the problems List section data from CCDA. Im using the Condition resource for this.
What I see is not many CCDA uses the ICD.10 code to capture the problem. Sometime they use the <Translation value> where they mention the ICD codes. Many times in the value section, they have only SNOMED.
Is there a CCDA standard that enforces the EMR to provide both these codes?
Keith Boone (Jul 17 2020 at 12:05):
Not that I know of, but you might look at https://www.nlm.nih.gov/research/umls/mapping_projects/snomedct_to_icd10cm.html as a way to get to the ICD-10-CM codes when all you have is SNOMED CT.
Vibin_chander (Dec 23 2020 at 17:16):
Thanks @Keith Boone it was late reply but I could make my clients understand the context better.
Vibin_chander (Dec 23 2020 at 17:16):
I'm also curious if there is any functional tool out there in the market that is useful for doing mapping between CCDA & FHIR
Vibin_chander (Dec 24 2020 at 06:29):
Also I have a question is there a straightforward approach to do the conversion from CCD/CCDA to FHIR.
I could see this link mentioned here.. https://wiki.hl7.org/Using_the_FHIR_Validator_to_transform_content
There is a validation jar download link and they've provided the CCDA to FHIR transformation logic they've mentioned. But it doesn't seem to work in straightforward manner. Also seems like i'm not the first person who tried it. There is an existing issue raised here https://github.com/HL7/ccda-to-fhir/issues/2
Either HL7 needs to remove this misleading page https://wiki.hl7.org/Using_the_FHIR_Validator_to_transform_content or we definitely need to build an opensource tool that will convert CCDA to FHIR
René Spronk (Dec 24 2020 at 07:18):
(side note: the HL7 Wiki is no longer used nor updated. It's still there to preserve the historic record. All such pages have been moved to Confluence)
Vibin_chander (Dec 24 2020 at 07:44):
@René Spronk Thank you.Can you please point me to the CCDA to FHIR section in confluence?. I did see another implementation here it was done very well. One challenge is that it works only on DSTU2 approach
https://github.com/srdc/cda2fhir The mapping sheet provided by them also looks really good and its open accessible for all. https://docs.google.com/spreadsheets/d/15Kv6PFyPh91sH1JMYwLH7D2yjh4HOTy5pjETjQNRyaU/edit#gid=0
René Spronk (Dec 24 2020 at 07:51):
I'm not an expert on the subject, CCDA is a US-only implementation guide. @Oliver Egger @Rick Geimer
I do have the following links on file:
Argonaut “CCDA on FHIR” project
http://www.hl7.org/fhir/us/ccda/
Not a mapping, but a functional equivalent of ‘CCDA on HL7v3’
CDA Logical Model & FHIR Mapping Language
http://build.fhir.org/ig/ahdis/cda-core-2.0/branches/master/index.html
Microsoft CDA Mapping
https://github.com/microsoft/FHIR-Converter
Uses Handlebar templates
Google
https://github.com/GoogleCloudPlatform/healthcare-data-harmonization/blob/master/mapping_language/doc/reference.md
Uses Whistle
See also https://github.com/HL7/ccda-to-fhir/ , although I'm not aware as to how 'up to date' that material is.
Vibin_chander (Dec 24 2020 at 08:03):
thank you for the pointers
Oliver Egger (Dec 24 2020 at 08:09):
@Vibin_chander the confluence page is here: https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Mapping+Language, note that the CDA (not CCDA) Logical Model source is here: https://github.com/HL7/cda-core-2.0 . How to use the CDA logical model with the java validator you can also check out: https://github.com/ahdis/cda-core-2.0/blob/develop/tutorial.md . We don't have experience with CCDA, maybe @Sean McIlvenna can point you to further information.
Vibin_chander (Dec 24 2020 at 09:37):
@Oliver Egger Thank you for the inputs I have two questions.
-
The example mentioned here uses this map [http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaChEmedMedicationCardDocumentToBundle] What should be the map we should use to check the entire CCDA to FHIR?
-
When I validated the CCDA I have it is giving me 9 errors. Against what standard this validate_cli.jar is validating the CCDA with?
René Spronk (Dec 24 2020 at 10:27):
Note that the mappings supplied by Oliver are for a Swiss CDA implementation guide, and not for the US CCDA project. You'll first have to find those. CCDA is an implementation of CDA, and as such should validate against the logical model representation of CDA.
Vibin_chander (Dec 24 2020 at 10:38):
Thank you @René Spronk this is catch22 scenario. A Paradox. We have standards. But problem is we have different standards for different places. So, It's standard but not universal unlike some automobile industry. Where certain manufacturing standards are same.
Even in the FHIR world. If you take the concept of profiling. US core profile, Carin BB profile etc exist. But people build their own profile on top of these profiles. Meaning they profile a existing profile. In this case the meaning of interoperability becomes even more difficult.
Vibin_chander (Dec 24 2020 at 10:40):
I think we need to live with this. Or A international interoperability profile need to be adopted.
Vibin_chander (Dec 24 2020 at 10:41):
For example - Swiss Core Profile, US core Profile, German Core Profile. But base profile is R4. If you need any further implementation on top of that then all of them should be just extensions added in these profiles. Instead of Building a own profile.
Vibin_chander (Dec 24 2020 at 10:43):
There are lot of practical difficulties with CCDA. Although EMR has provided standards for building it. People who export these CCDA dont do it properly. It results in very malformed ccda
René Spronk (Dec 24 2020 at 10:52):
Undoubtedly not all implementations of interoperability standard play fully by the rules, and there will be non conformance instances. That's a fact of life. We have one core standard, and many different contexts where that standard is being used, thus a need for conformance rules/profiles. FHIR Core is as good as its gets in terms of defining a framework standard that's fit for international use (i.e. context agnostic). Nevertheless, the general approach to the mapping of CDA to FHIR will be the same (as will the tooling used), regardless of what particular CDA Implementation Guide one is using.
If you have an interest ion mapping CCDA, then you'll either have to find an existing mapping (which may well exist somewhere), or create one of your own (and share it afterwards, so others don't have to reinvent the wheel).
Vibin_chander (Dec 24 2020 at 11:08):
@René Spronk Thank you I'm starting this process soon. Will put my mapping opensource and subject it to review for people
Oliver Egger (Dec 24 2020 at 11:33):
Vibin_chander said:
- The example mentioned here uses this map [http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaChEmedMedicationCardDocumentToBundle] What should be the map we should use to check the entire CCDA to FHIR?
@René Spronk summarised it already very good, if there are some mappings for CCDA available use those (@Jean Duteau , @Alexander Zautke ? ), otherwise you need to build your own. Feel free to start from https://github.com/hl7ch/cda-fhir-maps/tree/master/input/maps, the base maps are not Swiss specific (https://github.com/hl7ch/cda-fhir-maps/blob/master/input/maps/BundleToCda.map)
Oliver Egger (Dec 24 2020 at 11:40):
Vibin_chander said:
- When I validated the CCDA I have it is giving me 9 errors. Against what standard this validate_cli.jar is validating the CCDA
Depending on what Logical Model you provided for the validator. If you followed the tutorial it would be against the CDA Logical Model. I assume it are mostly terminology errors?
Vibin_chander (Dec 24 2020 at 11:49):
@Oliver Egger yes they're terminology error
Oliver Egger (Dec 24 2020 at 12:59):
terminology are an open issue which needs to be tackled in the CDA model / validation
AJ Chen (Dec 25 2020 at 06:42):
@Oliver Egger thanks for sharing the links to cda-fhir-maps project. very interesting. wondering if this project is intended to cover mapping for other sections in C-CDA.
AJ Chen (Dec 25 2020 at 06:47):
@René Spronk Thanks for the links. The microsoft FHIR converter sounds like it covers CDA-FHIR conversion. But the project only has ADT sample data. Anyone has used the microsoft fhir converter to convert various CDA documents?
Vibin_chander (Dec 29 2020 at 05:54):
@AJ Chen One challenge we will face with this CDA documents is the way the documents are exported from the EMR/PM Systems. Although all CCDA follows CDA architecture. Most cases are like the documents are exported in faulty structures. Some time's I've seen the EMR's also don't follow standards as expected.
The easy part:
The easier way to start is using the template ID's. Each section has their own template id for example for problems section the template id is 2.16.840.1.113883.10.20.22.2.5.1 which will be mapped to Condition FHIR resource. But certain things are optional for example: In some CCDA you can see SNOMED-CT code for the problem name and they'll provide the corresponding ICD code in the <translation code> section. But that's optional some CCDA have it some don't have it.
The complex part:
In some section like procedures with the template id 2.16.840.1.113883.10.20.22.2.7.1 which maps to procedure FHIR resource. Might be different in the root level of data. procedure might come inside <entry><procedure> or it can come inside <entry><act> too. I need clarity on parsing this sections of CCDA.
AJ Chen (Dec 29 2020 at 07:52):
If you are talking about CDA to FHIR conversion tool, it should be able to deal with messy data in the real world.
Shamil Nizamov (Feb 14 2021 at 22:35):
Vibin_chander said:
The complex part:
In some section like procedures with the template id 2.16.840.1.113883.10.20.22.2.7.1 which maps to procedure FHIR resource. Might be different in the root level of data. procedure might come inside <entry><procedure> or it can come inside <entry><act> too. I need clarity on parsing this sections of CCDA.
The C-CDA clearly states that:
Procedure Activity Procedure is for procedures that alter the physical condition of a patient (e.g., splenectomy).
Procedure Activity Observation is for procedures that result in new information about a patient but do not cause physical alteration (e.g., EEG).
Procedure Activity Act is for all other types of procedures (e.g., dressing change).
The first and third ones will map to the Procedure resource, the second to the Observation.
Vibin_chander (Feb 16 2021 at 18:42):
@Shamil Thank you for this insight
Vibin_chander (Feb 16 2021 at 18:42):
could you point me to the document that has this ccda explanation ?
Shamil Nizamov (Feb 16 2021 at 19:40):
C-CDA IG R2.1
Last updated: Apr 12 2022 at 19:14 UTC