{
  "resourceType": "StructureDefinition",
  "url": "http://electronichealth.se/fhir/StructureDefinition/NLLPharmacyLocation",
  "version": "1.1.0",
  "name": "NLLPharmacyLocation",
  "status": "active",
  "date": "2025-07-04",
  "publisher": "Swedish eHealth Agency",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "EHM",
      "name": "E-hälsomyndigheten internal model"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Location",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Location",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Location",
        "path": "Location",
        "short": "Information for a pharmacy",
        "definition": "Information for a pharmacy where services are provided."
      },
      {
        "id": "Location.identifier",
        "path": "Location.identifier",
        "short": "Pharmacy GLN",
        "definition": "The pharmacy's Global Location Number, GLN.",
        "min": 1,
        "max": "1",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Apoteks-id"
          }
        ]
      },
      {
        "id": "Location.identifier.system",
        "path": "Location.identifier.system",
        "short": "The namespace for the GLN",
        "min": 1,
        "fixedUri": "http://electronichealth.se/identifier/gln",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Apoteks-id-typ"
          }
        ]
      },
      {
        "id": "Location.identifier.value",
        "path": "Location.identifier.value",
        "short": "GLN",
        "comment": "Minimum string length: 13\r\nMaximum string length: 13",
        "min": 1,
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Apoteks-id"
          }
        ]
      },
      {
        "id": "Location.identifier.value.extension:NLLdataAbsentReason",
        "path": "Location.identifier.value.extension",
        "sliceName": "NLLdataAbsentReason",
        "short": "masked",
        "definition": "Marks masked data, ie why data is missing",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/data-absent-reason"
            ]
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "binding": {
          "strength": "required",
          "valueSet": "http://electronichealth.se/fhir/ValueSet/data-absent-reason"
        }
      },
      {
        "id": "Location.name",
        "path": "Location.name",
        "short": "Name of the pharmacy",
        "definition": "Name of the pharmacy. Does not need to be unique.<br>\r\nOnly used for output. Pharmacy name is calculated by the Swedish eHealth Agency.",
        "comment": "Maximum string length:  50",
        "maxLength": 50,
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Apoteksnamn"
          }
        ]
      }
    ]
  }
}