FHIR Chat · How to run transformer now? · CCDA / FHIR mapping stream

Stream: CCDA / FHIR mapping stream

Topic: How to run transformer now?


view this post on Zulip Jean Duteau (Jun 08 2018 at 16:54):

@Grahame Grieve I have updated my FHIR build and the fhir-cda repositories and now I'm unsure how to run the validator to do transforms. In the past, I pointed the validator at the fhir-cda/resources/structuredefinition to get the CDA logical model, but you removed that directory and now you can't point the validator at just the resources directory because of the directories and other things in there. Can you clue me in on how you're running the transformations? thanks.

view this post on Zulip Grahame Grieve (Jun 08 2018 at 20:15):

what did I remove?

view this post on Zulip Jean Duteau (Jun 08 2018 at 23:03):

You moved all of the StructureDefinitions from a resources/structuredefinition to up at the resources level. i.e. resources/structuredefinition/AD.xml to resources/AD.xml

view this post on Zulip Jean Duteau (Jun 08 2018 at 23:05):

so now you can't just point the transformer at the resources/structuredefinition directory.
Basically, i'd like the steps that you are using to run the transformations so I can document them for the task force and others.

view this post on Zulip Jean Duteau (Jul 13 2018 at 04:52):

@Grahame Grieve any progress on documenting how you ran your transformations so I can progress my stuff? I also had some issues I sent in an email that I really need help with. Thanks.

view this post on Zulip Grahame Grieve (Jul 26 2018 at 07:01):

@Jean Duteau courtesy of a pair of bug fixes, you must delete your local package hl7.fhir.cda-0.0.1 before running the transform next

view this post on Zulip Jean Duteau (Jul 26 2018 at 15:33):

where would I find that? i just ran the transformer an it appeared to work

view this post on Zulip Lloyd McKenzie (Jul 26 2018 at 18:20):

On windows, it's in c:/users/[account]/.fhir/packages

view this post on Zulip Jean Duteau (Jul 26 2018 at 18:29):

cmon now, you know i don't do windows! :)

view this post on Zulip Jean Duteau (Jul 26 2018 at 18:29):

but i found it. thanks. :)

view this post on Zulip Lloyd McKenzie (Jul 26 2018 at 18:43):

I did know. I trusted you to figure out what the weird Mac-ish equivalent was :)

view this post on Zulip Grahame Grieve (Oct 22 2018 at 22:31):

@Jean Duteau http://wiki.hl7.org/index.php?title=Using_the_FHIR_Validator_to_transform_content

view this post on Zulip Jean Duteau (Oct 22 2018 at 22:54):

That is a good instructions page. If you are referencing my CCDA to FHIR maps, the URL isn't right.

view this post on Zulip Grahame Grieve (Oct 23 2018 at 02:04):

do you want to fix it?

view this post on Zulip Jean Duteau (Oct 23 2018 at 02:08):

Yep, done.

view this post on Zulip Grahame Grieve (Oct 23 2018 at 02:29):

thanks

view this post on Zulip Grahame Grieve (Oct 23 2018 at 02:30):

so how do people got hold of the latest maps if they want to run them?

view this post on Zulip Jean Duteau (Oct 23 2018 at 03:18):

They are on HL7's GitHub. I included a link in the instructions as well.

view this post on Zulip Grahame Grieve (Oct 23 2018 at 06:23):

great thanks

view this post on Zulip Grahame Grieve (Oct 23 2018 at 09:25):

ok, I'm adding a test to the FHIR build to ensure the validator works doing transforms per the documentation, and I'm getting this error:

view this post on Zulip Grahame Grieve (Oct 23 2018 at 09:25):

...Failure: No matches found for rule for 'http://hl7.org/fhir/cda/StructureDefinition/IVL_TS to dateTime' from http://hl7.org/fhir/cda/mapping/cdaAllergyIntolerance, from rule 'effectiveTime'

view this post on Zulip Grahame Grieve (Oct 23 2018 at 09:25):

is this a known issue?

view this post on Zulip Grahame Grieve (Oct 23 2018 at 09:33):

