{
  "resourceType": "StructureDefinition",
  "url": "http://dips.no/fhir/StructureDefinition/R4/DIPSBasisPractitionerRoleR4",
  "name": "DIPSBasisPractitionerRoleR4",
  "status": "draft",
  "fhirVersion": "4.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "PractitionerRole",
  "baseDefinition": "http://hl7.no/fhir/StructureDefinition/no-basis-PractitionerRole",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "PractitionerRole.meta.lastUpdated",
        "path": "PractitionerRole.meta.lastUpdated",
        "comment": "SISTENDRETTID column of dwhelsetjenesterolle table."
      },
      {
        "id": "PractitionerRole.extension",
        "path": "PractitionerRole.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "PractitionerRole.extension:healthCarePartyType",
        "path": "PractitionerRole.extension",
        "sliceName": "healthCarePartyType",
        "comment": "Maps the numerical value as a string for the HealthCarePartyType.\r\nUnknown = 0, Person = 1, Section = 2, Ward = 3, Organization = 4, Service = 5, Department = 6",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPractitionerRoleHealthCarePartyType"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:communicationType",
        "path": "PractitionerRole.extension",
        "sliceName": "communicationType",
        "comment": "Map EdiSettings data. CommunicationType has 3 extensions. They are CommunicationProtocol, CommunicationTypeId and IsPaperCopy.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPractitionerRoleCommunicationType"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:healthCarePartyDepartment",
        "path": "PractitionerRole.extension",
        "sliceName": "healthCarePartyDepartment",
        "comment": "Maps Avdid column of dwhelsetjenesterolle table to the reference.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPractitionerRoleHealthCarePartyDepartment"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:healthCarePartyDepartment.value[x]:valueReference.reference",
        "path": "PractitionerRole.extension.valueReference.reference",
        "comment": "Maps Avdid column of dwhelsetjenesterolle table to the reference."
      },
      {
        "id": "PractitionerRole.extension:ward",
        "path": "PractitionerRole.extension",
        "sliceName": "ward",
        "comment": "Maps postid column of dwhelsetjenesterolle table to the reference.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://example.org/fhir/StructureDefinition/DIPSPractitionerRoleWard"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:ward.value[x]:valueReference.reference",
        "path": "PractitionerRole.extension.valueReference.reference",
        "comment": "Maps postid column of dwhelsetjenesterolle table to the reference."
      },
      {
        "id": "PractitionerRole.extension:section",
        "path": "PractitionerRole.extension",
        "sliceName": "section",
        "comment": "Maps seksjonsid column of dwhelsetjenesterolle table to the reference.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://example.org/fhir/StructureDefinition/DIPSPractitionerRoleSection"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:section.value[x]:valueReference.reference",
        "path": "PractitionerRole.extension.valueReference.reference",
        "comment": "Maps seksjonsid column of dwhelsetjenesterolle table to the reference."
      },
      {
        "id": "PractitionerRole.extension:hospital",
        "path": "PractitionerRole.extension",
        "sliceName": "hospital",
        "comment": "Maps sykehusid column of dwhelsetjenesterolle table to the reference.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://example.org/fhir/StructureDefinition/DIPSPractitionerRoleHospital"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:hospital.value[x]:valueReference.reference",
        "path": "PractitionerRole.extension.valueReference.reference",
        "comment": "Maps sykehusid column of dwhelsetjenesterolle table to the reference."
      },
      {
        "id": "PractitionerRole.extension:hcpRoleName",
        "path": "PractitionerRole.extension",
        "sliceName": "hcpRoleName",
        "definition": "rollenavn column of dwhelsetjenesterolle table as healthCarePartyRoleName",
        "comment": "rollenavn column of dwhelsetjenesterolle table as healthCarePartyRoleName",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPractitionerRoleHcpRoleName"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:hcpRoleName.value[x]:valueString",
        "path": "PractitionerRole.extension.valueString",
        "sliceName": "valueString",
        "definition": "rollenavn column of dwhelsetjenesterolle table as healthCarePartyRoleName",
        "comment": "rollenavn column of dwhelsetjenesterolle table as healthCarePartyRoleName"
      },
      {
        "id": "PractitionerRole.extension:userRoleDepartment",
        "path": "PractitionerRole.extension",
        "sliceName": "userRoleDepartment",
        "comment": "Maps avdid column of dwbrukerrolle table to the reference.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://example.org/fhir/StructureDefinition/DIPSPractitionerRoleUserRoleDepartment"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:userRoleDepartment.value[x]:valueReference.reference",
        "path": "PractitionerRole.extension.valueReference.reference",
        "comment": "avdid column of dwbrukerrolle table"
      },
      {
        "id": "PractitionerRole.extension:dipsSignature",
        "path": "PractitionerRole.extension",
        "sliceName": "dipsSignature",
        "comment": "dipssignatur column of dwbruker table.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPractitionerRoleDipsSignature"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:dipsSignature.value[x]:valueString",
        "path": "PractitionerRole.extension.valueString",
        "sliceName": "valueString",
        "comment": "dipssignatur column of dwbruker table."
      },
      {
        "id": "PractitionerRole.extension:userRoleLastUpdated",
        "path": "PractitionerRole.extension",
        "sliceName": "userRoleLastUpdated",
        "comment": "sistendrettid column of dwbrukerrolle table.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPractitionerRoleUserRoleLastUpdated"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:userRoleLastUpdated.value[x]:valueDateTime",
        "path": "PractitionerRole.extension.valueDateTime",
        "sliceName": "valueDateTime",
        "comment": "sistendrettid column of dwbrukerrolle table."
      },
      {
        "id": "PractitionerRole.extension:healthCarePosition",
        "path": "PractitionerRole.extension",
        "sliceName": "healthCarePosition",
        "comment": "This has a coded value.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPractitionerRoleHealthCarePosition"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:healthCarePosition.value[x]:valueCoding.system",
        "path": "PractitionerRole.extension.valueCoding.system",
        "comment": "Internal oid and kodelisteid(from dwkodeverkverdier table) at the end."
      },
      {
        "id": "PractitionerRole.extension:healthCarePosition.value[x]:valueCoding.version",
        "path": "PractitionerRole.extension.valueCoding.version",
        "max": "0"
      },
      {
        "id": "PractitionerRole.extension:healthCarePosition.value[x]:valueCoding.code",
        "path": "PractitionerRole.extension.valueCoding.code",
        "comment": "dwbrukerrolle table, stilling column is the healthCarePositionCode."
      },
      {
        "id": "PractitionerRole.extension:healthCarePosition.value[x]:valueCoding.display",
        "path": "PractitionerRole.extension.valueCoding.display",
        "comment": "dwkodeverkverdier table, langtnavn column is the healthCarePosition."
      },
      {
        "id": "PractitionerRole.extension:healthCarePosition.value[x]:valueCoding.userSelected",
        "path": "PractitionerRole.extension.valueCoding.userSelected",
        "max": "0"
      },
      {
        "id": "PractitionerRole.extension:userRoleName",
        "path": "PractitionerRole.extension",
        "sliceName": "userRoleName",
        "comment": "betegnelse column of dwbrukerrolle table.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPractitionerRoleUserRoleName"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:userRoleName.value[x]:valueString",
        "path": "PractitionerRole.extension.valueString",
        "sliceName": "valueString",
        "comment": "betegnelse column of dwbrukerrolle table."
      },
      {
        "id": "PractitionerRole.extension:userRoleId",
        "path": "PractitionerRole.extension",
        "sliceName": "userRoleId",
        "comment": "BRUKERROLLEID column of dwbrukerrolle table.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPractitionerRoleUserRoleId"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.extension:userRoleId.value[x]:valueString",
        "path": "PractitionerRole.extension.valueString",
        "sliceName": "valueString",
        "comment": "BRUKERROLLEID column of dwbrukerrolle table."
      },
      {
        "id": "PractitionerRole.identifier",
        "path": "PractitionerRole.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "PractitionerRole.identifier:HCPCodeIdentifier",
        "path": "PractitionerRole.identifier",
        "sliceName": "HCPCodeIdentifier"
      },
      {
        "id": "PractitionerRole.identifier:HCPCodeIdentifier.id",
        "path": "PractitionerRole.identifier.id",
        "max": "0"
      },
      {
        "id": "PractitionerRole.identifier:HCPCodeIdentifier.type",
        "path": "PractitionerRole.identifier.type",
        "max": "0"
      },
      {
        "id": "PractitionerRole.identifier:HCPCodeIdentifier.system",
        "path": "PractitionerRole.identifier.system",
        "fixedUri": "urn:oid:1.3.6.1.4.1.9038.51"
      },
      {
        "id": "PractitionerRole.identifier:HCPCodeIdentifier.value",
        "path": "PractitionerRole.identifier.value",
        "comment": "rekvirentkode column of dwhelsetjenesterolle table."
      },
      {
        "id": "PractitionerRole.identifier:HCPCodeIdentifier.period",
        "path": "PractitionerRole.identifier.period",
        "max": "0"
      },
      {
        "id": "PractitionerRole.identifier:HCPCodeIdentifier.assigner",
        "path": "PractitionerRole.identifier.assigner",
        "max": "0"
      },
      {
        "id": "PractitionerRole.identifier:HCPIdentifier",
        "path": "PractitionerRole.identifier",
        "sliceName": "HCPIdentifier"
      },
      {
        "id": "PractitionerRole.identifier:HCPIdentifier.id",
        "path": "PractitionerRole.identifier.id",
        "max": "0"
      },
      {
        "id": "PractitionerRole.identifier:HCPIdentifier.type",
        "path": "PractitionerRole.identifier.type",
        "max": "0"
      },
      {
        "id": "PractitionerRole.identifier:HCPIdentifier.system",
        "path": "PractitionerRole.identifier.system",
        "fixedUri": "urn:oid:1.3.6.1.4.1.9038.51.1"
      },
      {
        "id": "PractitionerRole.identifier:HCPIdentifier.value",
        "path": "PractitionerRole.identifier.value",
        "comment": "helsetjenesterolleid column of dwhelsetjenesterolle table."
      },
      {
        "id": "PractitionerRole.identifier:HCPIdentifier.period",
        "path": "PractitionerRole.identifier.period",
        "max": "0"
      },
      {
        "id": "PractitionerRole.identifier:HCPIdentifier.assigner",
        "path": "PractitionerRole.identifier.assigner",
        "max": "0"
      },
      {
        "id": "PractitionerRole.identifier:HERIdentifier",
        "path": "PractitionerRole.identifier",
        "sliceName": "HERIdentifier"
      },
      {
        "id": "PractitionerRole.identifier:HERIdentifier.id",
        "path": "PractitionerRole.identifier.id",
        "max": "0"
      },
      {
        "id": "PractitionerRole.identifier:HERIdentifier.type",
        "path": "PractitionerRole.identifier.type",
        "max": "0"
      },
      {
        "id": "PractitionerRole.identifier:HERIdentifier.system",
        "path": "PractitionerRole.identifier.system",
        "fixedUri": "urn:oid:2.16.578.1.12.4.1.2"
      },
      {
        "id": "PractitionerRole.identifier:HERIdentifier.value",
        "path": "PractitionerRole.identifier.value",
        "comment": "Herid column of dwhelsetjenesterolle table."
      },
      {
        "id": "PractitionerRole.identifier:HERIdentifier.period",
        "path": "PractitionerRole.identifier.period",
        "max": "0"
      },
      {
        "id": "PractitionerRole.identifier:HERIdentifier.assigner",
        "path": "PractitionerRole.identifier.assigner",
        "max": "0"
      },
      {
        "id": "PractitionerRole.active",
        "path": "PractitionerRole.active",
        "comment": "Active is derived using values of sammendato column of dwhelsetjenesterolle table, gyldigfradato column of dwhelsetjenesterolle table, gyldigtildato column of dwhelsetjenesterolle table."
      },
      {
        "id": "PractitionerRole.period.start",
        "path": "PractitionerRole.period.start",
        "comment": "gyldigfradato column of dwhelsetjenesterolle table."
      },
      {
        "id": "PractitionerRole.period.end",
        "path": "PractitionerRole.period.end",
        "comment": "gyldigtildato column of dwhelsetjenesterolle table.\r\nThe high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has an end value of 2012-02-03."
      },
      {
        "id": "PractitionerRole.practitioner",
        "path": "PractitionerRole.practitioner",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPractitionerReference"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.practitioner.reference",
        "path": "PractitionerRole.practitioner.reference",
        "comment": "personid column of dwhelsetjenesterolle table."
      },
      {
        "id": "PractitionerRole.practitioner.identifier.value",
        "path": "PractitionerRole.practitioner.identifier.value",
        "comment": "Value is derived using NationalIdentityType(Foedselsnrtype column of dwperson table) and NationalIdentityNumber(Foedselsnr column of dwperson table)."
      },
      {
        "id": "PractitionerRole.practitioner.identifier.period",
        "path": "PractitionerRole.practitioner.identifier.period",
        "max": "0"
      },
      {
        "id": "PractitionerRole.practitioner.identifier.assigner",
        "path": "PractitionerRole.practitioner.identifier.assigner",
        "max": "0"
      },
      {
        "id": "PractitionerRole.practitioner.identifier:PersonID",
        "path": "PractitionerRole.practitioner.identifier",
        "sliceName": "PersonID"
      },
      {
        "id": "PractitionerRole.practitioner.identifier:PersonID.id",
        "path": "PractitionerRole.practitioner.identifier.id",
        "max": "0"
      },
      {
        "id": "PractitionerRole.practitioner.identifier:PersonID.type",
        "path": "PractitionerRole.practitioner.identifier.type",
        "max": "0"
      },
      {
        "id": "PractitionerRole.practitioner.identifier:PersonID.period",
        "path": "PractitionerRole.practitioner.identifier.period",
        "max": "0"
      },
      {
        "id": "PractitionerRole.practitioner.identifier:PersonID.assigner",
        "path": "PractitionerRole.practitioner.identifier.assigner",
        "max": "0"
      },
      {
        "id": "PractitionerRole.organization",
        "path": "PractitionerRole.organization",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSOrganizationReference"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.organization.reference",
        "path": "PractitionerRole.organization.reference",
        "comment": "organisasjonid column of dwhelsetjenesterolle table."
      },
      {
        "id": "PractitionerRole.organization.identifier.value",
        "path": "PractitionerRole.organization.identifier.value",
        "comment": "Reshid column of dworganizationalunit table."
      },
      {
        "id": "PractitionerRole.organization.display",
        "path": "PractitionerRole.organization.display",
        "comment": "Navn column of dworganisasjon table."
      },
      {
        "id": "PractitionerRole.code.coding",
        "path": "PractitionerRole.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "PractitionerRole.code.coding:FHIRCoding",
        "path": "PractitionerRole.code.coding",
        "sliceName": "FHIRCoding",
        "comment": "Map coded values of codeListId = 1012"
      },
      {
        "id": "PractitionerRole.code.coding:FHIRCoding.system",
        "path": "PractitionerRole.code.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/practitioner-role"
      },
      {
        "id": "PractitionerRole.code.coding:FHIRCoding.code",
        "path": "PractitionerRole.code.coding.code",
        "comment": "CodeValue included in the configuration xml file."
      },
      {
        "id": "PractitionerRole.code.coding:FHIRCoding.display",
        "path": "PractitionerRole.code.coding.display",
        "comment": "DisplayName included in the configuration xml file."
      },
      {
        "id": "PractitionerRole.code.coding:DIPSCoding",
        "path": "PractitionerRole.code.coding",
        "sliceName": "DIPSCoding"
      },
      {
        "id": "PractitionerRole.code.coding:DIPSCoding.system",
        "path": "PractitionerRole.code.coding.system",
        "fixedUri": "urn:oid:1.3.6.1.4.1.9038.52.1012"
      },
      {
        "id": "PractitionerRole.code.coding:DIPSCoding.code",
        "path": "PractitionerRole.code.coding.code",
        "comment": "Kode column of dwkodeverkverdier table."
      },
      {
        "id": "PractitionerRole.code.coding:DIPSCoding.display",
        "path": "PractitionerRole.code.coding.display",
        "comment": "Kortnavn column of dwkodeverkverdier table."
      },
      {
        "id": "PractitionerRole.specialty",
        "path": "PractitionerRole.specialty",
        "comment": "Skipped",
        "max": "0"
      },
      {
        "id": "PractitionerRole.location",
        "path": "PractitionerRole.location",
        "comment": "lokid column of dwhelsetjenesterolle table."
      },
      {
        "id": "PractitionerRole.location.reference",
        "path": "PractitionerRole.location.reference",
        "comment": "lokid column of dwhelsetjenesterolle table"
      },
      {
        "id": "PractitionerRole.healthcareService",
        "path": "PractitionerRole.healthcareService",
        "comment": "Maps healthserviceid column of dwhelsetjenesterolle table to the reference."
      },
      {
        "id": "PractitionerRole.healthcareService.reference",
        "path": "PractitionerRole.healthcareService.reference",
        "comment": "healthserviceid column of dwhelsetjenesterolle table"
      },
      {
        "id": "PractitionerRole.healthcareService.display",
        "path": "PractitionerRole.healthcareService.display",
        "comment": "servicename column of Cohealthservice table."
      },
      {
        "id": "PractitionerRole.telecom",
        "path": "PractitionerRole.telecom",
        "comment": "Organization telephone number, Organization fax, Organization email are mapped.\r\nTelefon, Telefax, Emailadresse columns of dworganisasjon table are used as respectively."
      },
      {
        "id": "PractitionerRole.telecom.system",
        "path": "PractitionerRole.telecom.system",
        "comment": "Respective ContactPoint.ContactPointSystem is mapped."
      },
      {
        "id": "PractitionerRole.telecom.value",
        "path": "PractitionerRole.telecom.value",
        "comment": "Organization telephone number, Organization fax, Organization email are mapped to value.\r\nTelefon, Telefax, Emailadresse columns of dworganisasjon table are used."
      },
      {
        "id": "PractitionerRole.telecom.use",
        "path": "PractitionerRole.telecom.use",
        "comment": "Respective ContactPoint.ContactPointUse is mapped."
      },
      {
        "id": "PractitionerRole.availableTime",
        "path": "PractitionerRole.availableTime",
        "comment": "Skipped",
        "max": "0"
      },
      {
        "id": "PractitionerRole.notAvailable",
        "path": "PractitionerRole.notAvailable",
        "comment": "Skipped",
        "max": "0"
      },
      {
        "id": "PractitionerRole.availabilityExceptions",
        "path": "PractitionerRole.availabilityExceptions",
        "comment": "Skipped",
        "max": "0"
      },
      {
        "id": "PractitionerRole.endpoint",
        "path": "PractitionerRole.endpoint",
        "comment": "Skipped",
        "max": "0"
      }
    ]
  }
}