<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://telus.com/fhir/patientChart/StructureDefinition/profile-encounter" />
  <name value="Encounter" />
  <status value="draft" />
  <date value="2022-06-16T19:15:04.6499186+00:00" />
  <description value="This profile is closely aligned with the TELUS DW profile" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Encounter" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Encounter" />
  <derivation value="constraint" />
  <differential>
    <element id="Encounter.id">
      <path value="Encounter.id" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.meta">
      <path value="Encounter.meta" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.meta.lastUpdated">
      <path value="Encounter.meta.lastUpdated" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.meta.source">
      <path value="Encounter.meta.source" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.meta.profile">
      <path value="Encounter.meta.profile" />
      <comment value="Usage:   This will be determined by each implementation project.   This may be useful for validating a message instance against this profile.&#xD;&#xA;&#xD;&#xA;It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set." />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.text">
      <path value="Encounter.text" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.text.status">
      <path value="Encounter.text.status" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.text.div">
      <path value="Encounter.text.div" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.identifier">
      <path value="Encounter.identifier" />
      <comment value="Usage Note:   This must be sent where available; Most EMRs have a mapping to a business identifier&#xD;&#xA;&#xD;&#xA;MA:   Mapping - chainID" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.identifier.system">
      <path value="Encounter.identifier.system" />
      <comment value="urn:telus:emr:&lt;emrType&gt;:&lt;emrInstance&gt;:encounter&#xD;&#xA;&#xD;&#xA;Identifier.system is always case sensitive." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.identifier.value">
      <path value="Encounter.identifier.value" />
      <comment value="Usage note: Internal primary id for this table &#xD;&#xA;&#xD;&#xA;If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.status">
      <path value="Encounter.status" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.class">
      <path value="Encounter.class" />
      <comment value="Usage note:    If sending applicaitons are able to find it use the mapping below. If NOT then default to AMB&#xD;&#xA;&#xD;&#xA;EMR ---&gt; FHIR &#xD;&#xA;Clinic Visit ----&gt; AMB&#xD;&#xA;Virtual Visit -----&gt; VR&#xD;&#xA;Home visit/Nursing Home---&gt; HH&#xD;&#xA;Mobile clinics---&gt;FLD&#xD;&#xA;&#xD;&#xA;Codes may be defined very casually in enumerations or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information." />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.class.system">
      <path value="Encounter.class.system" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.class.code">
      <path value="Encounter.class.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.type">
      <path value="Encounter.type" />
      <comment value="Usage note: MA - N/A&#xD;&#xA;PSS - Note category&#xD;&#xA;&#xD;&#xA;Since there are many ways to further classify encounters, this element is 0..*." />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.type.text">
      <path value="Encounter.type.text" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.subject">
      <path value="Encounter.subject" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.subject.reference">
      <path value="Encounter.subject.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.subject.display">
      <path value="Encounter.subject.display" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.participant">
      <path value="Encounter.participant" />
      <comment value="Usage Note:   At a minimum, the primary participant should be indicated.    There is no current use identified for related person.&#xD;&#xA;Usage Note:   This is limited to specific use cases and may not be relevant to some, eg referrals" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.participant.individual">
      <path value="Encounter.participant.individual" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.participant.individual.reference">
      <path value="Encounter.participant.individual.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.appointment">
      <path value="Encounter.appointment" />
      <comment value="Usage note - Where applicable provide the reference to the appointment&#xD;&#xA;Usage Note:   This is limited to specific use cases and may not be relevant to some, eg referrals&#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="Encounter.appointment.reference">
      <path value="Encounter.appointment.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.appointment.display">
      <path value="Encounter.appointment.display" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.period">
      <path value="Encounter.period" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.period.start">
      <path value="Encounter.period.start" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.period.end">
      <path value="Encounter.period.end" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.reasonCode">
      <path value="Encounter.reasonCode" />
      <comment value="Useage note: &#xD;&#xA;MA - provide the reason for the visit provide by the patient i.e task concern on the left&#xD;&#xA;PSS - N/A&#xD;&#xA;&#xD;&#xA;For systems that need to know which was the primary diagnosis, these will be marked with the standard extension primaryDiagnosis (which is a sequence value rather than a flag, 1 = primary diagnosis)." />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.reasonCode.coding">
      <path value="Encounter.reasonCode.coding" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.reasonCode.coding.system">
      <path value="Encounter.reasonCode.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.reasonCode.coding.code">
      <path value="Encounter.reasonCode.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.reasonCode.text">
      <path value="Encounter.reasonCode.text" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.diagnosis">
      <path value="Encounter.diagnosis" />
      <comment value="Usage note: Provide the diagnosis for the encounter if documented.   &#xD;&#xA;Note:   Submitted a change request to allow either a reference-&gt;condition OR a codeable concept, as often this is all that the EMR will have." />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.diagnosis.condition">
      <path value="Encounter.diagnosis.condition" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.diagnosis.condition.reference">
      <path value="Encounter.diagnosis.condition.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.diagnosis.condition.display">
      <path value="Encounter.diagnosis.condition.display" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.serviceProvider">
      <path value="Encounter.serviceProvider" />
      <comment value="Usage note: Reference to the organization resource that corresponds with the sub-organization where this service occured.   Note:  In the EMR, a single application can support 1..* partitioned patient groups, referred to by EMRs as locations, groups or sub-organizations.&#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="Encounter.serviceProvider.reference">
      <path value="Encounter.serviceProvider.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.serviceProvider.display">
      <path value="Encounter.serviceProvider.display" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>