apparently not. I added this:

group for types IVLTSDateTime extends Any
    input source: IVL_TS as source
    input target: dateTime as target

    low: for source.low as s then TSDateTime(s, target)
endgroup

view this post on Zulip Grahame Grieve (Oct 23 2018 at 09:34):

but this and the IVLTSPeriod look underdone to me, given the complexities of IVL_TS - is this something we should work on?

view this post on Zulip Grahame Grieve (Oct 23 2018 at 09:34):

and also, would you like me to convert these to the new format?

view this post on Zulip Grahame Grieve (Oct 23 2018 at 09:34):

(I haven't committed anything yet...)

view this post on Zulip Jean Duteau (Oct 23 2018 at 21:00):

The mappings have a bunch of issues that were left unaddressed because we simply ran out of time. So yes we should work on all of the datatype conversions at some point in time.

view this post on Zulip Grahame Grieve (Oct 23 2018 at 21:51):

hmm. Wayne has asked to me to revisit this work - I guess it's more than a little overdue...

view this post on Zulip Grahame Grieve (Feb 01 2019 at 20:41):

@all I referenced this stream in the FHIR foundation monthly report and forgot it's not public. Can I make it public?

view this post on Zulip Sean McIlvenna (Feb 01 2019 at 21:04):

Don't see any reason not to, as far as I'm concerned.

view this post on Zulip Rick Geimer (Feb 01 2019 at 22:15):

Fine with me

view this post on Zulip Rick Geimer (Feb 01 2019 at 22:15):

Let me add some swear words first :)

view this post on Zulip Grahame Grieve (Feb 02 2019 at 04:32):

ok public now

view this post on Zulip Joseph Athman (Nov 22 2019 at 15:48):

I've seen some references to CCDA to FHIR R5 resources being a focus of the R5 release. Are these the mappings that will be used for that work https://github.com/HL7/ccda-to-fhir/tree/master/mappings? Are they someplace else? Just looking for a place to start and to see what the current progress is with the work. Thanks!

view this post on Zulip Oliver Egger (Nov 23 2019 at 09:46):

@Joseph Athman The latest mapping for C-CDA are here I think: https://github.com/HL7/ccda-to-fhir
I'm working on CDA (not CCDA) maps to FHIR, starting from the CCDA maps. I presented the results yesterday at devdays, see https://github.com/ahdis/cda-core-2.0/blob/develop/tutorial.md. I got the feedback that the maps are not yet in R4 syntax, so I will convert them in the next days from STU3 and update them here https://github.com/ahdis/cda-core-2.0/tree/develop.

view this post on Zulip Joseph Athman (Nov 24 2019 at 14:56):

@Oliver Egger thank you. That’s very helpful. Is this the same work that @Lloyd McKenzie discussed at his R5 presentation at DevDays?

view this post on Zulip Oliver Egger (Nov 24 2019 at 15:07):

I don't know what Lloyd discussed because the tracks were at at same time ...

view this post on Zulip Lloyd McKenzie (Nov 24 2019 at 15:25):

Yes, I was referring to the CCDA-to-FHIR work. I wasn't aware of the CDA work - cool :)

view this post on Zulip Joseph Athman (Nov 25 2019 at 21:55):

Yes, I was referring to the CCDA-to-FHIR work. I wasn't aware of the CDA work - cool :)

@Lloyd McKenzie is this the current CCDA to FHIR work? it just hasn't had any updates in like 18 months, I assumed there would be something newer: https://github.com/HL7/ccda-to-fhir

view this post on Zulip Lloyd McKenzie (Nov 26 2019 at 05:45):

@Rick Geimer

view this post on Zulip John Moehrke (Nov 27 2019 at 17:53):

I (IHE) am also very interested in the FHIR R4 version of ccda-on-FHIR

view this post on Zulip John Moehrke (Nov 27 2019 at 17:54):

@Brett Marquard @Corey Spears @Rick Geimer

view this post on Zulip Oliver Egger (Nov 28 2019 at 14:59):

