{ "description": null, "_filename": "NHSDigital-QuestionnaireResponse.StructureDefinition.json", "package_name": "uk.nhsdigital.r4.test", "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.8.7-prerelease", "status": "draft", "id": "08813698-c258-416b-81c2-bd64b3b968d7", "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", "definition": "The Questionnaire that defines and organizes the questions for which answers are being provided.\r\n\r\n```json\r\n\"questionnaire\": \"https://fhir.nhs.uk/Questionnaire/COVIDVaccinationMedicalExemption\",\r\n```", "mustSupport": true }, { "id": "QuestionnaireResponse.status", "path": "QuestionnaireResponse.status", "mustSupport": true }, { "id": "QuestionnaireResponse.subject", "path": "QuestionnaireResponse.subject", "type": [ { "code": "Reference", "aggregation": [ "referenced" ], "targetProfile": [ "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient" ] } ], "constraint": [ { "key": "patient-reference", "human": "An identifier reference or resource reference must be provided", "source": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-QuestionnaireResponse", "severity": "error", "expression": "(reference.exists() or (identifier.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})$'))" } ], "definition": "The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.\r\n\r\n```json\r\n\"subject\": {\r\n \"identifier\": [\r\n {\r\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\r\n \"value\": \"9912003888\"\r\n }\r\n ],\r\n \"display\": \"Ivor Fritagelse\"\r\n },\r\n```", "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", "definition": "The date and/or time that this set of answers were last changed.\r\n\r\n```json\r\n\"authored\": \"2021-09-09T08:32:00+00:00\",\r\n```", "mustSupport": true }, { "id": "QuestionnaireResponse.author", "path": "QuestionnaireResponse.author", "type": [ { "code": "Reference", "aggregation": [ "contained" ], "targetProfile": [ "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization", "https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-Minimal" ] } ], "definition": "Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.\r\n\r\n```json\r\n\"author\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"B81001\"\r\n },\r\n \"display\": \"Austhorpe Springs Practice\"\r\n },\r\n```", "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", "aggregation": [ "contained" ], "targetProfile": [ "https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole" ] } ], "constraint": [ { "key": "usercode-reference", "human": "An identifier reference or resource reference must be provided", "source": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-QuestionnaireResponse", "severity": "warning", "expression": "(reference.exists() or (identifier.exists()))" }, { "key": "usercode-nmc", "human": "NMC must be of the format NNANNNNA", "source": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-QuestionnaireResponse", "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)", "source": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-QuestionnaireResponse", "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", "source": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-QuestionnaireResponse", "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", "source": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-QuestionnaireResponse", "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", "source": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-QuestionnaireResponse", "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", "source": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-QuestionnaireResponse", "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", "definition": "A group or question item from the original questionnaire for which answers are provided.\r\n\r\n```json\r\n \"item\": [\r\n {\r\n \"linkId\": \"exemptionStatus\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"https://fhir.nhs.uk/CodeSystem/covid-vaccination-medical-exemption\",\r\n \"code\": \"4\",\r\n \"display\": \"Rejected: Exemption from COVID vaccination and testing\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n```", "mustSupport": true } ] }, "baseDefinition": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-QuestionnaireResponse" }