Stream: implementers
Topic: Patient.identifier slicing
Ross Shnaper (Nov 06 2017 at 02:30):
Hi, I'm trying to slice my Patient.identifier so that a patient shall have 1 identifier used as a health card number and another one as a case record number. I've created the following profile but when attempting to test it with an example, I get an error saying that an element matches more than one slice. I have a hunch that I've somehow configured my slicing incorrectly but I can't find any examples that would be of help. Can anyone please take a look at the excerpt below and let me know what I'm missing?
<element id="Patient.identifier">
<path value="Patient.identifier"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="type"/>
</discriminator>
<rules value="closed"/>
</slicing>
<min value="1"/>
<max value="2"/>
<mustSupport value="true"/>
</element>
<element id="Patient.identifier:hcnIdentifier">
<path value="Patient.identifier"/>
<sliceName value="hcnIdentifier"/>
<short value="A health card number for this patient"/>
<definition value="A health card number for this patient."/>
<min value="1"/>
<max value="1"/>
<mustSupport value="true"/>
<binding>
<strength value="required"/>
<valueSetReference>
<reference value="http://cihi.ca/fhir/irrs/ValueSet/irrs-identifier-type"/>
</valueSetReference>
</binding>
</element>
<element id="Patient.identifier:hcnIdentifier.type">
<path value="Patient.identifier.type"/>
<min value="1"/>
<max value="1"/>
<mustSupport value="true"/>
</element>
<element id="Patient.identifier:hcnIdentifier.type.coding">
<path value="Patient.identifier.type.coding"/>
<min value="1"/>
<max value="1"/>
<mustSupport value="true"/>
</element>
<element id="Patient.identifier:hcnIdentifier.type.coding.code">
<path value="Patient.identifier.type.coding.code"/>
<min value="1"/>
<max value="1"/>
<fixedCode value="JHN"/>
<mustSupport value="true"/>
</element>
<element id="Patient.identifier:crnIdentifier">
<path value="Patient.identifier"/>
<sliceName value="crnIdentifier"/>
<short value="A case record number for this patient"/>
<definition value="A case record number for this patient."/>
<min value="1"/>
<max value="*"/>
<mustSupport value="true"/>
<binding>
<strength value="required"/>
<valueSetReference>
<reference value="http://cihi.ca/fhir/irrs/ValueSet/irrs-identifier-type"/>
</valueSetReference>
</binding>
</element>
<element id="Patient.identifier:crnIdentifier.type">
<path value="Patient.identifier.type"/>
<min value="1"/>
<max value="1"/>
<mustSupport value="true"/>
</element>
<element id="Patient.identifier:crnIdentifier.type.coding">
<path value="Patient.identifier.type.coding"/>
<min value="1"/>
<max value="1"/>
</element>
<element id="Patient.identifier:crnIdentifier.type.coding.code">
<path value="Patient.identifier.type.coding.code"/>
<min value="1"/>
<max value="1"/>
<fixedCode value="MR"/>
</element>
Lloyd McKenzie (Nov 06 2017 at 21:10):
If you're going to declare "type" as your discriminator, then you need to set a fixed value, value set or pattern on type. (In this case, the only thing that makes sense is pattern). Your alternative is to have a discriminator of type.coding.system and type.coding.code, which ought to work with your declared fixed values.
Last updated: Apr 12 2022 at 19:14 UTC