description: This profile defines the NHS England constraints and extensions on the International FHIR resource [Task](https://hl7.org/fhir/R4/task.html). package_name: uk.nhsdigital.r4.test derivation: constraint name: NHSDigitalTask type: Task elements: restriction: mustSupport: true index: 38 elements: period: elements: end: {mustSupport: true, index: 39} reasonCode: mustSupport: true index: 30 elements: coding: index: 31 elements: system: {index: 32} code: {index: 33} display: {index: 34} required: [display, system, code] slicing: rules: open discriminator: - {path: system, type: value} min: null slices: SNOMED: match: {system: 'http://snomed.info/sct'} schema: index: 35 elements: system: pattern: {type: Uri, value: 'http://snomed.info/sct'} index: 36 statusReason: {index: 5} authoredOn: {mustSupport: true, index: 23} businessStatus: short: The new business status of the prescription, as a result of update activity. binding: {strength: preferred, valueSet: 'https://fhir.nhs.uk/ValueSet/DM-prescription-task-status-reason'} index: 6 note: {mustSupport: true, index: 37} extension: type: Extension short: EPS Patient Tracker extension mustSupport: true url: https://fhir.nhs.uk/StructureDefinition/Extension-EPS-Prescription index: 0 slicing: slices: prescription: match: {} schema: {type: Extension, short: EPS Patient Tracker extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-Prescription', index: 0} max: 1 repeatInformation: match: {} schema: {type: Extension, short: Used in the EPS Prescription Tracker, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation', index: 1} max: 1 for: constraint: patient-reference: {human: An identifier reference or resource reference must be provided, severity: error, expression: (reference.exists() or identifier.exists())} patient-nhs: {human: Length of the supplied NHS Number is wrong., 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(''^([0-9]{10})$''))'} mustSupport: true index: 19 elements: identifier: index: 20 elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/Id/nhs-number'} index: 21 value: {index: 22} required: [value, system] required: [identifier] requester: type: Reference mustSupport: true refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole'] index: 24 elements: identifier: elements: system: {index: 25} value: {index: 26} required: [value, system] status: {mustSupport: true, index: 4} groupIdentifier: {mustSupport: true, index: 3} code: mustSupport: true index: 8 elements: coding: index: 9 elements: system: {index: 10} code: {index: 11} required: [system, code] slicing: rules: open discriminator: - {path: system, type: value} min: null slices: SNOMED: match: {system: 'http://snomed.info/sct'} schema: binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-action-code'} index: 12 elements: system: pattern: {type: Uri, value: 'http://snomed.info/sct'} index: 13 Fulfilment: match: {system: 'http://hl7.org/fhir/CodeSystem/task-code'} schema: binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-task-code'} index: 14 elements: system: pattern: {type: Uri, value: 'http://hl7.org/fhir/CodeSystem/task-code'} index: 15 Worflow: match: {system: 'https://fhir.nhs.uk/CodeSystem/Workflow-Code'} schema: binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-workflow-code'} index: 16 elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/CodeSystem/Workflow-Code'} index: 17 identifier: {mustSupport: true, index: 2} intent: {mustSupport: true, index: 7} focus: type: Reference constraint: nhsd-taskfocus: {human: focus - An identifier reference or resource reference must be provided, severity: error, expression: (reference.exists() or identifier.exists())} mustSupport: true refers: ['https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Appointment', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Bundle-FHIRMessage', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Questionnaire', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest'] index: 18 input: {mustSupport: true, index: 40} owner: type: Reference short: Responsible organisation mustSupport: true refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole'] index: 27 elements: identifier: elements: system: {index: 28} value: {index: 29} required: [value, system] package_version: 2.18.11-prerelease extensions: prescription: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-Prescription', max: 1, type: Extension, short: EPS Patient Tracker extension, mustSupport: true, index: 0} repeatInformation: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation', max: 1, type: Extension, short: Used in the EPS Prescription Tracker, mustSupport: true, index: 1} class: profile kind: resource url: https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task base: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Task version: 1.2.0 required: [for, code]