description: null package_name: uk.nhsdigital.r4 derivation: constraint name: NHSDigitalImmunization type: Immunization elements: patient: type: Reference constraint: patient-reference: {human: subject - An identifier reference plus a display name or resource reference must be provided, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Immunization', severity: warning, expression: (reference.exists() or (identifier.exists() and display.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: 16 elements: identifier: index: 17 elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/Id/nhs-number'} index: 18 value: {index: 19} required: [value, system] required: [identifier] reportOrigin: {mustSupport: true, index: 25} protocolApplied: mustSupport: true index: 48 elements: targetDisease: binding: {strength: required, valueSet: 'http://hl7.eu/fhir/ig/dgc/ValueSet/covid-19-diseases'} mustSupport: true index: 49 site: binding: {strength: extensible, valueSet: 'https://fhir.hl7.org.uk/ValueSet/UKCore-BodySite'} mustSupport: true index: 31 elements: coding: index: 32 elements: system: {index: 33} code: {index: 34} display: {index: 35} required: [display, system, code] required: [coding] vaccineCode: index: 11 elements: coding: mustSupport: true index: 12 elements: system: {index: 13} code: {index: 14} display: {index: 15} required: [display, system, code] required: [coding] doseQuantity: {mustSupport: true, index: 37} reasonCode: mustSupport: true index: 43 elements: coding: mustSupport: true index: 44 elements: system: {index: 45} code: {index: 46} display: {index: 47} required: [display, system, code] required: [coding] statusReason: elements: coding: index: 7 elements: system: {index: 8} code: {index: 9} display: {index: 10} required: [display, system, code] required: [coding] route: {mustSupport: true, index: 36} recorded: {mustSupport: true, index: 23} 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: 24} status: {mustSupport: true, index: 6} lotNumber: {mustSupport: true, index: 29} identifier: mustSupport: true index: 3 elements: system: {index: 4} value: {index: 5} required: [value, system] manufacturer: mustSupport: true index: 27 elements: display: {index: 28} required: [display] location: {mustSupport: true, index: 26} occurrenceDateTime: {type: dateTime, mustSupport: true, choiceOf: occurrence, index: 22} occurrence: mustSupport: true choices: [occurrenceDateTime] index: 21 expirationDate: {mustSupport: true, index: 30} performer: mustSupport: true index: 38 elements: actor: 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 index: 39 elements: type: {index: 40} identifier: elements: system: {index: 41} value: {index: 42} required: [value, system] required: [type] package_version: 2.4.4 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]