<StructureDefinition xmlns="http://hl7.org/fhir">
  <meta>
    <versionId value="1" />
    <lastUpdated value="2018-03-08T16:05:00.196+00:00" />
  </meta>
  <url value="http://hl7.org/fhir/ips/StructureDefinition/observation-laboratory-uv-ips" />
  <version value="0.2" />
  <name value="Observation-laboratory-uv-ips" />
  <title value="Observation (laboratory result)" />
  <status value="draft" />
  <experimental value="true" />
  <date value="2018-03-09" />
  <publisher value="HL7 International" />
  <contact>
    <name value="François Macary - Phast" />
  </contact>
  <description value="This profile constrains the Observation resource to represent results produced by laboratory tests or panels/studies in a patient summary" />
  <purpose value="This profile constrains the Observation resource to represent a laboratory in vitro diagnostic test or panel/study. In case of a panel/study, the results of the panel appear as sub-observations. In this case this top-level Observation acts as a grouper of all the observations belonging to the panel or study.  The top-level observation may carry a conclusion in the value element and or a global interpretation by the producer of the study, in the comment element." />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Observation" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation">
      <path value="Observation" />
      <short value="Laboratory result for a simple test or for a panel/study" />
      <definition value="This observation may represent the result of a simple laboratory test such as hematocrit or it may group the set of results produced by a multi-test study or panel such as a complete blood count, a dynamic function test, a urine specimen study. In the latter case, the observation carries the overall conclusion of the study and references the atomic results of the study  as &quot;has-member&quot; child observations" />
      <comment value="Represents either a lab simple observation or the group of observations produced by a laboratory study." />
    </element>
    <element id="Observation.basedOn">
      <path value="Observation.basedOn" />
      <max value="0" />
    </element>
    <element id="Observation.status">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint">
        <valueString value="default: final" />
      </extension>
      <path value="Observation.status" />
      <definition value="The status of the result value. Only final results feed patient summaries." />
      <fixedCode value="final" />
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <definition value="A code that classifies the general type of observation being made. In this profile, fixed to &quot;laboratory&quot;." />
      <comment value="&quot;laboratory&quot; includes laboratory medicine and pathology" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <definition value="Describes what was observed. Sometimes this is called the observation &quot;name&quot;.  In this profile this code represents either a simple laboratory test or a laboratory study with multiple child observations" />
      <comment value="In the context of this Observation-laboratory-uv-ips profile, when the observation plays the role of a grouper of member sub-observations, the code represent the group (for instance a panel code). In case no code is available, at least a text shall be provided." />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ObservationCode" />
        </extension>
        <strength value="extensible" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ips/ValueSet/laboratory-tests-and-panels" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <aggregation value="referenced" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.subject.identifier">
      <path value="Observation.subject.identifier" />
      <max value="0" />
    </element>
    <element id="Observation.context.identifier">
      <path value="Observation.context.identifier" />
      <max value="0" />
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.performer">
      <path value="Observation.performer" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <aggregation value="referenced" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <aggregation value="referenced" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/ips/StructureDefinition/organization-laboratory-uv-ips" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.performer.identifier">
      <path value="Observation.performer.identifier" />
      <max value="0" />
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <type>
        <code value="string" />
      </type>
      <type>
        <code value="Range" />
      </type>
      <type>
        <code value="Ratio" />
      </type>
      <type>
        <code value="time" />
      </type>
      <type>
        <code value="dateTime" />
      </type>
      <type>
        <code value="Period" />
      </type>
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <type>
        <code value="Quantity" />
        <profile value="http://hl7.org/fhir/ips/StructureDefinition/Quantity-uv-ips" />
      </type>
      <condition value="value" />
      <constraint>
        <key value="val-1" />
        <severity value="error" />
        <human value="if no &quot;related&quot; element is present then Observation must have a&quot; value&quot;" />
        <expression value="hasValue() or related.exists" />
      </constraint>
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ips/ValueSet/lab-result-coded-value-uv-ips" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Observation.dataAbsentReason">
      <path value="Observation.dataAbsentReason" />
      <max value="0" />
    </element>
    <element id="Observation.interpretation.coding">
      <path value="Observation.interpretation.coding" />
      <type>
        <code value="Coding" />
        <profile value="http://hl7.org/fhir/ips/StructureDefinition/coding-uv-ips" />
      </type>
    </element>
    <element id="Observation.bodySite">
      <path value="Observation.bodySite" />
      <max value="0" />
    </element>
    <element id="Observation.method.coding">
      <path value="Observation.method.coding" />
      <type>
        <code value="Coding" />
        <profile value="http://hl7.org/fhir/ips/StructureDefinition/coding-uv-ips" />
      </type>
    </element>
    <element id="Observation.specimen">
      <path value="Observation.specimen" />
      <comment value="The specimen is often implied by the observation code. &#xD;&#xA;In the context of this Observation-laboratory-uv-ips profile, specimen should be provided only when it is not implied by the Observation.code, and when further information about the specimen needs to be captured (such as specimen source body site). &#xD;&#xA;In case of a laboratory panel/study using a single specimen , which needs  further description (like a CSF microbiology study), the specimen is introduced by this element.&#xD;&#xA;In case of a dynamic function test using multiple specimens, each specimen shall be further described, if needed, within the sub-observation that was produced on this specimen." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/ips/StructureDefinition/specimen-uv-ips" />
      </type>
    </element>
    <element id="Observation.specimen.identifier">
      <path value="Observation.specimen.identifier" />
      <max value="0" />
    </element>
    <element id="Observation.device.identifier">
      <path value="Observation.device.identifier" />
      <max value="0" />
    </element>
    <element id="Observation.referenceRange.type">
      <path value="Observation.referenceRange.type" />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.related">
      <path value="Observation.related" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="type" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <definition value="A  reference to another Observation profiled by observation-member-laboratory-uv-ips. The target observation is considered as a sub-observation of the current one, which plays the role of a grouper" />
      <comment value="This element is used in the context of  international patient summary when there is a need to group a collection of observations, because they belong to the same panel, or because they share a common interpretation comment, or a common media attachment (illustrative image or graph). In these cases, the current observation profiled as observation-laboratory-uv-trillium2 is the grouper, and its set of sub-observations are related observations  using the type &quot;has-member&quot; and the profile observation-member-laboratory-uv-ips." />
    </element>
    <element id="Observation.related.type">
      <path value="Observation.related.type" />
      <short value="has-member: the related observation is a sub-observation of the current one, which acts as a grouper" />
      <definition value="A code specifying the kind of relationship that exists with the target resource.&#xD;&#xA;The only authorized value in this profile is &quot;has-member&quot;" />
      <min value="1" />
      <fixedCode value="has-member" />
    </element>
    <element id="Observation.related:sub-observation">
      <path value="Observation.related" />
      <sliceName value="sub-observation" />
      <short value="sub-observation member of this observation" />
      <definition value="A  reference to an Observation resource playing the role of sub-observation of the current one. For instance an individial test member of a panel." />
      <comment value="For a discussion on the ways Observations can be assembled in groups together see [Notes below](observation.html#4.20.4)." />
    </element>
    <element id="Observation.related:sub-observation.type">
      <path value="Observation.related.type" />
      <definition value="Fixed to has-member, introducing a sub-observation (observation member of the current one)" />
      <min value="1" />
      <fixedCode value="has-member" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.related:sub-observation.target">
      <path value="Observation.related.target" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/ips/StructureDefinition/observation-member-laboratory-uv-ips" />
      </type>
    </element>
    <element id="Observation.related:sub-observation.target.identifier">
      <path value="Observation.related.target.identifier" />
      <max value="0" />
    </element>
    <element id="Observation.related:attachment">
      <path value="Observation.related" />
      <sliceName value="attachment" />
      <short value="attachment associated to this observation" />
      <definition value="A  reference to another Observation, which is constrained to valueAttachment, in order to convey an illustrative media content." />
    </element>
    <element id="Observation.related:attachment.type">
      <path value="Observation.related.type" />
      <definition value="fixed to derived-from, to introduce the attachment linked to the observation." />
      <min value="1" />
      <fixedCode value="derived-from" />
    </element>
    <element id="Observation.related:attachment.target">
      <path value="Observation.related.target" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/ips/StructureDefinition/observation-attachment-uv-ips" />
      </type>
    </element>
    <element id="Observation.related:attachment.target.identifier">
      <path value="Observation.related.target.identifier" />
      <max value="0" />
    </element>
    <element id="Observation.component">
      <path value="Observation.component" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>