I just converted the c-cda maps to R4, see https://github.com/HL7/ccda-to-fhir/pull/1, @Alexander Zautke @Vadim Peretokin can you check the mappings?

view this post on Zulip Rick Geimer (Dec 11 2019 at 21:45):

We (Lantana) created C-CDA to FHIR transforms under an ONC grant for the Care Plan document type, then later updated them to cover most of C-CDA. However, they are for FHIR STU3.
https://github.com/lantanagroup/PhCP-Public-Transforms

view this post on Zulip Vadim Peretokin (Dec 12 2019 at 12:51):

@Oliver Egger sorry for the delay, looking into reviewing it now. How are you running the transforms?

view this post on Zulip Oliver Egger (Dec 12 2019 at 13:38):

i'm using the cda core logical model and java jar validator, see steps here: https://github.com/ahdis/cda-core-2.0/tree/develop

view this post on Zulip Oliver Egger (Dec 12 2019 at 13:39):

i'm in the process of packaging that together, but that's not quite ready

view this post on Zulip Vadim Peretokin (Dec 12 2019 at 13:40):

thanks! was doing archeology on zulip and confluence to piece the steps together...

view this post on Zulip Vadim Peretokin (Dec 12 2019 at 13:45):

So your fork of cda-core-2.0 has the PR from ccda-to-fhir already integrated?

view this post on Zulip Vadim Peretokin (Dec 12 2019 at 13:51):

hm, no, mappings looks healthier.

view this post on Zulip Oliver Egger (Dec 12 2019 at 13:56):

yes that's correct just look at mappings, i used them in the cda-core-2.0 only for inspiration :-)

view this post on Zulip Vadim Peretokin (Dec 12 2019 at 14:02):

Do you know what's wrong?

