<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="Observation-results-pathology-uv-ips" />
  <url value="http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-pathology-uv-ips" />
  <name value="ObservationResultsPathologyUvIps" />
  <title value="Observation Results: pathology (IPS)" />
  <status value="active" />
  <experimental value="false" />
  <publisher value="HL7 International" />
  <description value="This profile constrains the Observation resource to represent results produced by pathology studies in a patient summary." />
  <purpose value="This profile constrains the Observation resource to represent a pathology in vitro study. In case of a multiple-observation study, the results of the study appear as sub-observations. In this case this top-level Observation acts as a grouper of all the observations belonging to the 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="Pathology result for a simple test or for a panel/study" />
      <definition value="This observation may represent the result of a simple pathology 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 pathology 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." />
      <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/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ObservationCode" />
        </extension>
        <strength value="extensible" />
        <valueSet value="http://hl7.org/fhir/uv/ips/ValueSet/results-pathology-observations-uv-ips" />
      </binding>
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <definition value="The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed.  Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.&#xD;&#xA;&#xD;&#xA;In this profile is constrained to the patient" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips" />
      </type>
      <mustSupport value="true" />
    </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>
        <strength value="preferred" />
        <valueSet value="http://hl7.org/fhir/uv/ips/ValueSet/result-coded-value-pathology-uv-ips" />
      </binding>
    </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.hasMember">
      <path value="Observation.hasMember" />
      <definition value="A reference to another Observation profiled by Observation-results-pathology-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 is the grouper, and its set of sub-observations are related observations using the type &quot;has-member&quot;." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-pathology-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>