<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="2492f2b6-715a-567d-8e90-20fc5e5d6e11" />
  <meta>
    <lastUpdated value="2024-04-19T13:26:55.782+00:00" />
  </meta>
  <url value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-provider-profile-Observation" />
  <name value="Observation" />
  <status value="draft" />
  <date value="2022-11-30T20:52:26.9430019+00:00" />
  <description value="Measurements and simple assertions made about a patient, device or other subject." />
  <fhirVersion value="3.0.1" />
  <mapping>
    <identity value="OLIS-HL7-v2" />
    <name value="OLIS HL7 v2" />
  </mapping>
  <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" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.id">
      <path value="Observation.id" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.extension">
      <path value="Observation.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Observation.extension:observation-sortKey">
      <path value="Observation.extension" />
      <sliceName value="observation-sortKey" />
      <type>
        <code value="Extension" />
        <profile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-ext-obs-sort-key" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="ZBX.2" />
      </mapping>
    </element>
    <element id="Observation.extension:observation-subID">
      <path value="Observation.extension" />
      <sliceName value="observation-subID" />
      <type>
        <code value="Extension" />
        <profile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-ext-obs-sub-id" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.4" />
      </mapping>
    </element>
    <element id="Observation.extension:note">
      <path value="Observation.extension" />
      <sliceName value="note" />
      <short value="additional note for the observation." />
      <definition value="OLIS may return up to 5 notes" />
      <type>
        <code value="Extension" />
        <profile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-ext-note" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="NTE-ZNT" />
      </mapping>
    </element>
    <element id="Observation.identifier">
      <path value="Observation.identifier" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.identifier.system">
      <path value="Observation.identifier.system" />
      <definition value="Establishes the namespace for the value - that is, a URL that describes a set values that are unique.&#xD;&#xA;&#xD;&#xA;OLIS URI example :  [id-system-local-base] /lab/filler-id-[type]-license-[id]" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBR.3.3/OBR.2.3" />
        <comment value="map to OBR.2.3 for ancillary results only" />
      </mapping>
    </element>
    <element id="Observation.identifier.value">
      <path value="Observation.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBR.3.1/OBR.2.1" />
        <comment value="Map to OBR.2.1 for ancillary results only" />
      </mapping>
    </element>
    <element id="Observation.identifier.assigner">
      <path value="Observation.identifier.assigner" />
      <definition value="Organization that issued/manages the identifier.&#xD;&#xA;&#xD;&#xA;Only assigner name from organization resource will be populated" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-provider-profile-Organization-assigner" />
        <aggregation value="contained" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.identifier.assigner.reference">
      <path value="Observation.identifier.assigner.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.basedOn">
      <path value="Observation.basedOn" />
      <definition value="A plan, proposal or order that is fulfilled in whole or in part by this event.&#xD;&#xA;&#xD;&#xA;OLIS: Observation based on test request" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-provider-profile-ProcedureRequest" />
        <aggregation value="referenced" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.basedOn.reference">
      <path value="Observation.basedOn.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.status">
      <path value="Observation.status" />
      <short value="preliminary | final | amended +" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://ehealthontario.ca/fhir/ValueSet/lab/observation-status" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.11" />
      </mapping>
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <definition value="A code that classifies the general type of observation being made.&#xD;&#xA;&#xD;&#xA;Classification of type of observation. When ancillary information is provided the category needs to be fixed to ‘exam’" />
      <max value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <valueSetReference>
          <reference value="http://ehealthontario.ca/fhir/ValueSet/lab/observation-category" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Observation.category.coding">
      <path value="Observation.category.coding" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.category.coding.system">
      <path value="Observation.category.coding.system" />
      <fixedUri value="http://hl7.org/fhir/STU3/codesystem-observation-category" />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <description value="Observation Category" />
        <valueSetUri value="http://ehealthontario.ca/fhir/ValueSet/lab/observation-category" />
      </binding>
    </element>
    <element id="Observation.category.coding.code">
      <path value="Observation.category.coding.code" />
      <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). OLIS: use 'exam' value for ancillary infromation." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://ehealthontario.ca/fhir/ValueSet/lab/observation-codes" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Observation.code.coding">
      <path value="Observation.code.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.code.coding.system">
      <path value="Observation.code.coding.system" />
      <code>
        <system value="http://loinc.org" />
      </code>
      <definition value="The identification of the code system that defines the meaning of the symbol in the code.&#xD;&#xA;OLIS uses 2 coding systems -LOINC and OLIS temporary codes." />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.3.3" />
      </mapping>
    </element>
    <element id="Observation.code.coding.code">
      <path value="Observation.code.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.3.1" />
      </mapping>
    </element>
    <element id="Observation.code.coding.display">
      <path value="Observation.code.coding.display" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.3.2" />
      </mapping>
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-provider-profile-Patient" />
        <aggregation value="referenced" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.subject.reference">
      <path value="Observation.subject.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.effective[x]:effectiveDateTime">
      <path value="Observation.effectiveDateTime" />
      <sliceName value="effectiveDateTime" />
      <definition value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.&#xD;&#xA;&#xD;&#xA;OLIS: This field must be empty when a laboratory reports a test result. Use this field for ancillary order only." />
      <comment value="Use this field for ancillary order only.&#xD;&#xA;This field must be empty when a laboratory reports a test result." />
      <type>
        <code value="dateTime" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.14.1" />
      </mapping>
    </element>
    <element id="Observation.issued">
      <path value="Observation.issued" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="ZBX.1" />
      </mapping>
    </element>
    <element id="Observation.performer">
      <path value="Observation.performer" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resolve()" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-provider-profile-Practitioner-ordering" />
        <aggregation value="referenced" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-provider-profile-Organization-performing" />
        <aggregation value="referenced" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.performer:performer-organization">
      <path value="Observation.performer" />
      <sliceName value="performer-organization" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-provider-profile-Organization-performing" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="ZBR.6-ZBR.7" />
      </mapping>
    </element>
    <element id="Observation.performer:performer-organization.reference">
      <path value="Observation.performer.reference" />
      <fixedString value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-provider-profile-Organization-performing" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.performer:performer-practitioner">
      <path value="Observation.performer" />
      <sliceName value="performer-practitioner" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-provider-profile-Practitioner-ordering" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="ZBR.6-ZBR.7" />
      </mapping>
    </element>
    <element id="Observation.performer:performer-practitioner.reference">
      <path value="Observation.performer.reference" />
      <fixedString value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-provider-profile-Practitioner-ordering" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <min value="1" />
      <type>
        <code value="Quantity" />
        <profile value="http://ehealthontario.ca/fhir/StructureDefinition/ObservationValueQuantity" />
      </type>
      <type>
        <code value="CodeableConcept" />
      </type>
      <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="Attachment" />
        <profile value="http://ehealthontario.ca/fhir/StructureDefinition/Attachment" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.5, OBX.2" />
        <comment value="Value[x].value maps to OBX.5. Type of value[x] maps to OBX.2. OBX.2=NM maps to valueQuantity, OBX.2=CE maps to valueCodeableConcept, OBX.2=ST maps to valueString, OBX.2=FT, ST or TX maps to valueString, OBX.2=SN maps to valueQuantity (if OBX.5 contains a comparator), or valueRange (if OBX.5 contains '-'') or valueRatio (if OBX.5 contains ':'), OBX.2=TM maps to valueTime, OBX.2=DT or TS maps to valueDateTime, OBX.2=ED maps to valueAttachment" />
      </mapping>
    </element>
    <element id="Observation.interpretation">
      <path value="Observation.interpretation" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <valueSetReference>
          <reference value="http://ehealthontario.ca/fhir/ValueSet/lab/observation-interpretation" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Observation.interpretation.coding">
      <path value="Observation.interpretation.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.interpretation.coding.system">
      <path value="Observation.interpretation.coding.system" />
      <min value="1" />
      <fixedUri value="http://hl7.org/fhir/v2/0078" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.interpretation.coding.code">
      <path value="Observation.interpretation.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.8" />
      </mapping>
    </element>
    <element id="Observation.interpretation.coding.display">
      <path value="Observation.interpretation.coding.display" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.method">
      <path value="Observation.method" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.method.coding">
      <path value="Observation.method.coding" />
      <max value="1" />
    </element>
    <element id="Observation.method.coding.code">
      <path value="Observation.method.coding.code" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.17" />
      </mapping>
    </element>
    <element id="Observation.method.text">
      <path value="Observation.method.text" />
      <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.&#xD;&#xA;&#xD;&#xA;A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).&#xD;&#xA;&#xD;&#xA;OLIS: How the observation has been done&#xD;&#xA;Only 2 values can be used: PCR (Polymerase Chain Reaction) or EIA (Enzyme Immunosorbent Assay)" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.specimen">
      <path value="Observation.specimen" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-provider-profile-Specimen" />
        <aggregation value="contained" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.specimen.reference">
      <path value="Observation.specimen.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange">
      <path value="Observation.referenceRange" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.low">
      <path value="Observation.referenceRange.low" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.low.id">
      <path value="Observation.referenceRange.low.id" />
      <mustSupport value="false" />
    </element>
    <element id="Observation.referenceRange.low.value">
      <path value="Observation.referenceRange.low.value" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.7" />
        <comment value="If OBX.7 does not contain a comparator, leave this blank and map OBX.6 to unit. For numeric values, map to lower limit (when both lower and upper limits are defined, e.g. for Potassium 3.5-4.5) or &gt;lower limit (if no upper limit, e.g. &gt;15)" />
      </mapping>
    </element>
    <element id="Observation.referenceRange.low.unit">
      <path value="Observation.referenceRange.low.unit" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.6" />
      </mapping>
    </element>
    <element id="Observation.referenceRange.high">
      <path value="Observation.referenceRange.high" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.high.id">
      <path value="Observation.referenceRange.high.id" />
      <mustSupport value="false" />
    </element>
    <element id="Observation.referenceRange.high.value">
      <path value="Observation.referenceRange.high.value" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.7" />
        <comment value="If OBX.7 does not contain a comparator, leave this blank and map OBX.6 to unit.  For numeric values, map to upper limit (when both lower and upper limits are defined, e.g. for Potassium 3.5-4.5) or &lt; upper limit (if no lower limit, e.g. &lt;15)" />
      </mapping>
    </element>
    <element id="Observation.referenceRange.high.unit">
      <path value="Observation.referenceRange.high.unit" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.6" />
      </mapping>
    </element>
    <element id="Observation.referenceRange.appliesTo">
      <path value="Observation.referenceRange.appliesTo" />
      <definition value="Codes to indicate the target population this reference range applies to.  For example, a reference range may be based on the normal population or a particular sex or race.&#xD;&#xA;&#xD;&#xA;OLIS can return maximum 3 codes." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.appliesTo.coding">
      <path value="Observation.referenceRange.appliesTo.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.appliesTo.coding.system">
      <path value="Observation.referenceRange.appliesTo.coding.system" />
      <fixedUri value="http://hl7.org/fhir/v2/0080" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.appliesTo.coding.code">
      <path value="Observation.referenceRange.appliesTo.coding.code" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.10" />
      </mapping>
    </element>
    <element id="Observation.referenceRange.appliesTo.coding.display">
      <path value="Observation.referenceRange.appliesTo.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.text">
      <path value="Observation.referenceRange.text" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="OBX.7" />
        <comment value="always map to OBX.7" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>