vadi@volga:~/Programs/ccda-to-fhir$ java -jar org.hl7.fhir.validator.jar ../cda-core-2.0/resources/examples/ccda.xml -transform http://hl7.org/fhir/cda/mapping/ClinicalDocumentToFHIR -version 4.0.1 -ig package.tgz -ig mappings -log test.txt -output bundle.xml
FHIR Validation tool Version 4.1.23-SNAPSHOT (Git# ea7f3a795711). Built 2019-12-12T10:34:18.271+11:00 (14 hours old)
Detected Java version: 1.8.0_131 from /usr/lib/jvm/java-8-oracle/jre on amd64 (64bit). 3541MB available
Arguments: ../cda-core-2.0/resources/examples/ccda.xml -transform http://hl7.org/fhir/cda/mapping/ClinicalDocumentToFHIR -version 4.0.1 -ig package.tgz -ig mappings -log test.txt -output bundle.xml
Directories: Current = /home/vadi/Programs/ccda-to-fhir, Package Cache = /home/vadi/.fhir/packages
  .. FHIR Version 4.0, definitions from hl7.fhir.r4.core#4.0.1
  .. connect to tx server @ http://tx.fhir.org
    (v4.0.1)
+  .. load IG from package.tgz
+  .. load IG from mappings
* load file: CDAtoFHIRTypes.txt - ignored due to error:  (null - NPE)
* load file: CDAAllergyIntolerance.txt - ignored due to error:  (null - NPE)
* load file: Bundle.txt - ignored due to error:  (null - NPE)
* load file: CCDToCDA.txt - ignored due to error:  (null - NPE)
* load file: ClinicalDocument.txt - ignored due to error:  (null - NPE)
* load file: DischargeSummaryToCDA.txt - ignored due to error:  (null - NPE)
* load file: CCDAToFHIR.txt - ignored due to error:  (null - NPE)
* load file: FHIRtoCDATypes.txt - ignored due to error:  (null - NPE)
Exception in thread "main" java.lang.Error: Unable to find map http://hl7.org/fhir/cda/mapping/ClinicalDocumentToFHIR (Known Maps = [http://hl7.org/fhir/StructureMap/supplyrequest-transform, supplyrequest-transform, http://hl7.org/fhir/StructureMap/example|0.1, http://hl7.org/fhir/StructureMap/example, example])
    at org.hl7.fhir.r5.validation.ValidationEngine.transform(ValidationEngine.java:1228)
    at org.hl7.fhir.r5.validation.ValidationEngine.transform(ValidationEngine.java:1218)
    at org.hl7.fhir.r5.validation.Validator.main(Validator.java:592)
vadi@volga:~/Programs/ccda-to-fhir$ head mappings/ClinicalDocument.map
map "http://hl7.org/fhir/cda/mapping/ClinicalDocumentToFHIR" = "CDA Document to FHIR"

uses "http://hl7.org/fhir/cda/StructureDefinition/ClinicalDocument" alias ClinicalDocument as source
uses "http://hl7.org/fhir/cda/StructureDefinition/AssignedAuthor" alias AssignedAuthor as queried
uses "http://hl7.org/fhir/cda/StructureDefinition/AssignedEntity" alias AssignedEntity as queried
uses "http://hl7.org/fhir/cda/StructureDefinition/CustodianOrganization" alias CustodianOrganization as queried

view this post on Zulip Vadim Peretokin (Dec 12 2019 at 14:03):

I do pass it -ig mappings where the map is

view this post on Zulip Vadim Peretokin (Dec 12 2019 at 14:07):

OK, perhaps the problem is this, hah:

+  .. load IG from mappings
* load file: CDAtoFHIRTypes.txt - ignored due to error:  (null - NPE)
java.lang.NullPointerException
    at org.hl7.fhir.r4.utils.FHIRPathEngine.<init>(FHIRPathEngine.java:251)
    at org.hl7.fhir.r4.utils.StructureMapUtilities.<init>(StructureMapUtilities.java:253)
    at org.hl7.fhir.r5.validation.ValidationEngine.loadResourceByVersion(ValidationEngine.java:853)
    at org.hl7.fhir.r5.validation.ValidationEngine.loadFileWithErrorChecking(ValidationEngine.java:819)
    at org.hl7.fhir.r5.validation.ValidationEngine.loadIg(ValidationEngine.java:796)
    at org.hl7.fhir.r5.validation.Validator.main(Validator.java:567)
* load file: CDAAllergyIntolerance.txt - ignored due to error:  (null - NPE)
java.lang.NullPointerException
    at org.hl7.fhir.r4.utils.FHIRPathEngine.<init>(FHIRPathEngine.java:251)
    at org.hl7.fhir.r4.utils.StructureMapUtilities.<init>(StructureMapUtilities.java:253)
    at org.hl7.fhir.r5.validation.ValidationEngine.loadResourceByVersion(ValidationEngine.java:853)
    at org.hl7.fhir.r5.validation.ValidationEngine.loadFileWithErrorChecking(ValidationEngine.java:819)
    at org.hl7.fhir.r5.validation.ValidationEngine.loadIg(ValidationEngine.java:796)
    at org.hl7.fhir.r5.validation.Validator.main(Validator.java:567)
* load file: Bundle.txt - ignored due to error:  (null - NPE)

It thinks mappings files are .txt (maybe unrelated) and is failing to load them.

view this post on Zulip Vadim Peretokin (Dec 12 2019 at 14:11):

Should have used your build to begin with :) it gets further.

view this post on Zulip Oliver Egger (Dec 12 2019 at 14:24):

yes you need to use the jar version, sorry i was as assuming that you run the maps through your infrastructure

view this post on Zulip Oliver Egger (Dec 12 2019 at 14:24):

... the jar version available in https://github.com/ahdis/cda-core-2.0/releases

view this post on Zulip Vadim Peretokin (Dec 12 2019 at 14:35):

No matches found for rule for 'http://hl7.org/fhir/cda/StructureDefinition/IVL_TS to dateTime'

is that expected? A quick scan only revealed IVL_TS to period, not dateTime

view this post on Zulip Vadim Peretokin (Dec 12 2019 at 14:43):

Eh, I see now why it shouldn't work, all good :)


Last updated: Apr 12 2022 at 19:14 UTC