description: null package_name: uk.nhsdigital.r4 derivation: constraint name: NHSDigitalQuestionnaireResponse type: QuestionnaireResponse elements: identifier: {mustSupport: true, index: 0} questionnaire: {mustSupport: true, index: 1} subject: type: Reference constraint: patient-reference: {human: An identifier reference plus a display name or resource reference must be provided, severity: error, 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-Claim', 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'] index: 2 elements: identifier: elements: system: {mustSupport: true, index: 3} value: {mustSupport: true, index: 4} required: [value, system] display: {mustSupport: true, index: 5} authored: {index: 6} author: type: Reference mustSupport: true refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization'] index: 7 elements: identifier: elements: system: {mustSupport: true, index: 8} value: {mustSupport: true, index: 9} required: [value, system] display: {mustSupport: true, index: 10} source: type: Reference constraint: usercode-reference: {human: An identifier reference plus a display name or resource reference must be provided, severity: warning, expression: (reference.exists() or (identifier.exists() and display.exists()))} usercode-nmc: {human: NMC must be of the format NNANNNNA, 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}$''))'} usercodee-gmp: {human: GMP must be of the format GNNNNNNN and not be a spurious code (starts with G6 or G7), 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, 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, 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, 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, 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}$''))'} mustSupport: true refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole'] index: 11 elements: identifier: mustSupport: true index: 12 elements: value: {index: 13} required: [value] display: {mustSupport: true, index: 14} required: [identifier] item: {mustSupport: true, index: 15} package_version: 2.4.3 class: profile kind: resource url: https://fhir.nhs.uk/StructureDefinition/NHSDigital-QuestionnaireResponse base: https://fhir.hl7.org.uk/StructureDefinition/UKCore-QuestionnaireResponse version: null required: [authored, item, subject, questionnaire]