PackagesCanonicalsLogsProblems
    Packages
    uk.nhsdigital.r4@2.1.32-discovery
    https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole
description: null
package_name: uk.nhsdigital.r4
derivation: constraint
name: NHSDigitalPractitionerRole
type: PractitionerRole
elements:
  identifier:
    mustSupport: true
    index: 0
    slicing:
      slices:
        sdsRoleProfileID:
          match: {}
          schema: {_required: true, index: 1}
          min: 1
        nhsbsaSpuriousCode:
          match: {}
          schema:
            index: 2
            elements:
              system:
                pattern: {type: Uri, value: 'https://fhir.hl7.org.uk/Id/nhsbsa-spurious-code'}
                index: 3
              value: {index: 4}
            required: [value, system]
  practitioner:
    type: Reference
    constraint:
      nhsd-2: {human: PractitionerRole.practitioner - 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()))}
      role-nmc: {human: NMC must be of the format NNANNNNA, 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), 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, 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, 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, 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, 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}$''))'}
    mustSupport: true
    refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner']
    index: 5
  organization:
    type: Reference
    constraint:
      nhsd-1: {human: PractitionerRole.organization - 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-Organization']
    index: 6
    elements:
      identifier:
        elements:
          system: {index: 7}
          value: {index: 8}
        required: [value, system]
  code:
    binding: {strength: preferred, valueSet: 'https://fhir.hl7.org.uk/ValueSet/UKCore-SDSJobRoleName'}
    index: 9
    slicing:
      slices:
        sdsJobRoleName:
          match: {}
          schema: {_required: true, index: 10}
          min: 1
  specialty:
    elements:
      coding:
        index: 11
        elements:
          system: {index: 12}
          code: {index: 13}
          display: {index: 14}
        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'}
                index: 15
                elements:
                  system:
                    pattern: {type: Uri, value: 'https://fhir.nhs.uk/CodeSystem/NHSDataModelAndDictionary-clinical-specialty'}
                    index: 16
            SNOMEDSpecialty:
              match: {system: 'http://snomed.info/sct'}
              schema:
                binding: {strength: preferred, valueSet: 'http://hl7.org/fhir/ValueSet/c80-practice-codes'}
                index: 17
                elements:
                  system:
                    pattern: {type: Uri, value: 'http://snomed.info/sct'}
                    index: 18
    required: [coding]
  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: 19
    elements:
      identifier:
        elements:
          system: {index: 20}
          value: {index: 21}
        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: 22
    elements:
      identifier:
        elements:
          system: {index: 23}
          value: {index: 24}
        required: [value, system]
  telecom:
    mustSupport: true
    index: 25
    elements:
      value: {index: 26}
      use: {index: 27}
    required: [value, use]
package_version: 2.1.32-discovery
class: profile
kind: resource
url: https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole
base: https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole
version: null
required: [practitioner, identifier, telecom, organization]