Stream: cimpl
Topic: Possible include error
Kurt Allen (Jun 24 2019 at 17:32):
I am getting output that doesn't look right. I don't know if it is a bug or a CIMPL user error (:-)).
I derived a class from Composition and am slicing on Section
Entry: BreastRadiologyReport
Parent: Composition
Section
includes PatientHistory 0..1
...
Group: PatientHistory
Description: "Patient History"
Parent: Section
Code[concept] = LOINC#34117-2
When I look at the output StructureDefinition, I don't see any reference to PatientHistory, no slices, nothing.
Is this my error or a possible bug?
I have included the original CIMPL file and the output StructureDefinition json file.
Thanks in advance,
Kurt A.
structuredefinition-xxyyz-BreastRadiologyReport.json BreastRad.txt
Chris Moesel (Jun 24 2019 at 17:51):
Hi @Kurt Allen. Thanks for sending along these details. I think this is an issue with the FHIR mappings for Composition in OBF. I think that the mapping Section maps to section
needs a slicing directive. I haven't had a chance to test it, but try modifying the file obf_foundation_map_r4.txt
. Find this line in the Composition
mapping:
Section maps to section
and change it to:
Section maps to section (slice on = code)
I think that should work, but would appreciate your confirmation (or denial) if you get a chance to try it!
Kurt Allen (Jun 24 2019 at 18:52):
Yo @Chris Moesel
Thanks for the info. I added the slice on code to foundation, and now it adds the slicing discriminator definition to the structure def, but still no references to the actual slices (PatientHistory et all).
I have included the output StructDef.
Gettin' closer!
Kurt A
BreastRad.txt obf_foundation_map_r4.txt structuredefinition-xxyyz-BreastRadiologyReport.json
Chris Moesel (Jun 24 2019 at 19:05):
Hi @Kurt Allen. Oh, right. I forgot that since Section
uses the includes
constraint, you actually need:
Section maps to section (slice on = code; slice strategy = includes)
Again, I think that should work. Sorry I'm unable to test it myself right now... If the above doesn't work, I'll try to get a chance to dig deeper tomorrow.
In future versions of CIMPL, I hope to make stuff like this a lot simpler (and hopefully automagic). But we're not quite there yet.
Kurt Allen (Jun 24 2019 at 19:32):
Hi @Chris Moesel . That did it! Thanks.
Chris Moesel (Jun 24 2019 at 19:50):
Great! @Mark Kramer -- can you update the mapping for OBF Composition
per the above conversation? I think that Kurt is using composition in the expected way for multiple sections, right?
Mark Kramer (Jun 24 2019 at 20:10):
Yes, I can. I'll ping the list when it is promoted to master.
Mark Kramer (Jun 24 2019 at 20:48):
Here's the PR: https://github.com/standardhealth/shr_spec/pull/308. @Kurt Allen can you review the PR and merge it if it seems correct? (this will be a landmark as the first commit at least reviewed by a non-MITRE person... we truly become open source project). On second thought, I'm not sure you have commit rights. Let me know.
Chris Moesel (Jun 24 2019 at 21:51):
Kurt would need to have write access to the project in order to accept and merge a PR. He does not have that. The best he can do is comment on the PR to confirm that he approves it. I think that's the normal model for project consumers to indicate their support of a PR anyway. Then someone on the CIMPL team can merge it.
Kurt Allen (Jun 24 2019 at 23:22):
Hello @Mark Kramer and @Chris Moesel : I downloaded #308 and ran a build of the R4 mappings with my code and all seamed well. The R3 and R2 looked good, but all they got was a visual inspection. Thanks for the quick turnaround...
Last updated: Apr 12 2022 at 19:14 UTC