{ "description": null, "_filename": "NHSDigital-QuestionnaireResponse.StructureDefinition.json", "package_name": "uk.nhsdigital.r4", "date": null, "derivation": "constraint", "publisher": null, "fhirVersion": "4.0.1", "name": "NHSDigitalQuestionnaireResponse", "abstract": false, "type": "QuestionnaireResponse", "experimental": null, "resourceType": "StructureDefinition", "title": null, "package_version": "2.4.3", "status": "draft", "id": "e1bc41ba-df23-4861-bd6a-d3bff0450ae6", "kind": "resource", "url": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-QuestionnaireResponse", "version": null, "differential": { "element": [ { "id": "QuestionnaireResponse.identifier", "path": "QuestionnaireResponse.identifier", "mustSupport": true }, { "id": "QuestionnaireResponse.questionnaire", "min": 1, "path": "QuestionnaireResponse.questionnaire", "mustSupport": true }, { "id": "QuestionnaireResponse.subject", "min": 1, "path": "QuestionnaireResponse.subject", "type": [ { "code": "Reference", "targetProfile": [ "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient" ] } ], "constraint": [ { "key": "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()))" }, { "key": "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 }, { "id": "QuestionnaireResponse.subject.identifier.system", "min": 1, "path": "QuestionnaireResponse.subject.identifier.system", "mustSupport": true }, { "id": "QuestionnaireResponse.subject.identifier.value", "min": 1, "path": "QuestionnaireResponse.subject.identifier.value", "mustSupport": true }, { "id": "QuestionnaireResponse.subject.display", "path": "QuestionnaireResponse.subject.display", "mustSupport": true }, { "id": "QuestionnaireResponse.authored", "min": 1, "path": "QuestionnaireResponse.authored" }, { "id": "QuestionnaireResponse.author", "path": "QuestionnaireResponse.author", "type": [ { "code": "Reference", "targetProfile": [ "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization" ] } ], "mustSupport": true }, { "id": "QuestionnaireResponse.author.identifier.system", "min": 1, "path": "QuestionnaireResponse.author.identifier.system", "mustSupport": true }, { "id": "QuestionnaireResponse.author.identifier.value", "min": 1, "path": "QuestionnaireResponse.author.identifier.value", "mustSupport": true }, { "id": "QuestionnaireResponse.author.display", "path": "QuestionnaireResponse.author.display", "mustSupport": true }, { "id": "QuestionnaireResponse.source", "path": "QuestionnaireResponse.source", "type": [ { "code": "Reference", "targetProfile": [ "https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole", "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner" ] } ], "constraint": [ { "key": "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()))" }, { "key": "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}$'))" }, { "key": "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}$'))" }, { "key": "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}$'))" }, { "key": "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}$'))" }, { "key": "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}$'))" }, { "key": "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 }, { "id": "QuestionnaireResponse.source.identifier", "min": 1, "path": "QuestionnaireResponse.source.identifier", "mustSupport": true }, { "id": "QuestionnaireResponse.source.identifier.value", "min": 1, "path": "QuestionnaireResponse.source.identifier.value" }, { "id": "QuestionnaireResponse.source.display", "path": "QuestionnaireResponse.source.display", "mustSupport": true }, { "id": "QuestionnaireResponse.item", "min": 1, "path": "QuestionnaireResponse.item", "mustSupport": true } ] }, "baseDefinition": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-QuestionnaireResponse" }