PackagesCanonicalsLogsProblems
    Packages
    uk.nhsdigital.r4.test@2.8.14-prerelease
    https://fhir.nhs.uk/StructureDefinition/NHSDigital-Immunization
description: null
package_name: uk.nhsdigital.r4.test
derivation: constraint
name: NHSDigitalImmunization
type: Immunization
elements:
  patient:
    type: Reference
    constraint:
      patient-reference: {human: subject - An identifier reference or resource reference must be provided, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Immunization', severity: warning, expression: (reference.exists() or (identifier.exists()))}
      patient-nhs: {human: Supplied NHS Number is outside the English and Welsh NHS Number range or length of the number is wrong., source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Immunization', severity: error, expression: 'identifier.where(system=''https://fhir.nhs.uk/Id/nhs-number'').exists().not() or (identifier.where(system=''https://fhir.nhs.uk/Id/nhs-number'').exists()  and identifier.where(system=''https://fhir.nhs.uk/Id/nhs-number'').value.matches(''^([456789]{1}[0-9]{9})$''))'}
    mustSupport: true
    refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient-Minimal']
    index: 17
    elements:
      identifier:
        index: 18
        elements:
          system:
            pattern: {type: Uri, value: 'https://fhir.nhs.uk/Id/nhs-number'}
            index: 19
          value: {index: 20}
        required: [value, system]
    required: [identifier]
  reportOrigin: {mustSupport: true, index: 26}
  protocolApplied:
    mustSupport: true
    index: 49
    elements:
      targetDisease:
        binding: {strength: required, valueSet: 'http://hl7.eu/fhir/ig/dgc/ValueSet/covid-19-diseases'}
        mustSupport: true
        index: 50
  site:
    binding: {strength: extensible, valueSet: 'https://fhir.hl7.org.uk/ValueSet/UKCore-BodySite'}
    mustSupport: true
    index: 32
    elements:
      coding:
        index: 33
        elements:
          system: {index: 34}
          code: {index: 35}
          display: {index: 36}
        required: [display, system, code]
    required: [coding]
  vaccineCode:
    binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-VaccineCode'}
    index: 12
    elements:
      coding:
        mustSupport: true
        index: 13
        elements:
          system: {index: 14}
          code: {index: 15}
          display: {index: 16}
        required: [display, system, code]
    required: [coding]
  doseQuantity: {mustSupport: true, index: 38}
  reasonCode:
    binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-ImmunizationExplanationReason'}
    mustSupport: true
    index: 44
    elements:
      coding:
        mustSupport: true
        index: 45
        elements:
          system: {index: 46}
          code: {index: 47}
          display: {index: 48}
        required: [display, system, code]
    required: [coding]
  statusReason:
    binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-ReasonImmunizationNotAdministered'}
    index: 7
    elements:
      coding:
        index: 8
        elements:
          system: {index: 9}
          code: {index: 10}
          display: {index: 11}
        required: [display, system, code]
    required: [coding]
  route: {mustSupport: true, index: 37}
  recorded: {mustSupport: true, index: 24}
  extension:
    index: 0
    slicing:
      rules: open
      discriminator:
      - {path: url, type: value}
      min: 0
      slices:
        parentPresent:
          match: {url: null}
          schema: {mustSupport: false, index: 1}
          min: 0
        vaccinationProcedure:
          match: {url: null}
          schema: {mustSupport: true, index: 2}
          min: 0
  primarySource: {mustSupport: true, index: 25}
  status: {mustSupport: true, index: 6}
  lotNumber: {mustSupport: true, index: 30}
  identifier:
    mustSupport: true
    index: 3
    elements:
      system: {index: 4}
      value: {index: 5}
    required: [value, system]
  manufacturer:
    mustSupport: true
    index: 28
    elements:
      display: {index: 29}
    required: [display]
  location: {mustSupport: true, index: 27}
  occurrenceDateTime: {type: dateTime, mustSupport: true, choiceOf: occurrence, index: 23}
  occurrence:
    mustSupport: true
    choices: [occurrenceDateTime]
    index: 22
  expirationDate: {mustSupport: true, index: 31}
  performer:
    mustSupport: true
    index: 39
    elements:
      actor:
        type: Reference
        constraint:
          usercode-reference: {human: An identifier reference or resource reference must be provided, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Immunization', severity: error, expression: (reference.exists() or identifier.exists())}
          usercode-nmc: {human: NMC must be of the format NNANNNNA, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Immunization', severity: error, 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}$''))'}
          usercode-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-Immunization', severity: error, 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}$''))'}
          usercode-gmc: {human: GMC must be of the format CNNNNNNN, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Immunization', severity: error, 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}$''))'}
          usercode-gphc: {human: GPHC must be of the format NNNNNNN, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Immunization', severity: error, 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}$''))'}
          usercode-hcpc: {human: HCPC must be of the format AANNNNNN, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Immunization', severity: error, 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}$''))'}
          usercode-din: {human: DIN format must be NNNNNN, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Immunization', severity: error, 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-role-profile: {human: SDS Role Profile Id must be 12 digits, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole', severity: error, expression: 'identifier.where(system=''https://fhir.nhs.uk/Id/sds-role-profile-id'').exists().not() or (identifier.where(system=''https://fhir.nhs.uk/Id/sds-role-profile-id'').exists()  and identifier.where(system=''https://fhir.nhs.uk/Id/sds-role-profile-id'').value.matches(''^[0-9]{12}$''))'}
        mustSupport: true
        refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole']
        index: 40
        elements:
          type: {index: 41}
          identifier:
            elements:
              system: {index: 42}
              value: {index: 43}
            required: [value, system]
        required: [type]
package_version: 2.8.14-prerelease
extensions:
  parentPresent: {url: null, min: 0, mustSupport: false, index: 1}
  vaccinationProcedure: {url: null, min: 0, mustSupport: true, index: 2}
class: profile
kind: resource
url: https://fhir.nhs.uk/StructureDefinition/NHSDigital-Immunization
base: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Immunization
version: null
required: [primarySource, identifier]