<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-DwObservationClinicalNote" />
  <url value="https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwObservationClinicalNote" />
  <version value="2.0.0" />
  <name value="DwObservationClinicalNote" />
  <status value="active" />
  <date value="2026-05-29" />
  <fhirVersion value="4.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.id">
      <path value="Observation.id" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.meta.lastUpdated">
      <path value="Observation.meta.lastUpdated" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.meta.source">
      <path value="Observation.meta.source" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.meta.security">
      <path value="Observation.meta.security" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.text">
      <path value="Observation.text" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.identifier">
      <path value="Observation.identifier" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.identifier.system">
      <path value="Observation.identifier.system" />
      <comment value="Follow the pattern urn:telus:emr:{emrType}:{emrInstanceId}:clinicalNote or urn:telus:emr:{emrType}:{region}:{emrInstanceId}:clinicalNote" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.status">
      <path value="Observation.status" />
      <comment value="Final when the note is complete; entered-in-error when the note has been deleted and deletions are sent." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <comment value="Usage note: For observation taken from the vist note template use the category.text &quot;progress note&quot;" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.category.text">
      <path value="Observation.category.text" />
      <patternString value="Progress Note" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <comment value="Identifies the note section using a LOINC code, for example 61150-9 Subjective Narrative, 61149-1 Objective Narrative, 51848-0 Assessment, 10164-2 History of Present illness Narrative, 29545-1 Physical findings note, 51847-2 Evaluation + Plan note." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.code.coding">
      <path value="Observation.code.coding" />
      <mustSupport value="true" />
      <binding>
        <strength value="example" />
        <valueSet value="http://hl7.org/fhir/ValueSet/observation-codes" />
      </binding>
    </element>
    <element id="Observation.code.coding.system">
      <path value="Observation.code.coding.system" />
      <fixedUri value="http://loinc.org" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.code.coding.code">
      <path value="Observation.code.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.code.text">
      <path value="Observation.code.text" />
      <comment value="CHR - 10164-2 History&#xD;&#xA;29545-1 Examination&#xD;&#xA;51847-2 Assessment and Plan&#xD;&#xA;55107-7 Addendums" />
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPatient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.encounter">
      <path value="Observation.encounter" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwEncounter" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.performer">
      <path value="Observation.performer" />
      <comment value="Usage note: the clinician who is performing the assessment. If there is doctor and nurse who wrote the note then provide doctor's user id. If no doctor is linked to the note provide the users information.&#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." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitioner" />
        <targetProfile value="https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitionerRole" />
        <targetProfile value="https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwOrganization" />
        <targetProfile value="https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwCareTeam" />
        <targetProfile value="https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPatient" />
      </type>
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <comment value="Usage Note: Actual text documented in the subject, objective and assessment sections of the note. &#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." />
      <type>
        <code value="string" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.note">
      <path value="Observation.note" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.derivedFrom">
      <path value="Observation.derivedFrom" />
      <comment value="Reference to the document reference progress note from which the observation is derived, when one exists." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwDocumentReference" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>