Stream: IG creation
Topic: slicing not rendered when inheriting
Brian Reinhold (Sep 18 2018 at 11:41):
I have come across an issue with rendering component elements when I have an Observation that inherits a BaseObservation. The rendering is done fine in the BaseObservation.
The component element is sliced in the BaseObservation. Then in each slice, the component.code.coding element is sliced. In the Observation, additional components are defined following the slicing in the BaseObservation. Then, in each defined component in the Observation, the component.code.coding element is once again sliced. It is the latter which does NOT get rendered in the Observation, but DOES get rendered in the BaseObservation. All I get in the observation is code 1..1 CodeableConcept. The value[x] rendering is fine in both cases.
Here is my slicing definition in the BaseObservation
<!-- COMPONENT --> <element id="Observation.component"> <path value="Observation.component" /> <slicing> <discriminator> <type value="value" /> <path value="code.coding.code" /> </discriminator> <rules value="open" /> </slicing> </element>
And here is the first component slice defined in the BaseObservation and the slicing on the coding element:
<!-- SUPPLEMENTAL TYPES COMPONENT --> <element id="Observation.component:supplementalTypesComponent"> <path value="Observation.component" /> <sliceName value="supplementalTypesComponent" /> </element> <element id="Observation.component:supplementalTypesComponent.code.coding"> <path value="Observation.component.code.coding" /> <slicing> <discriminator> <type value="value" /> <path value="system" /> </discriminator> <rules value="open" /> </slicing> <min value="1" /> </element> <element id="Observation.component:supplementalTypesComponent.code.coding:MDCType"> <path value="Observation.component.code.coding" /> <sliceName value="MDCType" /> <min value="1" /> <max value="1" /> </element> <element id="Observation.component:supplementalTypesComponent.code.coding:MDCType.system"> <path value="Observation.component.code.coding.system" /> <min value="1" /> <fixedUri value="urn:iso:std:iso:11073:10101" /> </element>
This is rendered fine. (I do have the coding.code element as well but removed it for brevity.)
Now in my Observation an additional component element is as follows
<!-- ACCURACY COMPONENT --> <element id="Observation.component:accuracyComponent"> <path value="Observation.component" /> <sliceName value="accuracyComponent" /> <max value="1" /> </element> <element id="Observation.component:accuracyComponent.code.coding"> <path value="Observation.component.code.coding" /> <slicing> <discriminator> <type value="value" /> <path value="system" /> </discriminator> <rules value="open" /> </slicing> <min value="1" /> </element> <element id="Observation.component:accuracyComponent.code.coding:MDCType"> <path value="Observation.component.code.coding" /> <sliceName value="MDCType" /> <min value="1" /> <max value="1" /> </element> <element id="Observation.component:accuracyComponent.code.coding:MDCType.system"> <path value="Observation.component.code.coding.system" /> <min value="1" /> <fixedUri value="urn:iso:std:iso:11073:10101" /> </element>
(I do have the coding.code element as well but removed it for brevity.)
The Observation component does get rendered but not the slicing on the component.code.coding
All I get is
component.code 1..1 CodeableConcept.
No slicing. I've searched for typos, compared elements between the two files and I cannot find anything wrong. Not to say that there isn't. After a while looking at all that xml just makes one spin!
Lloyd McKenzie (Sep 18 2018 at 15:03):
You may be hitting an issue because you haven't defined Observation.component:accuracyComponent.code. The tools don't handle "sparse" differentials well.
Brian Reinhold (Sep 18 2018 at 15:24):
You may be hitting an issue because you haven't defined Observation.component:accuracyComponent.code. The tools don't handle "sparse" differentials well.
@Lloyd McKenzie I have defined the code. Its in the next element after the system (in both the Base and one that inherits). I noted that in the text below the struct definition sections. The next element (that I had omitted) is
<element id="Observation.component:accuracyComponent.code.coding:MDCType.code"> <path value="Observation.component.code.coding.code" /> <definition value="The code for the Accuracy attribute is 67914" /> <min value="1" /> <fixedCode value="67914" /> <binding> <strength value="required"/> <valueSet value="http://hl7.org/fhir/uv/pocd/ValueSet/11073MDC-object"/> </binding> </element>
Lloyd McKenzie (Sep 18 2018 at 15:29):
I'm not seeing an element with the id Observation.component:accuracyComponent.code
Last updated: Apr 12 2022 at 19:14 UTC