<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="3df5b741-a884-4eff-824d-5ea2c271e00f" />
  <meta>
    <versionId value="9" />
    <lastUpdated value="2025-01-24T23:36:53.6457832+00:00" />
  </meta>
  <url value="http://ehealth.bc.ca/fhir/StructureDefinition/bc-bcyimmunizationdistribution/Location" />
  <name value="Location" />
  <status value="draft" />
  <date value="2022-02-23T01:28:09.8238214+00:00" />
  <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">
      <path value="Location" />
      <short value="FHIR resource applies for PIR Vaccine Administered SDL" />
      <definition value="FHIR resource applies for PIR Vaccine Administered Service Delivery Location (SDL)" />
    </element>
    <element id="Location.id">
      <path value="Location.id" />
      <short value="PIR internal SDL ID + PIR internal Immz Org" />
      <definition value="PIR internal Service Delivery Location (SDL) Identifier + PIR internal Immunization Organization (Immz Org) Identifier.  SDL refers to the site where vaccine is being administered." />
      <comment value="See Mappings" />
      <min value="1" />
      <mapping>
        <identity value="source-PIR" />
        <map value="(PIR Location Id)  + 'org' + (PIR Imms Org ID)" />
      </mapping>
      <mapping>
        <identity value="source-PIR-Unknown" />
        <map value="(UNK)  + 'org' + (PIR Imms Org ID)" />
      </mapping>
    </element>
    <element id="Location.meta">
      <path value="Location.meta" />
      <min value="1" />
    </element>
    <element id="Location.meta.versionId">
      <path value="Location.meta.versionId" />
      <comment value="Use '2025.01.1' (This indicates FHIR changes on 2025-Jan)." />
    </element>
    <element id="Location.meta.lastUpdated">
      <path value="Location.meta.lastUpdated" />
      <comment value="Updated: 1. Relax the previously crossed-out elements.  2 For element ID and IDENTIFIER, remove the counter when value = UNK.  It used to be UNK1, or UNK2 or UNK3 etc., this counter is no longer needed as the associated Imms Org is now concatenated to the LOC ID (e.g. UNKorg81)." />
    </element>
    <element id="Location.meta.profile">
      <path value="Location.meta.profile" />
      <comment value="Use 'http://ehealth.bc.ca/fhir/StructureDefinition/bc-bcyimmunizationdistribution/Location'" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Location.meta.security">
      <path value="Location.meta.security" />
      <max value="1" />
    </element>
    <element id="Location.meta.tag">
      <path value="Location.meta.tag" />
      <max value="1" />
    </element>
    <element id="Location.contained">
      <path value="Location.contained" />
      <max value="1" />
    </element>
    <element id="Location.identifier">
      <path value="Location.identifier" />
      <short value="PIR internal SDL ID" />
      <definition value="PIR internal Service Delivery Location (SDL) Identifier.  SDL refers to the site where vaccine is being administered." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Location.identifier.system">
      <path value="Location.identifier.system" />
      <comment value="See Mappings" />
      <min value="1" />
      <mapping>
        <identity value="source-PIR" />
        <map value="https://fhir.infoway-inforoute.ca/NamingSystem/ca-bc-panorama-service-delivery-location-id" />
      </mapping>
    </element>
    <element id="Location.identifier.value">
      <path value="Location.identifier.value" />
      <comment value="See Mappings" />
      <min value="1" />
      <mapping>
        <identity value="source-PIR-Unknown" />
        <map value="(UNK)  + 'org' + (PIR Imms Org ID)" />
      </mapping>
      <mapping>
        <identity value="source-PIR-known" />
        <map value="Extract from (imms.h33_vaccination_master.location_id)" />
      </mapping>
    </element>
    <element id="Location.name">
      <path value="Location.name" />
      <short value="Name of the SDL" />
      <definition value="Name of the Service Delivery Location where vaccine is being administered." />
      <comment value="SDL - Derive name from location name (imms.h33_vaccination_master.location_id)" />
    </element>
    <element id="Location.alias">
      <path value="Location.alias" />
      <max value="1" />
    </element>
    <element id="Location.type">
      <path value="Location.type" />
      <max value="1" />
    </element>
    <element id="Location.telecom">
      <path value="Location.telecom" />
      <max value="1" />
    </element>
    <element id="Location.managingOrganization">
      <path value="Location.managingOrganization" />
      <short value="Immunization Organization responsible for the SDL" />
      <definition value="The immunization organization responsible for the provisioning and upkeep of the service delivery location." />
      <min value="1" />
    </element>
    <element id="Location.managingOrganization.reference">
      <path value="Location.managingOrganization.reference" />
      <comment value="fullURL of Panorama + 'Organization' + (PIR Imms Org ID from vaccine_master)" />
      <min value="1" />
    </element>
    <element id="Location.managingOrganization.type">
      <path value="Location.managingOrganization.type" />
      <comment value="Hardcode as &quot;Organization&quot;" />
      <fixedUri value="Organization" />
    </element>
    <element id="Location.partOf.id">
      <path value="Location.partOf.id" />
      <comment value="Apply &quot;OrgLOCparentnnn&quot; where &quot;nnn&quot; to be lookup from SDL-Pano Branch table, lookup the parent HA of the location." />
      <min value="1" />
    </element>
    <element id="Location.partOf.type">
      <path value="Location.partOf.type" />
      <comment value="Hardcode as &quot;Organization&quot;" />
      <fixedUri value="Organization" />
    </element>
    <element id="Location.partOf.identifier">
      <path value="Location.partOf.identifier" />
      <min value="1" />
    </element>
    <element id="Location.partOf.identifier.value">
      <path value="Location.partOf.identifier.value" />
      <min value="1" />
    </element>
    <element id="Location.hoursOfOperation">
      <path value="Location.hoursOfOperation" />
      <max value="1" />
    </element>
    <element id="Location.endpoint">
      <path value="Location.endpoint" />
      <max value="1" />
    </element>
  </differential>
</StructureDefinition>