PackagesCanonicalsLogsProblems
    Packages
    uk.nhsdigital.r4@2.5.0
    https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole
description: null
package_name: uk.nhsdigital.r4
derivation: constraint
name: NHSDigitalPractitionerRole
type: PractitionerRole
elements:
  specialty:
    mustSupport: true
    index: 17
    elements:
      coding:
        index: 18
        elements:
          system: {index: 19}
          code: {index: 20}
          display: {index: 21}
        required: [display, system, code]
        slicing:
          rules: open
          discriminator:
          - {path: system, type: value}
          min: 1
          slices:
            NHSDataDictionarySpecialty:
              match: {system: 'https://fhir.nhs.uk/CodeSystem/NHSDataModelAndDictionary-clinical-specialty'}
              schema:
                binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDataModelAndDictionary-clinical-specialty'}
                mustSupport: true
                index: 22
                elements:
                  system:
                    pattern: {type: Uri, value: 'https://fhir.nhs.uk/CodeSystem/NHSDataModelAndDictionary-clinical-specialty'}
                    index: 23
            SNOMEDSpecialty:
              match: {system: 'http://snomed.info/sct'}
              schema:
                binding: {strength: preferred, valueSet: 'http://hl7.org/fhir/ValueSet/c80-practice-codes'}
                mustSupport: true
                index: 24
                elements:
                  system:
                    pattern: {type: Uri, value: 'http://snomed.info/sct'}
                    index: 25
    required: [coding]
  organization:
    type: Reference
    constraint:
      nhsd-1: {human: PractitionerRole.organization - An identifier reference or resource reference should be provided, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole', severity: warning, expression: (reference.exists() or identifier.exists())}
    mustSupport: true
    refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization']
    index: 8
    elements:
      identifier:
        elements:
          system: {index: 9}
          value: {index: 10}
        required: [value, system]
  extension:
    index: 0
    slicing:
      rules: open
      discriminator:
      - {path: url, type: value}
      min: 0
      slices:
        costCentre:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-NHSDigital-Account-code', index: 1}
          min: 0
          max: 1
  code:
    mustSupport: true
    index: 11
    elements:
      coding:
        index: 12
        elements:
          system: {index: 13}
          code: {index: 14}
        required: [system, code]
        slicing:
          rules: open
          discriminator:
          - {path: system, type: value}
          min: 1
          slices:
            sdsJobRoleName:
              match: {system: 'https://fhir.hl7org.uk/CodeSystem/UKCore-SDSJobRoleName'}
              schema:
                mustSupport: true
                index: 15
                elements:
                  system:
                    pattern: {type: Uri, value: 'https://fhir.hl7org.uk/CodeSystem/UKCore-SDSJobRoleName'}
                    index: 16
    required: [coding]
  identifier:
    mustSupport: true
    index: 2
    slicing:
      rules: open
      discriminator:
      - {path: system, type: value}
      min: null
      slices:
        sdsRoleProfileID:
          match: {system: 'https://fhir.nhs.uk/Id/sds-role-profile-id'}
          schema:
            mustSupport: true
            index: 3
            elements:
              system:
                pattern: {type: Uri, value: 'https://fhir.nhs.uk/Id/sds-role-profile-id'}
                index: 4
        nhsbsaSpuriousCode:
          match: {system: 'https://fhir.hl7.org.uk/Id/nhsbsa-spurious-code'}
          schema:
            mustSupport: true
            index: 5
            elements:
              system:
                pattern: {type: Uri, value: 'https://fhir.hl7.org.uk/Id/nhsbsa-spurious-code'}
                index: 6
  practitioner:
    type: Reference
    constraint:
      nhsd-2: {human: An identifier reference or resource reference must be provided, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole', severity: warning, expression: (reference.exists() or identifier.exists())}
      role-nmc: {human: NMC must be of the format NNANNNNA, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole', severity: warning, expression: 'identifier.exists().not() or identifier.where(system=''https://fhir.hl7.org.uk/Id/nmc-number'').exists().not() or (identifier.where(system=''https://fhir.hl7.org.uk/Id/nmc-number'').exists()  and identifier.where(system=''https://fhir.hl7.org.uk/Id/nmc-number'').value.matches(''^[0-9]{2}[A-Z]{1}[0-9]{4}[A-Z]{1}$''))'}
      role-gmp: {human: GMP must be of the format GNNNNNNN and not be a spurious code (starts with G6 or G7), source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole', severity: warning, expression: 'identifier.exists().not() or identifier.where(system=''https://fhir.hl7.org.uk/Id/gmp-number'').exists().not() or (identifier.where(system=''https://fhir.hl7.org.uk/Id/gmp-number'').exists()  and identifier.where(system=''https://fhir.hl7.org.uk/Id/gmp-number'').value.matches(''^[G]{1}[01234589]{1}[0-9]{6}$''))'}
      role-gmc: {human: GMC must be of the format CNNNNNNN, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole', severity: warning, expression: 'identifier.exists().not() or identifier.where(system=''https://fhir.hl7.org.uk/Id/gmc-number'').exists().not() or (identifier.where(system=''https://fhir.hl7.org.uk/Id/gmc-number'').exists()  and identifier.where(system=''https://fhir.hl7.org.uk/Id/gmc-number'').value.matches(''^[C]{1}[0-9]{7}$''))'}
      role-gphc: {human: GPHC must be of the format NNNNNNN, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole', severity: warning, expression: 'identifier.exists().not() or identifier.where(system=''https://fhir.hl7.org.uk/Id/gphc-number'').exists().not() or (identifier.where(system=''https://fhir.hl7.org.uk/Id/gphc-number'').exists()  and identifier.where(system=''https://fhir.hl7.org.uk/Id/gphc-number'').value.matches(''^[0-9]{7}$''))'}
      role-hcpc: {human: HCPC must be of the format AANNNNNN, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole', severity: warning, expression: 'identifier.exists().not() or identifier.where(system=''https://fhir.hl7.org.uk/Id/hcpc-number'').exists().not() or (identifier.where(system=''https://fhir.hl7.org.uk/Id/hcpc-number'').exists()  and identifier.where(system=''https://fhir.hl7.org.uk/Id/hcpc-number'').value.matches(''^[A-Z]{2}[0-9]{6}$''))'}
      role-din: {human: DIN format must be NNNNNN, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole', severity: warning, expression: 'identifier.exists().not() or identifier.where(system=''https://fhir.hl7.org.uk/Id/din-number'').exists().not() or (identifier.where(system=''https://fhir.hl7.org.uk/Id/din-number'').exists()  and identifier.where(system=''https://fhir.hl7.org.uk/Id/din-number'').value.matches(''^[0-9]{6}$''))'}
      role-sds-user: {human: 'Professional code (GMC, GMP, NMC, etc) is preferred.', source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole', severity: warning, expression: 'identifier.exists().not() or identifier.where(system=''https://fhir.nhs.uk/Id/sds-user-id'').exists().not()'}
    mustSupport: true
    refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner']
    index: 7
  telecom:
    mustSupport: true
    index: 32
    elements:
      value: {index: 33}
      use: {index: 34}
    required: [value, use]
  location:
    type: Reference
    constraint:
      nhsd-3: {human: PractitionerRole.location - An identifier or resource reference must be provided, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole', severity: error, expression: (reference.exists() or identifier.exists())}
    mustSupport: false
    refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Location']
    index: 26
    elements:
      identifier:
        elements:
          system: {index: 27}
          value: {index: 28}
        required: [value, system]
  healthcareService:
    type: Reference
    constraint:
      nhsd-4: {human: PractitionerRole.healthcareService - An identifier reference plus a display name or resource reference must be provided, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole', severity: error, expression: (reference.exists() or (identifier.exists() and display.exists()))}
    mustSupport: true
    refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-HealthcareService']
    index: 29
    elements:
      identifier:
        elements:
          system: {index: 30}
          value: {index: 31}
        required: [value, system]
package_version: 2.5.0
extensions:
  costCentre: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-NHSDigital-Account-code', min: 0, max: 1, type: Extension, mustSupport: true, index: 1}
class: profile
kind: resource
url: https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole
base: https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole
version: null