FHIR Chat · Gaps in transformer · CCDA / FHIR mapping stream

Stream: CCDA / FHIR mapping stream

Topic: Gaps in transformer


view this post on Zulip 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.

view this post on Zulip Grahame Grieve (May 11 2018 at 16:58):

I don't understand the ConceptMap resource issue ? how can it not read them?

view this post on Zulip Grahame Grieve (May 11 2018 at 16:59):

the create non-fhir resources is mine

view this post on Zulip 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

view this post on Zulip 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

view this post on Zulip 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

view this post on Zulip Grahame Grieve (May 11 2018 at 17:01):

how did you specify the concept map?

view this post on Zulip 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

view this post on Zulip 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')

view this post on Zulip 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?

view this post on Zulip Jean Duteau (May 11 2018 at 17:03):

well, I have a shared workspace for my group, but not in github :)

view this post on Zulip Jean Duteau (May 11 2018 at 17:03):

let me make something in github

view this post on Zulip Grahame Grieve (May 11 2018 at 17:04):

ok

view this post on Zulip Jean Duteau (May 11 2018 at 17:10):

done and you were invited

view this post on Zulip Jean Duteau (May 11 2018 at 17:10):

https://github.com/jduteau/ccda-to-fhir-maps

view this post on Zulip Grahame Grieve (May 11 2018 at 17:12):

shouldn't it be public?

view this post on Zulip Jean Duteau (May 11 2018 at 17:14):

no, don't want just anyone touching my mappings at this time

view this post on Zulip 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

view this post on Zulip Grahame Grieve (May 11 2018 at 17:17):

can we have sample documents and bundles in there too?

view this post on Zulip Grahame Grieve (May 11 2018 at 17:18):

so that we're using the same examples when we test

view this post on Zulip Jean Duteau (May 11 2018 at 17:22):

i added three sample discharge summary documents

view this post on Zulip Grahame Grieve (May 11 2018 at 17:30):

k thanks.

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (May 11 2018 at 17:32):

but you didn't commit a bundle?

view this post on Zulip Grahame Grieve (May 11 2018 at 17:32):

a CO? is that legal? how?

view this post on Zulip Jean Duteau (May 11 2018 at 17:33):

no bundle as we haven't tested our Bundle->ClinicalDocument maps yet

view this post on Zulip Grahame Grieve (May 11 2018 at 17:33):

but that's one of the things you want me to check, no?

view this post on Zulip 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

view this post on Zulip Jean Duteau (May 11 2018 at 17:37):

test Bundle pushed

view this post on Zulip 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...

view this post on Zulip Jean Duteau (May 11 2018 at 18:33):

no, it's an R1 datatype as well.

view this post on Zulip Grahame Grieve (May 11 2018 at 18:44):

really? who the hell edited all this stuff anyway?

view this post on Zulip Grahame Grieve (May 11 2018 at 18:44):

it's not the MIF, anyhow.

view this post on Zulip 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)

view this post on Zulip Grahame Grieve (May 11 2018 at 19:06):

you haven't committed any FHIR --> CDA mappings?

view this post on Zulip Jean Duteau (May 11 2018 at 19:07):

yes. CCDToCDA and DischargeSummaryToCDA

view this post on Zulip Grahame Grieve (May 11 2018 at 19:07):

which is the start?

view this post on Zulip Jean Duteau (May 11 2018 at 19:07):

they don't do much

view this post on Zulip Grahame Grieve (May 11 2018 at 19:08):

found it

view this post on Zulip Grahame Grieve (May 11 2018 at 19:08):

just in time.. boarding now...

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (May 11 2018 at 22:06):

I'll look at the concept map thing shortly

view this post on Zulip 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.

view this post on Zulip Jean Duteau (May 11 2018 at 22:09):

okay, that works better

view this post on Zulip Grahame Grieve (May 11 2018 at 22:10):

committed my changes for creating ClinicalDocument - wait for the build and try again

view this post on Zulip Grahame Grieve (May 11 2018 at 22:10):

do you have a concept map in there that's not working?

view this post on Zulip 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

view this post on Zulip 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

view this post on Zulip Jean Duteau (May 11 2018 at 22:12):

and when I debugged it, it seemed that any ConceptMap couldn't be loaded.

view this post on Zulip Grahame Grieve (May 11 2018 at 22:12):

ah. ok

view this post on Zulip Grahame Grieve (May 11 2018 at 22:12):

not inline concept maps . ok

view this post on Zulip Grahame Grieve (May 11 2018 at 22:14):

you got a stack dump or an example?

view this post on Zulip 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)

view this post on Zulip Jean Duteau (May 11 2018 at 22:16):

BaseWorkerContext.java:1024 (fetchResoruceWithException)

view this post on Zulip 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

view this post on Zulip Jean Duteau (May 11 2018 at 22:32):

the allergySection rule fires for every section

view this post on Zulip 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

view this post on Zulip Grahame Grieve (May 11 2018 at 22:42):

I will look at the other tomorrow morning

view this post on Zulip 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?

view this post on Zulip 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

view this post on Zulip 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

view this post on Zulip Jean Duteau (May 11 2018 at 23:18):

anyways, i too am done for the night

view this post on Zulip 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

view this post on Zulip 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?

view this post on Zulip Jean Duteau (May 23 2018 at 15:17):

The DischargeSummaryToFHIR.map has a where condition for the sections that doesn't seem to work

view this post on Zulip Jean Duteau (May 30 2018 at 04:37):

Any update on this?


Last updated: Apr 12 2022 at 19:14 UTC