<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="UKCore-Location" />
  <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Location" />
  <version value="2.2.0" />
  <name value="UKCoreLocation" />
  <title value="UK Core Location" />
  <status value="active" />
  <date value="2022-12-16" />
  <publisher value="HL7 UK" />
  <contact>
    <name value="HL7 UK" />
    <telecom>
      <system value="email" />
      <value value="ukcore@hl7.org.uk" />
      <use value="work" />
      <rank value="1" />
    </telecom>
  </contact>
  <description value="This profile defines the UK constraints and extensions on the International FHIR resource [Location](https://hl7.org/fhir/R4/Location.html)." />
  <purpose value="This profile can be used to exchange details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.&#xD;&#xA;&#xD;&#xA;A location includes both incidental locations (a place which is used for healthcare without prior designation or authorisation) and dedicated, formally appointed locations. Locations may be private, public, mobile or fixed and scale from small freezers to full hospital buildings or parking garages." />
  <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="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>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Location" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Location" />
  <derivation value="constraint" />
  <differential>
    <element id="Location.identifier">
      <path value="Location.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Location.identifier:odsSiteCode">
      <path value="Location.identifier" />
      <sliceName value="odsSiteCode" />
      <short value="ODS Site code to identify the organisation at site level" />
      <definition value="ODS Site code to identify the organisation at site level." />
      <max value="1" />
    </element>
    <element id="Location.identifier:odsSiteCode.system">
      <path value="Location.identifier.system" />
      <short value="ODS Code" />
      <min value="1" />
      <fixedUri value="https://fhir.nhs.uk/Id/ods-site-code" />
    </element>
    <element id="Location.identifier:odsSiteCode.value">
      <path value="Location.identifier.value" />
      <min value="1" />
    </element>
    <element id="Location.identifier:odsSiteCode.assigner">
      <path value="Location.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Location.managingOrganization">
      <path value="Location.managingOrganization" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Location.managingOrganization.identifier.assigner">
      <path value="Location.managingOrganization.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Location.partOf">
      <path value="Location.partOf" />
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy">
          <valueBoolean value="true" />
        </extension>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Location" />
      </type>
    </element>
    <element id="Location.partOf.identifier.assigner">
      <path value="Location.partOf.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
    <element id="Location.endpoint.identifier.assigner">
      <path value="Location.endpoint.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization" />
      </type>
    </element>
  </differential>
</StructureDefinition>