{
  "resourceType": "StructureDefinition",
  "id": "pt-Task",
  "text": {
    "status": "empty",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">No narrative is provided for definitional resources. A human-readable rendering can be found in the implementation guide(s) where this resource is used.</div>"
  },
  "url": "http://medmij.nl/fhir/StructureDefinition/pt-Task",
  "name": "PtTask",
  "title": "pt Task",
  "status": "draft",
  "publisher": "MedMij",
  "contact": [
    {
      "name": "MedMij",
      "telecom": [
        {
          "system": "email",
          "value": "info@medmij.nl",
          "use": "work"
        }
      ]
    }
  ],
  "description": "Patient-specific task that tells a patient what to do as part of a digital care activity. A Task is shown in the patient's task list and supports tracking progress and completion over time.",
  "purpose": "This Task resource represents the Task building block for patient use cases in the context of the data service Provider Tasks (Aanbiedertaken).",
  "copyright": "Copyright and related rights waived via CC0, https://creativecommons.org/publicdomain/zero/1.0/. This does not apply to information from third parties, for example a medical terminology system. The implementer alone is responsible for identifying and obtaining any necessary licenses or authorizations to utilize third party IP in connection with the specification or otherwise.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "pt-dataset-100-alpha1-20260511",
      "name": "Dataset Aanbiedertaken MedMij 1.0.0-alpha.2 20260511"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Task",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Task",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Task",
        "path": "Task",
        "short": "Task",
        "definition": "Patient-specific task that tells a patient what to do as part of a digital care activity. A Task is shown in the patient's task list and supports tracking progress and completion over time.",
        "alias": [
          "Taak"
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-1",
            "comment": "Task"
          }
        ]
      },
      {
        "id": "Task.meta.tag",
        "path": "Task.meta.tag",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Task.meta.tag:dataService",
        "path": "Task.meta.tag",
        "sliceName": "dataService",
        "short": "Data service tag",
        "definition": "Marks this Task as being in scope for the Provider Tasks (Aanbiedertaken) data service, so it can be distinguished from Tasks used in other contexts.",
        "comment": "A tag is used because R4 offers no better place to categorize a Task. `Task.code` is not suitable: it states what kind of work is to be performed (e.g. a blood pressure measurement or a saturation measurement), not which data service the Task belongs to. Unlike most other resources, Task has no `category` element; this gap has been raised with HL7 in [FHIR-57849](https://jira.hl7.org/browse/FHIR-57849).",
        "min": 1,
        "max": "1",
        "patternCoding": {
          "code": "urn:oid:2.16.528.1.1023.5.6",
          "system": "http://medmij.nl/fhir/CodeSystem/DataService"
        }
      },
      {
        "id": "Task.extension",
        "path": "Task.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "short": "Reference to ActivityDefinition",
        "definition": "A link to the ActivityDefinition that defines the launchable eHealth activity (i.e., what module/content should be launched or performed) associated with this Task.",
        "alias": [
          "DigitaleActiviteit",
          "user content"
        ],
        "min": 1
      },
      {
        "id": "Task.extension.extension",
        "path": "Task.extension.extension",
        "max": "0"
      },
      {
        "id": "Task.extension.value[x]",
        "path": "Task.extension.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Task.extension.value[x]:valueReference",
        "path": "Task.extension.value[x]",
        "sliceName": "valueReference",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://medmij.nl/fhir/StructureDefinition/pt-DigitalActivity"
            ]
          }
        ]
      },
      {
        "id": "Task.extension:digitalActivity",
        "path": "Task.extension",
        "sliceName": "digitalActivity",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://medmij.nl/fhir/StructureDefinition/ext-Task.DigitalActivity"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-2",
            "comment": "DigitalActivity"
          }
        ]
      },
      {
        "id": "Task.identifier",
        "path": "Task.identifier",
        "short": "Identifier",
        "definition": "Business identifier for this patient task.",
        "alias": [
          "Identificatie"
        ],
        "min": 1,
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-33",
            "comment": "Identifier"
          }
        ]
      },
      {
        "id": "Task.basedOn",
        "path": "Task.basedOn",
        "short": "Digital group plan",
        "definition": "Reference to the ServiceRequest that initiates the digital group plan for the patient. This is the module-level order and links the Task to the requested digital group plan.",
        "alias": [
          "DigitaalGroepsplan"
        ],
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://medmij.nl/fhir/StructureDefinition/pt-DigitalGroupPlan"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-3",
            "comment": "GroupPlan"
          }
        ]
      },
      {
        "id": "Task.status",
        "path": "Task.status",
        "short": "Status",
        "alias": [
          "Status"
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-4",
            "comment": "Status"
          }
        ]
      },
      {
        "id": "Task.intent",
        "path": "Task.intent",
        "comment": "Within the Provider Tasks data service all Tasks are expected to have an intent of _order_."
      },
      {
        "id": "Task.priority",
        "path": "Task.priority",
        "short": "Priority",
        "definition": "Indicates how urgent it is to perform the activity (e.g., routine, urgent, asap).",
        "alias": [
          "Prioriteit"
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-5",
            "comment": "Priority"
          }
        ]
      },
      {
        "id": "Task.description",
        "path": "Task.description",
        "definition": "A free-text description of what is to be performed. Implementers should ensure the text is readable on mobile applications.",
        "alias": [
          "Omschrijving"
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-6",
            "comment": "Description"
          }
        ]
      },
      {
        "id": "Task.focus",
        "path": "Task.focus",
        "short": "Patient-specific execution details",
        "definition": "Reference to the ServiceRequest that contains patient-specific scheduling and/or instructions that deviate from or complement the generic ActivityDefinition guidance.",
        "alias": [
          "Uitvoeringsopdracht"
        ],
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://medmij.nl/fhir/StructureDefinition/pt-ExecutionOrder"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-19",
            "comment": "ExecutionOrder"
          }
        ]
      },
      {
        "id": "Task.for",
        "path": "Task.for",
        "definition": "The patient who benefits from the performance of the service specified in the task.",
        "requirements": "Used to track tasks outstanding for a beneficiary. Do not use to track the task owner or creator (see owner and creator respectively). This can also affect access control.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-Patient"
            ]
          }
        ]
      },
      {
        "id": "Task.executionPeriod",
        "path": "Task.executionPeriod",
        "short": "ExecutionPeriod",
        "definition": "Time window in which the task should be performed (start/end), if applicable.",
        "alias": [
          "Periode"
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-7",
            "comment": "ExecutionPeriod"
          }
        ]
      },
      {
        "id": "Task.authoredOn",
        "path": "Task.authoredOn",
        "short": "AuthoredOn",
        "alias": [
          "CreatieDatumTijd"
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-34",
            "comment": "AuthoredOn"
          }
        ]
      },
      {
        "id": "Task.lastModified",
        "path": "Task.lastModified",
        "short": "LastModified",
        "alias": [
          "MutatieDatumTijd"
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-35",
            "comment": "LastModified"
          }
        ]
      },
      {
        "id": "Task.requester",
        "path": "Task.requester",
        "short": "Requester",
        "definition": "The healthcare professional who requested or initiated this Task.",
        "comment": "Each occurrence of the zib HealthProfessional is normally represented by _two_ FHIR resources: a PractitionerRole resource (instance of [nl-core-HealthProfessional-PractitionerRole](http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole)) and a Practitioner resource (instance of [nl-core-HealthProfessional-Practitioner](http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-Practitioner)). The Practitioner resource is referenced from the PractitionerRole instance. For this reason, sending systems should fill the reference to the PractitionerRole instance here, and not the Practitioner resource. Receiving systems can then retrieve the reference to the Practitioner resource from that PractitionerRole instance.\n\nIn rare circumstances, there is only a Practitioner instance, in which case it is that instance which will be referenced here. However, since this should be the exception, the nl-core-HealthProfessional-Practitioner profile is not explicitly mentioned as a target profile.",
        "alias": [
          "Aanvrager"
        ],
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-8",
            "comment": "Requester"
          }
        ]
      },
      {
        "id": "Task.owner",
        "path": "Task.owner",
        "short": "Owner",
        "definition": "The party currently responsible for executing the task.",
        "comment": "In Provider Tasks, the owner is typically the performer of the task (usually the patient), but execution may also be delegated to another responsible party such as a caregiver/contact person or a care team.\n\nEach occurrence of the zib HealthProfessional is normally represented by two FHIR resources: a PractitionerRole resource (instance of [nl-core-HealthProfessional-PractitionerRole](http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole)) and a Practitioner resource (instance of [nl-core-HealthProfessional-Practitioner](http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-Practitioner)). The Practitioner resource is referenced from the PractitionerRole instance. For this reason, sending systems should fill the reference to the PractitionerRole instance here, and not the Practitioner resource. Receiving systems can then retrieve the reference to the Practitioner resource from that PractitionerRole instance.\n\nIn rare circumstances, there is only a Practitioner instance, in which case it is that instance which will be referenced here. However, since this should be the exception, the nl-core-HealthProfessional-Practitioner profile is not explicitly mentioned as a target profile.",
        "alias": [
          "Eigenaar",
          "Executer"
        ],
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/CareTeam",
              "http://hl7.org/fhir/StructureDefinition/HealthcareService",
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/Device",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-CareTeam",
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-Patient",
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole",
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-ContactPerson"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-24",
            "comment": "Owner"
          }
        ]
      }
    ]
  }
}