FHIR Chat · error - has children and multiple types · IG creation

Stream: IG creation

Topic: error - has children and multiple types


view this post on Zulip Sean McIlvenna (Aug 13 2018 at 22:33):

I'm getting an error from the IG Publisher:
Observation.valueQuantity has children (Observation.valueQuantity.value) and multiple types (Quantity, CodeableConcept, string, boolean, Range, Ratio, SampledData, Attachment, time, dateTime, Period) in profile BloodPressureObservation.valueQuantity

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 22:33):

Any idea how to fix this?

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 22:34):

I've tried restricting the <type> on valueQuantity to just "Quantity"

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 22:34):

but that didn't help

view this post on Zulip Lloyd McKenzie (Aug 13 2018 at 22:50):

I think you need to first slice on type, then constrain your slice.

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 22:51):

this is what I have

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 22:51):

<element id="value[x]">
  <path value="Observation.value[x]"/>
  <slicing>
    <discriminator>
      <type value="value"/>
      <path value="@type"/>
    </discriminator>
    <rules value="open"/>
  </slicing>
  <short value="value[x]"/>
  <definition
    value="SHALL contain exactly one [1..1] value[x], where value[x] is (CONF:4383-273)"/>
  <min value="1"/>
  <max value="1"/>
</element>
<element id="value[x].valueQuantity:quantity">
  <path value="Observation.valueQuantity"/>
  <sliceName value="quantity" />
  <short value="valueQuantity"/>
  <definition value="valueQuantity (CONF:4383-274)"/>
  <type>
    <code value="Quantity" />
  </type>
</element>
<element id="value[x].valueQuantity:quantity.value">
  <path value="Observation.valueQuantity.value"/>
  <sliceName value="quantity" />
  <short value="value"/>
  <definition value="SHALL contain exactly one [1..1] value (CONF:4383-281)."/>
  <min value="1"/>
  <max value="1"/>
</element>
<element id="value[x].valueQuantity:quantity.unit">
  <sliceName value="quantity" />
  <path value="Observation.valueQuantity.unit"/>
  <short value="unit"/>
  <definition value="SHALL contain exactly one [1..1] unit (CONF:4383-282)."/>
  <min value="1"/>
  <max value="1"/>
</element>

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 22:52):

still gives that error...

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 22:53):

regardless of whether I put <type> on value[x] or value[x].valueQuantity

view this post on Zulip Lloyd McKenzie (Aug 13 2018 at 22:53):

Why are you slicing by value?

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 22:53):

oh.. i see what you mean

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 22:53):

ok, good point. I'll try to change that

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 22:57):

ok. changed it to slice by "type" with path "$this"

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 22:57):

same error

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 23:01):

I keep trying different variations, and nothing is working... =/

view this post on Zulip Sean McIlvenna (Aug 13 2018 at 23:01):

just trying to figure out how to require .value and .unit on a valueQuantity in an Observation...

view this post on Zulip Lloyd McKenzie (Aug 13 2018 at 23:03):

What happens in the vital signs profiles?

view this post on Zulip Eric Haas (Aug 14 2018 at 00:00):

I do not think you are able to slice by anything other that value in the spreadsheets.

view this post on Zulip Lloyd McKenzie (Aug 14 2018 at 00:04):

You can slice by anything in the spreadsheets. Just append .@type, .@pattern, etc. to your discriminator

view this post on Zulip Grahame Grieve (Aug 14 2018 at 06:02):

is this sorted?

view this post on Zulip Sean McIlvenna (Aug 14 2018 at 21:48):

I believe this is a bug in the older version of the ig publisher that I was using... now I'm getting different errors, having downloaded the latest ig publisher

view this post on Zulip Sean McIlvenna (Aug 14 2018 at 21:48):

will confirm once I know for sure


Last updated: Apr 12 2022 at 19:14 UTC