FHIR Chat · How to slice an Observation.value[x] · IG creation

Stream: IG creation

Topic: How to slice an Observation.value[x]


view this post on Zulip Brian Reinhold (Nov 26 2018 at 22:54):

I have two possibilities for the Observation.value[x], a valueDateTime or valueQuantity. One or the other. How can I do this? Everything I try gives me the same error I always get whenever I try to slice ...

Observation.valueDateTime   error   Profile http://hl7.org/fhir/uv/phd/StructureDefinition/PhdCoincidentTimeStampObservation,
Element matches more than one slice - , wallClockTime

Here is my attempt

    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Time line of PHD. Absent if a time fault; dataAbsentReason will have 'unknown'" />
      <definition value="The current time reported by the PHD unless there is a time fault in which case this element is absent and the dataAbsentReason indicates 'unknown'" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <type>
        <code value="Quantity" />
      </type>
    </element>

    <!-- Wall clock time -->
    <element id="Observation.value[x]:wallClockTime">
      <path value="Observation.valueDateTime" />
      <sliceName value="wallClockTime" />
      <short value="Value when PHD reports an absolute or base offset time." />
      <definition value="This reports the current time of the PHD when the real time clock uses either absolute time or base offset time" />
      <type>
        <code value="dateTime" />
      </type>
    </element>

    <!-- Relative time -->
    <element id="Observation.value[x]:relativeTime">
      <path value="Observation.valueQuantity" />
      <sliceName value="relativeTime" />
      <short value="Value when PHD reports a relative type of time." />
      <type>
        <code value="Quantity" />
      </type>
    </element>
    <element id="Observation.value[x]:relativeTime.valueQuantity.value">
      <path value="Observation.valueQuantity.value" />
      <definition value="The current relative or high resolution relative time reported by the PHD scaled to units of microseconds." />
      <min value="1" />
    </element>
    <element id="Observation.value[x]:relativeTime.valueQuantity.system">
      <path value="Observation.valueQuantity.system" />
      <definition value="Identifies the UCUM coding system" />
      <min value="1" />
      <fixedUri value="http://unitsofmeasure.org" />
    </element>
    <element id="Observation.value[x]:relativeTime.valueQuantity.code">
      <path value="Observation.valueQuantity.code" />
      <definition value="The UCUM code for microseconds which is 'us'." />
      <comment value="The MDC code is translated to UCUM." />
      <min value="1" />
      <fixedCode value="us" />
    </element>

Last updated: Apr 12 2022 at 19:14 UTC