{
  "resourceType": "StructureDefinition",
  "id": "0301dcd2-3b0b-4edc-ad56-5f9b41a0f26e",
  "meta": {
    "versionId": "4",
    "lastUpdated": "2023-01-10T02:31:39.9594907+00:00"
  },
  "url": "http://ehealth.bc.ca/fhir/StructureDefinition/Location",
  "name": "Location",
  "status": "draft",
  "date": "2022-03-09T21:50:43.2113428Z",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Location",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Location",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Location.id",
        "path": "Location.id",
        "comment": "See Mappings",
        "min": 1,
        "mapping": [
          {
            "identity": "source-eForm-dropdownlist",
            "map": "SDL_ID+\"org\"+(BRANCH_ID)",
            "comment": "SDL_ID and BRANCH_ID are both from SDL drop-down list"
          },
          {
            "identity": "source-cznSub-sdl-dropdownlist",
            "map": "SDL_ID+\"org\"+(BRANCH_ID)"
          },
          {
            "identity": "source-cznSub-sdl-NOTdropdownlist",
            "map": "UNKn +\"org3268\""
          },
          {
            "identity": "source-PNet",
            "map": "PEC"
          },
          {
            "identity": "source-HA",
            "map": "SDL_ID+\"org\"+BRANCH_ID"
          },
          {
            "identity": "source-HA-suppData",
            "map": "(SDL_ID) See Mappings from Identifier"
          }
        ]
      },
      {
        "id": "Location.meta",
        "path": "Location.meta",
        "comment": "Mandatory for eForm, CznSub, PNet"
      },
      {
        "id": "Location.meta.versionId",
        "path": "Location.meta.versionId",
        "fixedId": "2023.01"
      },
      {
        "id": "Location.meta.profile",
        "path": "Location.meta.profile",
        "comment": "Apply \"http://ehealth.bc.ca/fhir/StructureDefinition/Location\"",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Location.implicitRules",
        "path": "Location.implicitRules",
        "max": "0"
      },
      {
        "id": "Location.language",
        "path": "Location.language",
        "max": "0"
      },
      {
        "id": "Location.text",
        "path": "Location.text",
        "max": "0"
      },
      {
        "id": "Location.contained",
        "path": "Location.contained",
        "max": "0"
      },
      {
        "id": "Location.identifier",
        "path": "Location.identifier",
        "comment": "Mandatory for eForm, CznSub when SDL is selected from SDL drop-dwon list.  Mandatory for PNet to provide PEC code."
      },
      {
        "id": "Location.identifier.id",
        "path": "Location.identifier.id",
        "max": "0"
      },
      {
        "id": "Location.identifier.use",
        "path": "Location.identifier.use",
        "max": "0"
      },
      {
        "id": "Location.identifier.type",
        "path": "Location.identifier.type",
        "max": "0"
      },
      {
        "id": "Location.identifier.system",
        "path": "Location.identifier.system",
        "comment": "Apply \"https://fhir.infoway-inforoute.ca/NamingSystem/ca-bc-panorama-service-delivery-location-id\"",
        "min": 1
      },
      {
        "id": "Location.identifier.value",
        "path": "Location.identifier.value",
        "comment": "See Mappings",
        "min": 1,
        "mapping": [
          {
            "identity": "source-cznSub-sdl-dropdownlist",
            "map": "(SDL_ID)",
            "comment": "SDL_ID from SDL drop-down list"
          },
          {
            "identity": "source-eForm-dropdownlist",
            "map": "(SDL_ID)"
          },
          {
            "identity": "sourec-PNet",
            "map": "(PHARMACY NAME)"
          },
          {
            "identity": "source-SuppData-FHA-SDL",
            "map": "271"
          },
          {
            "identity": "source-SuppData-NHA-SDL",
            "map": "272"
          },
          {
            "identity": "source-SuppData-VCH-SDL",
            "map": "2795"
          },
          {
            "identity": "source-SuppData-VIHA-SDL",
            "map": "276"
          },
          {
            "identity": "source-SuppData-IHA-SDL",
            "map": "3427"
          }
        ]
      },
      {
        "id": "Location.identifier.period",
        "path": "Location.identifier.period",
        "max": "0"
      },
      {
        "id": "Location.identifier.assigner",
        "path": "Location.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Location.status",
        "path": "Location.status",
        "max": "0"
      },
      {
        "id": "Location.operationalStatus",
        "path": "Location.operationalStatus",
        "max": "0"
      },
      {
        "id": "Location.name",
        "path": "Location.name",
        "comment": "See Mappings",
        "mapping": [
          {
            "identity": "source-cznSub-sdl-dropdownlist",
            "map": "IMMUNIZATION_ORGANIZATION_BRANCH_OFFICE"
          },
          {
            "identity": "source-cznSub-sdl-NOTdropdownlist",
            "map": "(Free-Text entered by user)"
          },
          {
            "identity": "source-eForm-sdl-dropdownlist",
            "map": "(IMMUNIZATION_ORGANIZATION_BRANCH_OFFICE)"
          },
          {
            "identity": "source-PNet",
            "map": "(PEC NAME)",
            "comment": "Pending for PNet Team to confirm ??"
          }
        ]
      },
      {
        "id": "Location.alias",
        "path": "Location.alias",
        "max": "0"
      },
      {
        "id": "Location.description",
        "path": "Location.description",
        "max": "0"
      },
      {
        "id": "Location.mode",
        "path": "Location.mode",
        "max": "0"
      },
      {
        "id": "Location.type",
        "path": "Location.type",
        "max": "0"
      },
      {
        "id": "Location.telecom",
        "path": "Location.telecom",
        "max": "0"
      },
      {
        "id": "Location.address",
        "path": "Location.address",
        "max": "0"
      },
      {
        "id": "Location.physicalType",
        "path": "Location.physicalType",
        "max": "0"
      },
      {
        "id": "Location.position",
        "path": "Location.position",
        "max": "0"
      },
      {
        "id": "Location.managingOrganization",
        "path": "Location.managingOrganization",
        "comment": "Mandatory for eForm, CznSub to send.  For PNet, PHIX needs to perform lookup using FACILITY_CODE in the PLOEPHS.SERVICE_DELIVERY_LOCATION table."
      },
      {
        "id": "Location.managingOrganization.id",
        "path": "Location.managingOrganization.id",
        "max": "0"
      },
      {
        "id": "Location.managingOrganization.reference",
        "path": "Location.managingOrganization.reference",
        "comment": "See Mappings",
        "max": "0",
        "mapping": [
          {
            "identity": "source-cznSub-sdl-dropdownlist",
            "map": "fullURL+\"Organization/\"+(BRANCH_ID)",
            "comment": "http://ehealth.bc.ca/cznSub/fhir/"
          },
          {
            "identity": "source-cznSub-sdl-NOTdropdownlist",
            "map": "fullURL+\"Organization/3268\"",
            "comment": "http://ehealth.bc.ca/cznSub/fhir/"
          },
          {
            "identity": "source-eForm-sdl-dropdownlist",
            "map": "fullURL+\"Organization/\"+(BRANCH_ID)",
            "comment": "http://ehealth.bc.ca/eForm/fhir/"
          },
          {
            "identity": "source-HA",
            "map": "fullURL+\"Organization/\"+(BRANCH_ID)",
            "comment": "e.g. http://ehealth.bc.ca/nha/fhir/"
          }
        ]
      },
      {
        "id": "Location.managingOrganization.type",
        "path": "Location.managingOrganization.type",
        "max": "0"
      },
      {
        "id": "Location.managingOrganization.identifier",
        "path": "Location.managingOrganization.identifier",
        "min": 1
      },
      {
        "id": "Location.managingOrganization.identifier.id",
        "path": "Location.managingOrganization.identifier.id",
        "max": "0"
      },
      {
        "id": "Location.managingOrganization.identifier.use",
        "path": "Location.managingOrganization.identifier.use",
        "max": "0"
      },
      {
        "id": "Location.managingOrganization.identifier.type",
        "path": "Location.managingOrganization.identifier.type",
        "max": "0"
      },
      {
        "id": "Location.managingOrganization.identifier.system",
        "path": "Location.managingOrganization.identifier.system",
        "comment": "Apply \"https://ehealth.bc.ca/NamingSystem/ca-bc-panorama-organization-unit-id\"",
        "min": 1
      },
      {
        "id": "Location.managingOrganization.identifier.value",
        "path": "Location.managingOrganization.identifier.value",
        "comment": "See Mappings",
        "min": 1,
        "mapping": [
          {
            "identity": "source-CznSub-sdl-dropdownlist",
            "map": "(BRANCH_ID)"
          },
          {
            "identity": "source-CznSub-sdl-NOTdropdownlist",
            "map": "\"3268\""
          },
          {
            "identity": "source-eform-sdl-dropdownlist",
            "map": "(BRANCH_ID)"
          },
          {
            "identity": "source-HA",
            "map": "(BRANCH_ID)"
          }
        ]
      },
      {
        "id": "Location.managingOrganization.identifier.period",
        "path": "Location.managingOrganization.identifier.period",
        "max": "0"
      },
      {
        "id": "Location.managingOrganization.identifier.assigner",
        "path": "Location.managingOrganization.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Location.managingOrganization.display",
        "path": "Location.managingOrganization.display",
        "comment": "Panorama Organization Name e.g. VCHA, NHA",
        "min": 1
      },
      {
        "id": "Location.partOf",
        "path": "Location.partOf",
        "max": "0"
      },
      {
        "id": "Location.hoursOfOperation",
        "path": "Location.hoursOfOperation",
        "max": "0"
      },
      {
        "id": "Location.availabilityExceptions",
        "path": "Location.availabilityExceptions",
        "max": "0"
      },
      {
        "id": "Location.endpoint",
        "path": "Location.endpoint",
        "max": "0"
      }
    ]
  }
}