Stream: implementers
Topic: coding: pattern vs. slice
Michaela Ziegler (Oct 02 2020 at 15:01):
I would like to receive a GTIN code (system = urn:oid:2.51.1.1) for Medication.code, but also allow other codes, e.g. local codes. Therefore I have used the patternCodeableConcept. But if I now set the minimum cardinality of the code itself to 1, the view in the Differential Table does not seem very intuitive to me (see screen shot). Is this as it should be or could it be adapted?
Or should I rather work via a slice? I could also work with a slice, that the code becomes 1..n, because we actually need 0..n.
<element id="Medication.code">
<path value="Medication.code"/>
<min value="1"/>
<patternCodeableConcept>
<coding>
<system value="urn:oid:2.51.1.1"/>
</coding>
</patternCodeableConcept>
</element>
<element id="Medication.code.coding">
<path value="Medication.code.coding"/>
<short value="GTIN code that identify this medication"/>
<mapping>
<identity value="cda"/>
<map value=".code"/>
</mapping>
<mapping>
<identity value="cda"/>
<map value=".pharm:asContent.pharm:containerPackagedMedicine.pharm:code"/>
</mapping>
</element>
<element id="Medication.code.coding.code">
<path value="Medication.code.coding.code"/>
<min value="1"/>
<max value="1"/>
</element>
Grahame Grieve (Oct 02 2020 at 22:07):
I don't think you can (or should) mix pattern and additional rules like that. you'll have to slice coding and use the pattern as a patternCoding on one of them
Robert McClure (Oct 07 2020 at 18:04):
@Michaela Ziegler Can you post what you have done to align with @Grahame Grieve recommendation please? I think this requirement of using a pattern as one slice to require a coding from a specific system, but also allowing other codings is common but not well documented.
Michaela Ziegler (Oct 08 2020 at 11:09):
I did it as with the vital sign observations as a slice on the element coding (and not with the patternCoding). Because I only define the value of the system and I want to define additionally that a code should be given.
Observation BodyHeight
CH EMED Medication
Last updated: Apr 12 2022 at 19:14 UTC