Stream: CCDA / FHIR mapping stream
Topic: Gaps in transformer
Jean Duteau (May 11 2018 at 16:18):
Here is a current list of gaps that I have found in the transform part of the validator.
-can not create non-FHIR resources
*-can not read ConceptMap resources so can not do vocabulary mapping for FHIR codes
*-source condition clauses don't seem to work
-can not cast to boolean
For those marked as '*', it could be something I'm doing, but I've pretty sure it's actually the transform engine.
Grahame Grieve (May 11 2018 at 16:58):
I don't understand the ConceptMap resource issue ? how can it not read them?
Grahame Grieve (May 11 2018 at 16:59):
the create non-fhir resources is mine
Grahame Grieve (May 11 2018 at 16:59):
sorry I didn't get to fix it - bandwith in italy seemed generally horrible and it got hard to focus on work too. Will try to get this sorted tonight
Grahame Grieve (May 11 2018 at 17:00):
source conditions - they work for me - so I don't understand. they have to start with a variable name though
Jean Duteau (May 11 2018 at 17:00):
when I was running the maps, it wouldn't do any conversions, even though I specified the conceptMap to use. I debugged it and it appears that ConceptMaps aren't read. as I said, I could be completely out-to-lunch
Grahame Grieve (May 11 2018 at 17:01):
how did you specify the concept map?
Jean Duteau (May 11 2018 at 17:01):
source conditions - I don't think they do. I'm using your II to Identifier map:
root1: for source.root as r where extension.exists() make target.system = translate(r, "http://hl7.org/fhir/ConceptMap/special-oid2uri", "uri")
root2: for source.root as r where extension.empty() make target.system = "urn:ietf:rfc:3986", target.value = append("urn:oid:", r)
root 1 never fires
Jean Duteau (May 11 2018 at 17:01):
use: for source.use make target.use = translate(c, 'http://hl7.org/fhir/ConceptMap/cm-name-use-v3', 'code')
Grahame Grieve (May 11 2018 at 17:02):
so do we have a proper shared workspace in github somewhere, or do we have to send each other files?
Jean Duteau (May 11 2018 at 17:03):
well, I have a shared workspace for my group, but not in github :)
Jean Duteau (May 11 2018 at 17:03):
let me make something in github
Grahame Grieve (May 11 2018 at 17:04):
ok
Jean Duteau (May 11 2018 at 17:10):
done and you were invited
Jean Duteau (May 11 2018 at 17:10):
https://github.com/jduteau/ccda-to-fhir-maps
Grahame Grieve (May 11 2018 at 17:12):
shouldn't it be public?
Jean Duteau (May 11 2018 at 17:14):
no, don't want just anyone touching my mappings at this time
Grahame Grieve (May 11 2018 at 17:16):
touching? reading? just because it's public doesn't mean you have to let other people commit or accept pull requests
Grahame Grieve (May 11 2018 at 17:17):
can we have sample documents and bundles in there too?
Grahame Grieve (May 11 2018 at 17:18):
so that we're using the same examples when we test
Jean Duteau (May 11 2018 at 17:22):
i added three sample discharge summary documents
Grahame Grieve (May 11 2018 at 17:30):
k thanks.
Jean Duteau (May 11 2018 at 17:31):
One other thing - you didn't create a CO structure definition. We have some test documents that use CO in Observation.value.
Grahame Grieve (May 11 2018 at 17:32):
but you didn't commit a bundle?
Grahame Grieve (May 11 2018 at 17:32):
a CO? is that legal? how?
Jean Duteau (May 11 2018 at 17:33):
no bundle as we haven't tested our Bundle->ClinicalDocument maps yet
Grahame Grieve (May 11 2018 at 17:33):
but that's one of the things you want me to check, no?
Jean Duteau (May 11 2018 at 17:35):
CO: the model/schema has ANY, so I would assume that a CO is legal
Bundle: I can give you a skeleton Bundle to run, but our maps are very draft
Jean Duteau (May 11 2018 at 17:37):
test Bundle pushed
Grahame Grieve (May 11 2018 at 18:11):
I thought CO was only defined in R2? that's why there's no logical model for it...
Jean Duteau (May 11 2018 at 18:33):
no, it's an R1 datatype as well.
Grahame Grieve (May 11 2018 at 18:44):
really? who the hell edited all this stuff anyway?
Grahame Grieve (May 11 2018 at 18:44):
it's not the MIF, anyhow.
Grahame Grieve (May 11 2018 at 19:06):
ok. got the mapping all running locally (oops, had to rewrite part of my server to get it running)
Grahame Grieve (May 11 2018 at 19:06):
you haven't committed any FHIR --> CDA mappings?
Jean Duteau (May 11 2018 at 19:07):
yes. CCDToCDA and DischargeSummaryToCDA
Grahame Grieve (May 11 2018 at 19:07):
which is the start?
Jean Duteau (May 11 2018 at 19:07):
they don't do much
Grahame Grieve (May 11 2018 at 19:08):
found it
Grahame Grieve (May 11 2018 at 19:08):
just in time.. boarding now...
Jean Duteau (May 11 2018 at 19:28):
I think there is also a problem with ED-to-string. The CDA attribute looks exactly the same as a ST: <originalText>text goes here</originalText> but the same map won't convert it over.
Grahame Grieve (May 11 2018 at 22:06):
I'll look at the concept map thing shortly
Grahame Grieve (May 11 2018 at 22:06):
ok. So:
- defined CO. Will have to push it
- sorted out the creation of ClinicalDocument, though I expect that there's downstream issues - we'll have to play ping pong as you find them and I fix them.
- the condition issue: the thing is:
root1: for source.root as r where source.extension.exists() make target.system = translate(r, "http://hl7.org/fhir/ConceptMap/special-oid2uri", "uri")
root2: for source.root as r where source.extension.empty() make target.system = "urn:ietf:rfc:3986", target.value = append("urn:oid:", r)
the source. in the where is critical. In the absence of that, the extension that this looks for is on root, not source.
Jean Duteau (May 11 2018 at 22:09):
okay, that works better
Grahame Grieve (May 11 2018 at 22:10):
committed my changes for creating ClinicalDocument - wait for the build and try again
Grahame Grieve (May 11 2018 at 22:10):
do you have a concept map in there that's not working?
Jean Duteau (May 11 2018 at 22:11):
the cm-name-use-v3, cm-address-use-v3, and cm-telecom-use-v3 didn't seem to work
Jean Duteau (May 11 2018 at 22:11):
Exception in thread "main" java.lang.Error: org.hl7.fhir.exceptions.FHIRException: not done yet: can't fetch http://hl7.org/fhir/ConceptMap/cm-address-use-v3
Jean Duteau (May 11 2018 at 22:12):
and when I debugged it, it seemed that any ConceptMap couldn't be loaded.
Grahame Grieve (May 11 2018 at 22:12):
ah. ok
Grahame Grieve (May 11 2018 at 22:12):
not inline concept maps . ok
Grahame Grieve (May 11 2018 at 22:14):
you got a stack dump or an example?
Jean Duteau (May 11 2018 at 22:14):
i have both. just uncomment the use rules in ENHumanName, ADAddress, and/or TELContactPoint and it will fail.
Exception in thread "main" java.lang.Error: org.hl7.fhir.exceptions.FHIRException: not done yet: can't fetch http://hl7.org/fhir/ConceptMap/cm-address-use-v3
at org.hl7.fhir.r4.context.BaseWorkerContext.fetchResource(BaseWorkerContext.java:1136)
at org.hl7.fhir.r4.utils.StructureMapUtilities.translate(StructureMapUtilities.java:1858)
at org.hl7.fhir.r4.utils.StructureMapUtilities.translate(StructureMapUtilities.java:1804)
at org.hl7.fhir.r4.utils.StructureMapUtilities.runTransform(StructureMapUtilities.java:1691)
at org.hl7.fhir.r4.utils.StructureMapUtilities.processTarget(StructureMapUtilities.java:1615)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeRule(StructureMapUtilities.java:1222)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeGroup(StructureMapUtilities.java:1207)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeRule(StructureMapUtilities.java:1242)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeGroup(StructureMapUtilities.java:1207)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeDependency(StructureMapUtilities.java:1267)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeRule(StructureMapUtilities.java:1230)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeRule(StructureMapUtilities.java:1226)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeGroup(StructureMapUtilities.java:1207)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeGroup(StructureMapUtilities.java:1203)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeDependency(StructureMapUtilities.java:1267)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeRule(StructureMapUtilities.java:1230)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeGroup(StructureMapUtilities.java:1207)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeDependency(StructureMapUtilities.java:1267)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeRule(StructureMapUtilities.java:1230)
at org.hl7.fhir.r4.utils.StructureMapUtilities.executeGroup(StructureMapUtilities.java:1207)
at org.hl7.fhir.r4.utils.StructureMapUtilities.transform(StructureMapUtilities.java:1181)
at org.hl7.fhir.r4.validation.ValidationEngine.transform(ValidationEngine.java:758)
at org.hl7.fhir.r4.validation.ValidationEngine.transform(ValidationEngine.java:745)
at org.hl7.fhir.r4.validation.Validator.main(Validator.java:268)
Jean Duteau (May 11 2018 at 22:16):
BaseWorkerContext.java:1024 (fetchResoruceWithException)
Jean Duteau (May 11 2018 at 22:31):
if you have a second, can you look at this group and tell me what I'm doing wrong. I'm obviously not understanding the source context for where conditions:
group CCDAComposition extends ClinicalDocumentComposition input source : ClinicalDocument as source input target: Composition as target input bundle: Bundle as target component: for source.component as component then { body: for component.structuredBody as body then { bodyComponent: for body.component as component then { allergySection: for component.section as srcSection where srcSection.code.code = "48765-2" make target.section as tgtSection then AllergySection(srcSection, bundle, tgtSection) section: for component.section as srcSection where srcSection.code.code != "48765-2" make target.section as tgtSection then ClinicalDocumentSection(srcSection, tgtSection) } } } endgroup
Jean Duteau (May 11 2018 at 22:32):
the allergySection rule fires for every section
Grahame Grieve (May 11 2018 at 22:41):
ok concept maps should work now. I had not tested external ones before and had not stumbled into that rather obvious bug in the context
Grahame Grieve (May 11 2018 at 22:42):
I will look at the other tomorrow morning
Jean Duteau (May 11 2018 at 22:43):
okay. have you pushed the CO definition? and did you add it to the list of options in x.value?
Jean Duteau (May 11 2018 at 22:58):
yes you did and no you didn't. But I added it on my side and they work now. Thx
Jean Duteau (May 11 2018 at 23:18):
re: concept maps - good news and bad news: it doesn't throw an error for address and humanName, but it still throws an error for telecom. This error is different:
...Failure: Exception executing transform target.use = translate(c, "http://hl7.org/fhir/ConceptMap/cm-telecom-use-v3", "code") on Rule "use": translation is not supported yet
unfortunately, although it doesn't throw an error, it doesn't actually translate them
Jean Duteau (May 11 2018 at 23:18):
anyways, i too am done for the night
Grahame Grieve (May 12 2018 at 06:40):
the reason the translations don't work is because you are using them the wrong way around, I think
Grahame Grieve (May 23 2018 at 07:05):
ok I've cleared out my critical task list and now I'm down to the merely urgent... Jean, where's a condition that's not working for you?
Jean Duteau (May 23 2018 at 15:17):
The DischargeSummaryToFHIR.map has a where condition for the sections that doesn't seem to work
Jean Duteau (May 30 2018 at 04:37):
Any update on this?
Last updated: Apr 12 2022 at 19:14 UTC