<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-observation-lab-patientchart" />
  <url value="http://telus.com/fhir/patientChart/StructureDefinition/profile-observation-lab" />
  <name value="LabObservation" />
  <title value="Lab Observation" />
  <status value="draft" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="sct-concept" />
    <uri value="http://snomed.info/conceptdomain" />
    <name value="SNOMED CT Concept Domain Binding" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="sct-attr" />
    <uri value="http://snomed.org/attributebinding" />
    <name value="SNOMED CT Attribute Binding" />
  </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" />
      <comment value="Alignment:   There is a profile for Core-CA; no lab observation profile defined in PS-CA o PS-ON (as at July 2022)&#xD;&#xA;&#xD;&#xA;Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as laboratory reports, etc." />
    </element>
    <element id="Observation.id">
      <path value="Observation.id" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.meta">
      <path value="Observation.meta" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.meta.lastUpdated">
      <path value="Observation.meta.lastUpdated" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.meta.source">
      <path value="Observation.meta.source" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.meta.profile">
      <path value="Observation.meta.profile" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.text">
      <path value="Observation.text" />
      <requirements value="DISCUSSION REQUIRED TO CONFIRM" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.identifier">
      <path value="Observation.identifier" />
      <comment value="Usage Note:   This should be populated if known.   This is supported by OLIS" />
    </element>
    <element id="Observation.basedOn">
      <path value="Observation.basedOn" />
      <comment value="Usage Note:   This should be populated if known.   This is mandatory in the OLIS specification&#xD;&#xA;&#xD;&#xA;References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
    </element>
    <element id="Observation.partOf">
      <path value="Observation.partOf" />
      <requirements value="Usage Note:   For now, this is out of scope.  This could be a lab result that is tied to a procedure, however it is very uncommon to have this linkage within the EMR.   eg specimen, observation after the fact is NOT a part of; surgery observations.  &#xD;&#xA;&#xD;&#xA;MA: C3 says yes it is available; Can access it via Task.ID or Problem.ID or Allergy.ID etc. BUT, if done at task level, other non-relavent observations could be captured along with that. (ex: height for diabeties). ie: data is being captured but it could very likely be 'noisy'." />
    </element>
    <element id="Observation.partOf.reference">
      <path value="Observation.partOf.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.partOf.display">
      <path value="Observation.partOf.display" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.status">
      <path value="Observation.status" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <min value="1" />
      <max value="1" />
      <fixedCodeableConcept>
        <text value="laboratory" />
      </fixedCodeableConcept>
      <mustSupport value="true" />
    </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" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.category.coding.code">
      <path value="Observation.category.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.category.coding.display">
      <path value="Observation.category.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.category.text">
      <path value="Observation.category.text" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <comment value="Usage Note:  The sending systems will always send text and where possible will also send a codified value.   These are not always available.   Local codes shoudl be converted to LOINC where possible.     &#xD;&#xA;&#xD;&#xA;EMR API:&#xD;&#xA;LOINC (example)&#xD;&#xA;http://hl7.org/fhir/ValueSet/observation-codes &gt;1000 codes&#xD;&#xA;MA: loinc (most common), ICD-9, snomed,type code, atc class, workload, and no codes as well&#xD;&#xA;PSS:&#xD;&#xA;MS: PCLOCD, ICD-10&#xD;&#xA;&#xD;&#xA;*All* code-value and, if present, component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation." />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
      </binding>
    </element>
    <element id="Observation.code.coding">
      <path value="Observation.code.coding" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.code.coding.system">
      <path value="Observation.code.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.code.coding.code">
      <path value="Observation.code.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.code.coding.display">
      <path value="Observation.code.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.code.text">
      <path value="Observation.code.text" />
      <comment value="Usage Note:   If the lab result is just an OBX, with NTE's, there is no specific code; this must be populated as &quot;lab note&quot;.&#xD;&#xA;&#xD;&#xA;PSS:   Observation Name (text) &#xD;&#xA;&#xD;&#xA;ery often the text is the same as a displayName of one of the codings." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.subject.reference">
      <path value="Observation.subject.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.subject.display">
      <path value="Observation.subject.display" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.encounter">
      <path value="Observation.encounter" />
      <comment value="Usage Note:   In some cases the lab observation can be linked to the encoutner in the EMR.  Example: Prenatal urinalysis results are often linked to an encounter.     &#xD;&#xA;Usage Note DW:  Use of this element may vary by implementation/clent agreements&#xD;&#xA;Usage Note:   This is not in scope for OLIS&#xD;&#xA;&#xD;&#xA;This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission laboratory tests)." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.encounter.reference">
      <path value="Observation.encounter.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.encounter.display">
      <path value="Observation.encounter.display" />
      <comment value="Usage Note:   Use of this data element will vary by implementation.&#xD;&#xA;&#xD;&#xA;This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <comment value="Usage Note:   Manual lab entries always have a date which is the date used; may not distinguish between collection date and observation date&#xD;&#xA;**** Add data absent reason extension as per core&#xD;&#xA;&#xD;&#xA; At least a date should be present unless this observation is a historical report.  For recording imprecise or &quot;fuzzy&quot; times (For example, a blood glucose measurement taken &quot;after breakfast&quot;) use the [Timing](datatypes.html#timing) datatype which allow the measurement to be tied to regular life events." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.performer">
      <path value="Observation.performer" />
      <comment value="Usage Note:   If the name of the performer (eg Lifelabs or Dr. Smith) is known this should be sent.&#xD;&#xA;&#xD;&#xA;References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.performer.display">
      <path value="Observation.performer.display" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <comment value="Usage Rule:  This must be sent where known; it is possible that there are component values but no top level values and therefore this is not mandatory.&#xD;&#xA;Usage Note:   These values must be represented exactly as they are from the source.   eg  Labs may send a string such as &quot;pending&quot;. &#xD;&#xA;Usage Note:    If labs have sent notes associated with the observation, they should be sent as part of the value as a string.   This may be in the OBX or the NTE assocaited with the OBX.   &#xD;&#xA;Alignment:   Core-CA only supports codeableConcept and quantity &#xD;&#xA;&#xD;&#xA;An observation may have; 1)  a single value here, 2)  both a value and a set of related or component values,  or 3)  only a set of related or component values. If a value is present, the datatype for this element should be determined by Observation.code.  A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.  For additional guidance, see the [Notes section](observation.html#notes) below." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.dataAbsentReason">
      <path value="Observation.dataAbsentReason" />
      <comment value="Usage Note:    A value of &quot;temp-unknown&quot; may be used for pending results in the EMR (status=registered).   This could occur with a panel that has returned some final results with others that are showing as outstanding&#xD;&#xA;&#xD;&#xA;Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  &quot;detected&quot;, &quot;not detected&quot;, &quot;inconclusive&quot;, or  &quot;specimen unsatisfactory&quot;.   &#xA;&#xA;The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code &quot;error&quot; could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when &gt; 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.dataAbsentReason.text">
      <path value="Observation.dataAbsentReason.text" />
      <comment value="Usage Note:   This should be populated with the value from the lab as stored in the EMR, eg &quot;pending&quot; when a data absent reason of &quot;temp-unknown&quot; is used&#xD;&#xA;&#xD;&#xA;Very often the text is the same as a displayName of one of the codings." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.interpretation">
      <path value="Observation.interpretation" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.interpretation.coding">
      <path value="Observation.interpretation.coding" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.interpretation.coding.system">
      <path value="Observation.interpretation.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.interpretation.coding.code">
      <path value="Observation.interpretation.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.interpretation.text">
      <path value="Observation.interpretation.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.note">
      <path value="Observation.note" />
      <comment value="Usage Note:   Annotations added by the clinician.   Notes from the lab are conveyed as separate observations&#xD;&#xA;&#xD;&#xA;May include general statements about the observation, or statements about significant, unexpected or unreliable results values, or information about its source when relevant to its interpretation." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.note.author[x]">
      <path value="Observation.note.author[x]" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.note.time">
      <path value="Observation.note.time" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.note.text">
      <path value="Observation.note.text" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.method">
      <path value="Observation.method" />
      <comment value="Usage Note:  If present in the lab result this will be passed on as is.&#xD;&#xA;&#xD;&#xA;Only used if not implicit in code for Observation.code." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.method.coding">
      <path value="Observation.method.coding" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.method.text">
      <path value="Observation.method.text" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.specimen">
      <path value="Observation.specimen" />
      <comment value="Usage Note:   This is not supported today in the EMR's; if labs begin to send results in FHIR, this may come into scope in the future&#xD;&#xA;&#xD;&#xA;Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report)." />
    </element>
    <element id="Observation.referenceRange">
      <path value="Observation.referenceRange" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.low">
      <path value="Observation.referenceRange.low" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.high">
      <path value="Observation.referenceRange.high" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.appliesTo">
      <path value="Observation.referenceRange.appliesTo" />
      <comment value="Usage Note:   This will be present if received from the lab and if stored in the EMR&#xD;&#xA;&#xD;&#xA;This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.appliesTo.coding">
      <path value="Observation.referenceRange.appliesTo.coding" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.appliesTo.coding.system">
      <path value="Observation.referenceRange.appliesTo.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.appliesTo.coding.code">
      <path value="Observation.referenceRange.appliesTo.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.appliesTo.coding.display">
      <path value="Observation.referenceRange.appliesTo.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.appliesTo.text">
      <path value="Observation.referenceRange.appliesTo.text" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.referenceRange.text">
      <path value="Observation.referenceRange.text" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.hasMember">
      <path value="Observation.hasMember" />
      <comment value="Usage Note:  This is not in scope for OLIS; this is in scope for IPS&#xD;&#xA;Usage:   PSS:   Looked at an example to see if this is used (OBX-4 relationship) and cannot determine this relationship&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When using this element, an observation will typically have either a value or a set of related resources, although both may be present in some cases.  For a discussion on the ways Observations can assembled in groups together, see [Notes](observation.html#obsgrouping) below.  Note that a system may calculate results from [QuestionnaireResponse](questionnaireresponse.html)  into a final score and represent the score as an Observation." />
    </element>
    <element id="Observation.derivedFrom">
      <path value="Observation.derivedFrom" />
      <comment value="Usage Note:   This may be considered for future use as it is rare that a physician/EMR would link observations back to the original document.&#xD;&#xA;&#xD;&#xA;All the reference choices that are listed in this element can represent clinical observations and other measurements that may be the source for a derived value.  The most common reference will be another Observation.  For a discussion on the ways Observations can assembled in groups together, see [Notes](observation.html#obsgrouping) below." />
    </element>
    <element id="Observation.component">
      <path value="Observation.component" />
      <comment value="Discussion required:   May be some linking in MedAccess.  &#xD;&#xA;Usage Note:   This is not supported by OLIS&#xD;&#xA;&#xD;&#xA;For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.code">
      <path value="Observation.component.code" />
      <comment value="Example from MA:&#xD;&#xA;&lt;OBX.3&gt;&#xD;&#xA;&lt;CE.1&gt;6690-2&lt;/CE.1&gt;&#xD;&#xA;&lt;CE.2&gt;WBC&lt;/CE.2&gt;&#xD;&#xA;&lt;CE.3/&gt;&#xD;&#xA;&lt;CE.4/&gt;&#xD;&#xA;&lt;CE.5/&gt;&#xD;&#xA;&lt;CE.6/&gt;&#xD;&#xA;&lt;/OBX.3&gt;&#xD;&#xA;*All* code-value and  component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.code.coding">
      <path value="Observation.component.code.coding" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.code.coding.system">
      <path value="Observation.component.code.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.code.coding.code">
      <path value="Observation.component.code.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.code.coding.display">
      <path value="Observation.component.code.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.code.text">
      <path value="Observation.component.code.text" />
      <comment value="Conformance:   This must be present when known&#xD;&#xA;&#xD;&#xA;Very often the text is the same as a displayName of one of the codings." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.interpretation">
      <path value="Observation.component.interpretation" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.interpretation.coding">
      <path value="Observation.component.interpretation.coding" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.interpretation.text">
      <path value="Observation.component.interpretation.text" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.referenceRange">
      <path value="Observation.component.referenceRange" />
      <comment value="MA:  Display range, lower range, upper range.       What is the display range?  Do we share this?   If YES we need an extension.   Definitiion:  the range that you want to set as a ideal/base reference&#xD;&#xA;&#xD;&#xA;Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties." />
      <contentReference value="http://hl7.org/fhir/StructureDefinition/Observation#Observation.referenceRange" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.referenceRange.low">
      <path value="Observation.component.referenceRange.low" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.referenceRange.high">
      <path value="Observation.component.referenceRange.high" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.referenceRange.text">
      <path value="Observation.component.referenceRange.text" />
      <comment value="MA:   Andrew, do we support this?&#xD;&#xA;&#xD;&#xA;Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>