Stream: implementers
Topic: fhirpath as discriminator
Katarina (Dec 13 2019 at 12:45):
Hi, how can I discriminate a Bundle.entry based on the type of the resource?
<type value="profile"/>
<path value="resolve()"/>
and
<type value="profile"/>
<path value="resource.meta.profile"/>
does not work.
Oliver Egger (Dec 13 2019 at 12:52):
try the following approach, use resource for the path:
<element id="Bundle.entry"> <path value="Bundle.entry" /> <slicing> <discriminator> <type value="profile" /> <path value="resource" /> </discriminator> <rules value="open" /> </slicing> </element> <element id="Bundle.entry:Composition"> <path value="Bundle.entry" /> <sliceName value="Composition" /> <short value="Composition" /> <min value="1" /> <max value="1" /> </element> <element id="Bundle.entry:Composition.resource"> <path value="Bundle.entry.resource" /> <min value="1" /> <type> <code value="Composition" /> <profile value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-composition" /> </type> </element>
Katarina (Dec 13 2019 at 13:11):
Thanks, that works.
Last updated: Apr 12 2022 at 19:14 UTC