{
  "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",
  "status": "draft",
  "publisher": "MedMij",
  "contact": [
    {
      "name": "MedMij",
      "telecom": [
        {
          "system": "email",
          "value": "info@medmij.nl",
          "use": "work"
        }
      ]
    }
  ],
  "description": "This (FHIR) Task profile describes a patient-specific actionable item, intended to be presented to the patient in a client application (e.g., a PGO) and/or processed within the Koppeltaal workflow. It may optionally reference an ActivityDefinition that defines what should be launched or performed (module, questionnaire, information, measurement).",
  "purpose": "This profile represents a patient-specific actionable item, intended to be presented to the patient in a client application (e.g., a PGO) and/or processed in the Koppeltaal workflow, optionally instantiating an ActivityDefinition that can be launched or performed (module, questionnaire, information, measurement).",
  "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.1 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": "A patient-specific actionable item, assigned to the patient and optionally linked to an ActivityDefinition describing what to launch or perform.",
        "alias": [
          "Taak"
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-1",
            "comment": "Task"
          }
        ]
      },
      {
        "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. In both MedMij and Koppeltaal implementations, this link is carried using the Koppeltaal instantiates extension.",
        "alias": [
          "DigitaleActiviteit",
          "user content"
        ]
      },
      {
        "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-ActivityDefinition"
            ]
          }
        ]
      },
      {
        "id": "Task.extension:resource-origin",
        "path": "Task.extension",
        "sliceName": "resource-origin",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://koppeltaal.nl/fhir/StructureDefinition/resource-origin"
            ]
          }
        ]
      },
      {
        "id": "Task.extension:instantiates",
        "path": "Task.extension",
        "sliceName": "instantiates",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://vzvz.nl/fhir/StructureDefinition/instantiates"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-2",
            "comment": "ActivityDefinition"
          }
        ]
      },
      {
        "id": "Task.identifier",
        "path": "Task.identifier",
        "min": 1
      },
      {
        "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": [
          "GebaseerdOp"
        ],
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://medmij.nl/fhir/StructureDefinition/pt-ServiceRequest-DigitalGroupPlan"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-3",
            "comment": "BasedOn"
          }
        ]
      },
      {
        "id": "Task.partOf",
        "path": "Task.partOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://medmij.nl/fhir/StructureDefinition/pt-Task"
            ]
          }
        ]
      },
      {
        "id": "Task.status",
        "path": "Task.status",
        "short": "Status",
        "definition": "Current state of the Task in the workflow (e.g., requested, received, accepted, in-progress, completed, cancelled).",
        "alias": [
          "Status"
        ],
        "mapping": [
          {
            "identity": "pt-dataset-100-alpha1-20260511",
            "map": "pt-dataelement-4",
            "comment": "Status"
          }
        ]
      },
      {
        "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.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://medmij.nl/fhir/StructureDefinition/pt-ServiceRequest-ExecutionOrder"
            ]
          }
        ]
      },
      {
        "id": "Task.for",
        "path": "Task.for",
        "definition": "The patient who benefits from the performance of the service specified in the task.",
        "comment": "In this profile, this element always refers to the patient for whom the task is intended.",
        "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.requester",
        "path": "Task.requester",
        "definition": "In Koppeltaal this element contains a reference to the person requesting the eHealth 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/Device",
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
              "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",
        "definition": "Practitioner, CareTeam, RelatedPerson or Patient currently responsible for task execution.",
        "comment": "For Koppeltaal: In Koppeltaal the patient is usually the person who executes the task. Note, this element is not intended to be used for access restriction. That is left to the relevant applications.\r\n\r\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.\r\n\r\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.\r\n\r\n In ProviderTasks, 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.",
        "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"
            ]
          }
        ]
      }
    ]
  }
}