PackagesCanonicalsLogsProblems
    Packages
    fhir.r4.wales.psom@1.0.0-rc3
    https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PSOM-Task
description: Defines how a Task is used to ask for a Questionnaire to be completed. Each Task represents one PROMs Tool within a Collection Event.\r\n\r\nThis profile is based on the UKCore-Task and is heavily influenced by the [SDCTaskQuestionnaire](http://hl7.org/fhir/uv/sdc/STU3/StructureDefinition-sdc-task.profile.json.html).
package_name: fhir.r4.wales.psom
derivation: constraint
name: DataStandardsWalesPSOMTask
type: Task
elements:
  code:
    pattern:
      type: CodeableConcept
      value:
        coding:
        - {code: complete-questionnaire, system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/temp'}
    type: CodeableConcept
    index: 0
  focus: {index: 1}
  executionPeriod:
    index: 2
    elements:
      start: {short: PROMs Issued Date, index: 3}
      end: {short: PROMs Completion Date & Time, index: 4}
    required: [start]
  location:
    type: Reference
    short: Event Location Code
    refers: ['https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Location']
    index: 5
  reasonCode:
    short: PROMs Trigger Event Type
    binding: {strength: extensible, valueSet: 'https://fhir.nhs.wales/ValueSet/DataStandardsWales-PSOM-TriggerEventType'}
    index: 6
  input:
    array: true
    min: 2
    index: 7
    slicing:
      rules: open
      discriminator:
      - {path: type, type: value}
      min: 2
      slices:
        promsTriggerEventDate:
          match:
            type:
              coding:
              - {code: MPRPX013X, system: 'https://fhir.nhs.wales/CodeSystem/DataStandardsWales-PSOM-TaskInputType'}
          schema:
            index: 8
            elements:
              type:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: MPRPX013X, system: 'https://fhir.nhs.wales/CodeSystem/DataStandardsWales-PSOM-TaskInputType'}
                type: CodeableConcept
                index: 9
              value:
                short: PROMs Trigger Event Date
                choices: [valueDateTime]
                index: 11
              valueDateTime: {type: dateTime, short: PROMs Trigger Event Date, choiceOf: value, index: 12}
        promsLaterality:
          match:
            type:
              coding:
              - {code: MDEPX004X, system: 'https://fhir.nhs.wales/CodeSystem/DataStandardsWales-PSOM-TaskInputType'}
          schema:
            _required: true
            index: 13
            elements:
              type:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: MDEPX004X, system: 'https://fhir.nhs.wales/CodeSystem/DataStandardsWales-PSOM-TaskInputType'}
                type: CodeableConcept
                index: 14
              value:
                short: PROMs Laterality
                choices: [valueCodeableConcept]
                index: 16
              valueCodeableConcept: {type: CodeableConcept, short: PROMs Laterality, choiceOf: value, index: 17}
        questionnaire:
          match:
            type:
              coding:
              - {code: questionnaire, system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/temp'}
          schema:
            _required: true
            index: 18
            elements:
              type:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: questionnaire, system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/temp'}
                type: CodeableConcept
                index: 19
              value:
                short: (Local) PROMs Tool
                choices: [valueCanonical]
                index: 21
              valueCanonical: {type: canonical, short: (Local) PROMs Tool, choiceOf: value, index: 22}
        responseEndpoint:
          match:
            type:
              coding:
              - {code: response-endpoint, system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/temp'}
          schema:
            index: 23
            elements:
              type:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: response-endpoint, system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/temp'}
                type: CodeableConcept
                index: 24
              value:
                choices: [valueUrl]
                index: 26
              valueUrl: {type: url, choiceOf: value, index: 27}
  output:
    index: 28
    slicing:
      rules: open
      discriminator:
      - {path: type, type: value}
      min: null
      slices:
        response:
          match:
            type:
              coding:
              - {code: questionnaire-response, system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/temp'}
          schema:
            index: 29
            elements:
              type:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: questionnaire-response, system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/temp'}
                type: CodeableConcept
                index: 30
              value:
                choices: [valueReference]
                index: 32
              valueReference:
                type: Reference
                choiceOf: value
                refers: ['https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PSOM-QuestionnaireResponse']
                index: 33
package_version: 1.0.0-rc3
class: profile
kind: resource
url: https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PSOM-Task
base: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Task
version: null
required: [code, executionPeriod, reasonCode]