<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="Observation-results-laboratory-uv-ips" />
  <url value="http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-laboratory-uv-ips" />
  <name value="ObservationResultsLaboratoryUvIps" />
  <title value="Observation Results: laboratory (IPS)" />
  <status value="active" />
  <experimental value="false" />
  <publisher value="HL7 International" />
  <description value="This profile constrains the Observation resource to represent results produced by laboratory tests or panels/studies in a patient summary.&#xD;&#xA;&#xD;&#xA;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 or a global interpretation by the producer of the study, in the comment element; and references the atomic results of the study as &quot;has-member&quot; child observations.&#xD;&#xA;" />
  <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." />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-uv-ips" />
  <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." />
      <constraint>
        <key value="ips-2" />
        <severity value="error" />
        <human value="if no &quot;hasMember&quot; element is present then Observation must have a&quot; value&quot;" />
        <expression value="value.exists() or hasMember.exists()" />
      </constraint>
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <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" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
    </element>
    <element id="Observation.category:laboratory">
      <path value="Observation.category" />
      <sliceName value="laboratory" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/observation-category" />
          <code value="laboratory" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </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." />
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ObservationCode" />
        </extension>
        <strength value="preferred" />
        <valueSet value="http://hl7.org/fhir/uv/ips/ValueSet/results-laboratory-observations-uv-ips" />
      </binding>
    </element>
    <element id="Observation.performer">
      <path value="Observation.performer" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Practitioner-uv-ips" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/PractitionerRole-uv-ips" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Organization-uv-ips" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CareTeam" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="closed" />
      </slicing>
      <mustSupport value="true" />
    </element>
    <element id="Observation.value[x]:valueString">
      <path value="Observation.value[x]" />
      <sliceName value="valueString" />
      <type>
        <code value="string" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.value[x]:valueRange">
      <path value="Observation.value[x]" />
      <sliceName value="valueRange" />
      <type>
        <code value="Range" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Range-uv-ips" />
      </type>
    </element>
    <element id="Observation.value[x]:valueRatio">
      <path value="Observation.value[x]" />
      <sliceName value="valueRatio" />
      <type>
        <code value="Ratio" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Ratio-uv-ips" />
      </type>
    </element>
    <element id="Observation.value[x]:valueTime">
      <path value="Observation.value[x]" />
      <sliceName value="valueTime" />
      <type>
        <code value="time" />
      </type>
    </element>
    <element id="Observation.value[x]:valueDateTime">
      <path value="Observation.value[x]" />
      <sliceName value="valueDateTime" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="Observation.value[x]:valuePeriod">
      <path value="Observation.value[x]" />
      <sliceName value="valuePeriod" />
      <type>
        <code value="Period" />
      </type>
    </element>
    <element id="Observation.value[x]:valueQuantity">
      <path value="Observation.value[x]" />
      <sliceName value="valueQuantity" />
      <type>
        <code value="Quantity" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Quantity-uv-ips" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.value[x]:valueCodeableConcept">
      <path value="Observation.value[x]" />
      <sliceName value="valueCodeableConcept" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://hl7.org/fhir/uv/ips/ValueSet/results-blood-group-snomed-ct-ips-free-set" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Additional conformance binding to a blood group findings value set for laboratory result values from the SNOMED CT IPS free set for use globally (in SNOMED member and non-member jurisdictions)." />
          </extension>
        </extension>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://hl7.org/fhir/uv/ips/ValueSet/results-presence-absence-snomed-ct-ips-free-set" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Additional conformance binding to a presence and absence findings (qualifier values) value set for laboratory result values from the SNOMED CT IPS free set for use globally (in SNOMED member and non-member jurisdictions)." />
          </extension>
        </extension>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://hl7.org/fhir/uv/ips/ValueSet/results-microorganism-snomed-ct-ips-free-set" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Additional conformance binding to a microorganisms value set for laboratory result values from the SNOMED CT IPS free set for use globally (in SNOMED member and non-member jurisdictions)." />
          </extension>
        </extension>
        <strength value="preferred" />
        <valueSet value="http://hl7.org/fhir/uv/ips/ValueSet/results-coded-values-laboratory-uv-ips" />
      </binding>
    </element>
    <element id="Observation.interpretation">
      <path value="Observation.interpretation" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
    </element>
    <element id="Observation.specimen">
      <path value="Observation.specimen" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Specimen-uv-ips" />
      </type>
    </element>
    <element id="Observation.referenceRange">
      <path value="Observation.referenceRange" />
    </element>
    <element id="Observation.hasMember">
      <path value="Observation.hasMember" />
      <definition value="A reference to another Observation profiled by Observation-results-laboratory-uv-ips. The target observation (for instance an individual test member of a panel) 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 is the grouper, and its set of sub-observations are related observations using the type &quot;has-member&quot;.  For a discussion on the ways Observations can be assembled in groups together see [Observation Grouping](http://hl7.org/fhir/observation.html#obsgrouping)." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-laboratory-uv-ips" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-uv-ips" />
      </type>
    </element>
    <element id="Observation.hasMember.reference">
      <path value="Observation.hasMember.reference" />
    </element>
  </differential>
</StructureDefinition>