<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="UKCore-Encounter" />
  <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Encounter" />
  <version value="2.1.0" />
  <name value="UKCoreEncounter" />
  <title value="UK Core Encounter" />
  <status value="active" />
  <date value="2022-01-07" />
  <publisher value="HL7 UK" />
  <contact>
    <name value="HL7 UK" />
    <telecom>
      <system value="email" />
      <value value="secretariat@hl7.org.uk" />
      <use value="work" />
      <rank value="1" />
    </telecom>
  </contact>
  <contact>
    <name value="NHS Digital" />
    <telecom>
      <system value="email" />
      <value value="interoperabilityteam@nhs.net" />
      <use value="work" />
      <rank value="2" />
    </telecom>
  </contact>
  <description value="Defines the UK Core constraints and extensions on the Encounter resource for the minimal set of data to query and retrieve encounter information." />
  <purpose value="This profile allows exchange of information about an interaction between an individual and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of an individual." />
  <copyright value="Copyright © 2021+ HL7 UK Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at  https://www.hl7.org/fhir/license.html." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </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="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Encounter" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Encounter" />
  <derivation value="constraint" />
  <differential>
    <element id="Encounter.extension">
      <path value="Encounter.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="Encounter.extension:admissionMethod">
      <path value="Encounter.extension" />
      <sliceName value="admissionMethod" />
      <short value="An extension to support the method by which an individual was admitted into hospital." />
      <definition value="This extension has been developed to demonstrate the representation of the method by which a patient was admitted to hospital." />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AdmissionMethod" />
      </type>
    </element>
    <element id="Encounter.extension:dischargeMethod">
      <path value="Encounter.extension" />
      <sliceName value="dischargeMethod" />
      <short value="An extension to support the method of discharge from a hospital." />
      <definition value="This extension has been developed to demonstrate the representation of the method by which a patient was discharged from hospital." />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-DischargeMethod" />
      </type>
    </element>
    <element id="Encounter.extension:emergencyCareDischargeStatus">
      <path value="Encounter.extension" />
      <sliceName value="emergencyCareDischargeStatus" />
      <short value="An extension to support the status of an individual on discharge from an Emergency Care Department." />
      <definition value="This extension has been developed to demonstrate the representation of the status of a patient on discharge from an Emergency Care Department." />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-EmergencyCareDischargeStatus" />
      </type>
    </element>
    <element id="Encounter.extension:OutcomeOfAttendance">
      <path value="Encounter.extension" />
      <sliceName value="OutcomeOfAttendance" />
      <short value="An extension to support the outcome of an Outpatient attendance." />
      <definition value="This extension has been developed to demonstrate the representation of the outcome of an Outpatient attendance." />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-OutcomeOfAttendance" />
      </type>
    </element>
    <element id="Encounter.identifier.assigner">
      <path value="Encounter.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.type.coding">
      <path value="Encounter.type.coding" />
      <binding>
        <strength value="extensible" />
        <description value="A code from the SNOMED Clinical Terminology UK coding system that describes an encounter between a care professional and the patient (or patient's record)." />
        <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-EncounterType" />
      </binding>
    </element>
    <element id="Encounter.type.coding.system">
      <path value="Encounter.type.coding.system" />
      <min value="1" />
      <fixedUri value="http://snomed.info/sct" />
    </element>
    <element id="Encounter.type.coding.code">
      <path value="Encounter.type.coding.code" />
      <min value="1" />
    </element>
    <element id="Encounter.type.coding.display">
      <path value="Encounter.type.coding.display" />
      <min value="1" />
    </element>
    <element id="Encounter.serviceType">
      <path value="Encounter.serviceType" />
      <binding>
        <strength value="extensible" />
        <description value="Any code from the SNOMED CT UK Refset with fully specified name 'Services simple reference set (foundation metadata concept)' with Refset Id 1127531000000102." />
        <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-CareSettingType" />
      </binding>
    </element>
    <element id="Encounter.subject">
      <path value="Encounter.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient" />
      </type>
    </element>
    <element id="Encounter.subject.identifier.assigner">
      <path value="Encounter.subject.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.episodeOfCare">
      <path value="Encounter.episodeOfCare" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-EpisodeOfCare" />
      </type>
    </element>
    <element id="Encounter.episodeOfCare.identifier.assigner">
      <path value="Encounter.episodeOfCare.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.basedOn.identifier.assigner">
      <path value="Encounter.basedOn.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.participant.individual">
      <path value="Encounter.participant.individual" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-RelatedPerson" />
      </type>
    </element>
    <element id="Encounter.participant.individual.identifier.assigner">
      <path value="Encounter.participant.individual.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.appointment.identifier.assigner">
      <path value="Encounter.appointment.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.reasonReference.identifier.assigner">
      <path value="Encounter.reasonReference.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.diagnosis">
      <path value="Encounter.diagnosis" />
      <short value="The list of diagnoses relevant to this encounter" />
      <definition value="The list of diagnoses relevant to this encounter." />
    </element>
    <element id="Encounter.diagnosis.condition.identifier.assigner">
      <path value="Encounter.diagnosis.condition.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.account.identifier.assigner">
      <path value="Encounter.account.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.hospitalization.preAdmissionIdentifier.assigner">
      <path value="Encounter.hospitalization.preAdmissionIdentifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.hospitalization.origin">
      <path value="Encounter.hospitalization.origin" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Location" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.hospitalization.origin.identifier.assigner">
      <path value="Encounter.hospitalization.origin.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.hospitalization.admitSource">
      <path value="Encounter.hospitalization.admitSource" />
      <binding>
        <strength value="extensible" />
        <description value="The source of admission to a Hospital Provider Spell or a Nursing Episode when the Patient is in a Hospital Site or a Care Home." />
        <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-SourceOfAdmission" />
      </binding>
    </element>
    <element id="Encounter.hospitalization.destination">
      <path value="Encounter.hospitalization.destination" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Location" />
      </type>
    </element>
    <element id="Encounter.hospitalization.destination.identifier.assigner">
      <path value="Encounter.hospitalization.destination.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.hospitalization.dischargeDisposition">
      <path value="Encounter.hospitalization.dischargeDisposition" />
      <binding>
        <strength value="extensible" />
        <description value="The destination of a Patient on completion of a Hospital Provider Spell, or a note that the Patient died or was a still birth." />
        <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-DischargeDestination" />
      </binding>
    </element>
    <element id="Encounter.location.location">
      <path value="Encounter.location.location" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Location" />
      </type>
    </element>
    <element id="Encounter.location.location.identifier.assigner">
      <path value="Encounter.location.location.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.serviceProvider">
      <path value="Encounter.serviceProvider" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.serviceProvider.identifier.assigner">
      <path value="Encounter.serviceProvider.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Encounter.partOf">
      <path value="Encounter.partOf" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Encounter" />
      </type>
    </element>
    <element id="Encounter.partOf.identifier.assigner">
      <path value="Encounter.partOf.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
  </differential>
</StructureDefinition>