{
  "resourceType": "StructureDefinition",
  "url": "http://electronichealth.se/fhir/StructureDefinition/NLLPractitioner",
  "name": "NLLPractitioner",
  "status": "draft",
  "fhirVersion": "4.0.0",
  "mapping": [
    {
      "identity": "EHM",
      "uri": "http://ehalsomyndigheten.se",
      "name": "E-hälsomyndigheten"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Practitioner",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Practitioner",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Practitioner",
        "path": "Practitioner",
        "mapping": [
          {
            "identity": "EHM",
            "map": "Personal",
            "comment": "Förskrivare/Farmaceut/Annan personal"
          }
        ]
      },
      {
        "id": "Practitioner.extension",
        "path": "Practitioner.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Practitioner.extension:extQualificationCode",
        "path": "Practitioner.extension",
        "sliceName": "extQualificationCode",
        "short": "Extended qualification code (sv: utökad yrkeskod)",
        "definition": "Extended qualification code (sv: utökad yrkeskod) to be invoked in given scenarios.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/NLLExtProffessionCode"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "EHM",
            "map": "Yrkesroll.Utökad yrkeskod"
          }
        ]
      },
      {
        "id": "Practitioner.extension:extQualificationCode.value[x]",
        "path": "Practitioner.extension.value[x]",
        "min": 1,
        "binding": {
          "strength": "required",
          "description": "Codes for extended qualifications as defined by E-hälsomyndigheten",
          "valueSet": "http://electronichealth.se/fhir/ValueSet/nll-utokad-yrkeskod"
        }
      },
      {
        "id": "Practitioner.extension:nllApplicableWorkplace",
        "path": "Practitioner.extension",
        "sliceName": "nllApplicableWorkplace",
        "short": "Information related to the workplace applicable for the scenario",
        "definition": "A practitioner may have several workplaces. The workplace information defined in this structure should reflect the workplace related to the situation, e.g. unit where the practitioner was situated when the prescription was requested.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/NLLWorkplaceSummary"
            ]
          }
        ]
      },
      {
        "id": "Practitioner.identifier",
        "path": "Practitioner.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Practitioner.identifier:pnr",
        "path": "Practitioner.identifier",
        "sliceName": "pnr",
        "short": "An identifier in the form of personal identity number",
        "definition": "An identifier in the form of national identification number . Only used in specific scenarios where the individual doesn't have a personal license or prescription code.",
        "max": "1",
        "mapping": [
          {
            "identity": "EHM",
            "map": "Person.personnummer"
          }
        ]
      },
      {
        "id": "Practitioner.identifier:pnr.system",
        "path": "Practitioner.identifier.system",
        "fixedUri": "urn:oid:1.2.752.129.2.1.3.1"
      },
      {
        "id": "Practitioner.identifier:healthcareProfessionalLicenseNumber",
        "path": "Practitioner.identifier",
        "sliceName": "healthcareProfessionalLicenseNumber",
        "short": "Defines a healthcareProfessionalLicenseIdentityNumber (sv: legitimationskod) for a Practitioner.",
        "max": "1",
        "mapping": [
          {
            "identity": "EHM",
            "map": "Hälso- och sjukvårdspersonal.legitimationskod"
          }
        ]
      },
      {
        "id": "Practitioner.identifier:healthcareProfessionalLicenseNumber.system",
        "path": "Practitioner.identifier.system",
        "short": "Defines a healthcare professional license number (sv: legitimationskod) for a practitioner.",
        "definition": "Defines a healthcare professional license number (sv: legitimationskod) for a practitioner.",
        "fixedUri": "http://electronichealth.se/identifier/legitimationskod"
      },
      {
        "id": "Practitioner.identifier:personalPrescriptionCode",
        "path": "Practitioner.identifier",
        "sliceName": "personalPrescriptionCode",
        "short": "Defines a personalPrescriptionCode (sv: personlig förskrivarkod) for a Practitioner",
        "max": "1",
        "mapping": [
          {
            "identity": "EHM",
            "map": "Förskrivare.Personlig förskrivarkod"
          }
        ]
      },
      {
        "id": "Practitioner.identifier:personalPrescriptionCode.system",
        "path": "Practitioner.identifier.system",
        "short": "Defines a personalPrescriptionCode (sv: förskrivarkod) for a Practitioner.",
        "definition": "Defines a personalPrescriptionCode (sv: förskrivarkod) for a Practitioner.",
        "fixedUri": "http://electronichealth.se/identifier/forskrivarkod"
      },
      {
        "id": "Practitioner.identifier:groupPrescriptionCode",
        "path": "Practitioner.identifier",
        "sliceName": "groupPrescriptionCode",
        "short": "Prescription code for prescriber without a personal code",
        "definition": "Prescription code used for scenarios where the practitioner doesn't have a personal code. Should be combined with personal identification number (personnummer)",
        "max": "1",
        "mapping": [
          {
            "identity": "EHM",
            "map": "Förskrivare.Gruppförskrivarkod"
          }
        ]
      },
      {
        "id": "Practitioner.identifier:groupPrescriptionCode.system",
        "path": "Practitioner.identifier.system",
        "short": "Defines a groupPrescriptionCode (sv: gruppförskrivarkod) for a Practitioner",
        "definition": "Defines a groupPrescriptionCode (sv: gruppförskrivarkod) for a Practitioner. Used in cases where the prescriber dosn't have a personal prescription code (sv: förskrivarkod) or a professional licens number (sv: legitimationskod).",
        "fixedUri": "http://electronichealth.se/identifier/gruppforskrivarkod"
      },
      {
        "id": "Practitioner.identifier:userAcronym",
        "path": "Practitioner.identifier",
        "sliceName": "userAcronym",
        "short": "User acronym, used in some scenarios",
        "definition": "An identifier that can be used in combination with e.g. name and workplace name to understand which individual that performed an action. This is used in scenarios when the person doesn't have a personal presciption/license code and that the operation allows for such a role/identification",
        "max": "1",
        "mapping": [
          {
            "identity": "EHM",
            "map": "Användar-id"
          }
        ]
      },
      {
        "id": "Practitioner.identifier:userAcronym.system",
        "path": "Practitioner.identifier.system",
        "fixedUri": "http://electronichealth.se/identifier/userName"
      },
      {
        "id": "Practitioner.name.family",
        "path": "Practitioner.name.family",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Person.namn"
          }
        ]
      },
      {
        "id": "Practitioner.name.given",
        "path": "Practitioner.name.given",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Person.namn"
          }
        ]
      },
      {
        "id": "Practitioner.telecom",
        "path": "Practitioner.telecom",
        "short": "A contact detail for the practitioner (only applies in some scenarios)",
        "definition": "A contact detail for the practitioner, in the form of a telephone number. NOTE! Only used in the scenario of MedicationRequest.requester where a telephone number to the responsible practitioner should be available.",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Kontaktväg.Kontaktuppgift"
          }
        ]
      },
      {
        "id": "Practitioner.telecom.extension",
        "path": "Practitioner.telecom.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Practitioner.telecom.extension:nllAvailableToPatient",
        "path": "Practitioner.telecom.extension",
        "sliceName": "nllAvailableToPatient",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/NLLAvailableToPatient"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "EHM",
            "map": "Tillgänglig för patient"
          }
        ]
      },
      {
        "id": "Practitioner.telecom.extension:nllAvailableToPatient.value[x]",
        "path": "Practitioner.telecom.extension.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Practitioner.telecom.extension:nllContactPointType",
        "path": "Practitioner.telecom.extension",
        "sliceName": "nllContactPointType",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/NLLContactPointType"
            ]
          }
        ]
      },
      {
        "id": "Practitioner.telecom.extension:nllContactPointType.value[x]",
        "path": "Practitioner.telecom.extension.value[x]",
        "short": "Type of contact point (workplace or practitioner)",
        "definition": "W | P",
        "binding": {
          "strength": "required",
          "valueSet": "http://electronichealth.se/fhir/ValueSet/contactpoint-types"
        }
      },
      {
        "id": "Practitioner.telecom.system",
        "path": "Practitioner.telecom.system",
        "short": "phone",
        "fixedCode": "phone"
      },
      {
        "id": "Practitioner.telecom.value",
        "path": "Practitioner.telecom.value",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Telefon.Telefonnummer"
          }
        ]
      },
      {
        "id": "Practitioner.telecom.rank",
        "path": "Practitioner.telecom.rank",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Rangordning"
          }
        ]
      },
      {
        "id": "Practitioner.address",
        "path": "Practitioner.address",
        "short": "Address(es) of the practitioner (only applicable in some scenarios)",
        "definition": "Address(es) of the practitioner. NOTE! Only used in the scenario of MedicationRequest.requester where an address to the responsible practitioner should be available.",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Kontaktväg.Adress"
          }
        ]
      },
      {
        "id": "Practitioner.address.type",
        "path": "Practitioner.address.type",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Adresstyp"
          }
        ]
      },
      {
        "id": "Practitioner.address.line",
        "path": "Practitioner.address.line",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Adress"
          }
        ]
      },
      {
        "id": "Practitioner.address.city",
        "path": "Practitioner.address.city",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Postort"
          }
        ]
      },
      {
        "id": "Practitioner.address.postalCode",
        "path": "Practitioner.address.postalCode",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Postnummer"
          }
        ]
      },
      {
        "id": "Practitioner.address.country",
        "path": "Practitioner.address.country",
        "short": "Country (2 letter code ISO 3166-1)",
        "definition": "Country as 2 letter code according to ISO 3166-1. Must be included for a prescription issued in a country outside Sweden.",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Landskod"
          }
        ]
      },
      {
        "id": "Practitioner.qualification",
        "path": "Practitioner.qualification",
        "short": "Defines the qualification (sv: yrkeskod) for the practitioner invoked in this scenario",
        "definition": "Defines the qualification (sv: yrkeskod) for the practitioner invoked in this scenario of creating a prescription. The practitioner may have additional qualifications (sv: yrkeskoder) but only the one relevant for this scenario should be entered.",
        "max": "1",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Yrkesroll.yrkeskod"
          }
        ]
      },
      {
        "id": "Practitioner.qualification.code",
        "path": "Practitioner.qualification.code",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "coding.system"
            }
          ],
          "rules": "open"
        },
        "binding": {
          "strength": "required",
          "description": "HoSP qualification code",
          "valueSet": "http://electronichealth.se/fhir/ValueSet/nll-hosp-yrkeskod"
        }
      }
    ]
  }
}