PackagesCanonicalsLogsProblems
    Packages
    uk.nhsdigital.r4.test@2.8.8-prerelease
    https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task
description: null
package_name: uk.nhsdigital.r4.test
derivation: constraint
name: NHSDigitalTask
type: Task
elements:
  restriction:
    mustSupport: true
    index: 39
    elements:
      period:
        elements:
          end: {mustSupport: true, index: 40}
  reasonCode:
    mustSupport: true
    index: 31
    elements:
      coding:
        index: 32
        elements:
          system: {index: 33}
          code: {index: 34}
          display: {index: 35}
        required: [display, system, code]
        slicing:
          rules: open
          discriminator:
          - {path: system, type: value}
          min: null
          slices:
            SNOMED:
              match: {system: 'http://snomed.info/sct'}
              schema:
                index: 36
                elements:
                  system:
                    pattern: {type: Uri, value: 'http://snomed.info/sct'}
                    index: 37
  statusReason: {index: 7}
  authoredOn: {mustSupport: true, index: 24}
  note: {mustSupport: true, index: 38}
  extension:
    index: 0
    slicing:
      rules: open
      discriminator:
      - {path: url, type: value}
      min: 0
      slices:
        agent:
          match: {url: null}
          schema: {short: Provenance of the resource, type: Extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-Provenance-agent', index: 1}
          min: 0
          max: 1
        prescription:
          match: {url: null}
          schema: {short: EPS Patient Tracker extension, type: Extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-Prescription', index: 2}
          min: 0
          max: 1
        repeatInformation:
          match: {url: null}
          schema: {short: Used in the EPS Prescription Tracker, type: Extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation', index: 3}
          min: 0
          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: NHS Number must be in 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
    index: 20
    elements:
      identifier:
        index: 21
        elements:
          system:
            pattern: {type: Uri, value: 'https://fhir.nhs.uk/Id/nhs-number'}
            index: 22
          value: {index: 23}
        required: [value, system]
    required: [identifier]
  requester:
    type: Reference
    mustSupport: true
    refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole']
    index: 25
    elements:
      identifier:
        elements:
          system: {index: 26}
          value: {index: 27}
        required: [value, system]
  status: {mustSupport: true, index: 6}
  groupIdentifier: {mustSupport: true, index: 5}
  code:
    mustSupport: true
    index: 9
    elements:
      coding:
        index: 10
        elements:
          system: {index: 11}
          code: {index: 12}
        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: 13
                elements:
                  system:
                    pattern: {type: Uri, value: 'http://snomed.info/sct'}
                    index: 14
            Fulfilment:
              match: {system: 'http://hl7.org/fhir/CodeSystem/task-code'}
              schema:
                binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-task-code'}
                index: 15
                elements:
                  system:
                    pattern: {type: Uri, value: 'http://hl7.org/fhir/CodeSystem/task-code'}
                    index: 16
            Worflow:
              match: {system: 'https://fhir.nhs.uk/CodeSystem/Workflow-Code'}
              schema:
                binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-workflow-code'}
                index: 17
                elements:
                  system:
                    pattern: {type: Uri, value: 'https://fhir.nhs.uk/CodeSystem/Workflow-Code'}
                    index: 18
  identifier: {mustSupport: true, index: 4}
  intent: {mustSupport: true, index: 8}
  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: 19
  input: {mustSupport: true, index: 41}
  owner:
    type: Reference
    short: Responsible organisation
    mustSupport: true
    refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole']
    index: 28
    elements:
      identifier:
        elements:
          system: {index: 29}
          value: {index: 30}
        required: [value, system]
package_version: 2.8.8-prerelease
extensions:
  agent: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-Provenance-agent', min: 0, max: 1, short: Provenance of the resource, type: Extension, mustSupport: true, index: 1}
  prescription: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-Prescription', min: 0, max: 1, short: EPS Patient Tracker extension, type: Extension, mustSupport: true, index: 2}
  repeatInformation: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation', min: 0, max: 1, short: Used in the EPS Prescription Tracker, type: Extension, mustSupport: true, index: 3}
class: profile
kind: resource
url: https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task
base: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Task
version: null
required: [for, code]