<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="pt-Task" />
  <text>
    <status value="empty" />
    <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>
  </text>
  <url value="http://medmij.nl/fhir/StructureDefinition/pt-Task" />
  <name value="PtTask" />
  <title value="pt Task" />
  <status value="draft" />
  <publisher value="MedMij" />
  <contact>
    <name value="MedMij" />
    <telecom>
      <system value="email" />
      <value value="info@medmij.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="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 value="This Task resource represents the Task building block for patient use cases in the context of the data service Provider Tasks (Aanbiedertaken)." />
  <copyright value="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 value="4.0.1" />
  <mapping>
    <identity value="pt-dataset-100-alpha1-20260511" />
    <name value="Dataset Aanbiedertaken MedMij 1.0.0-alpha.2 20260511" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Task" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Task" />
  <derivation value="constraint" />
  <differential>
    <element id="Task">
      <path value="Task" />
      <short value="Task" />
      <definition value="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 value="Taak" />
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-1" />
        <comment value="Task" />
      </mapping>
    </element>
    <element id="Task.meta.tag">
      <path value="Task.meta.tag" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Task.meta.tag:dataService">
      <path value="Task.meta.tag" />
      <sliceName value="dataService" />
      <short value="Data service tag" />
      <definition value="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 value="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 value="1" />
      <max value="1" />
      <patternCoding>
        <system value="http://medmij.nl/fhir/CodeSystem/DataService" />
        <code value="urn:oid:2.16.528.1.1023.5.6" />
      </patternCoding>
    </element>
    <element id="Task.extension">
      <path value="Task.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <short value="Reference to ActivityDefinition" />
      <definition value="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 value="DigitaleActiviteit" />
      <alias value="user content" />
      <min value="1" />
    </element>
    <element id="Task.extension.extension">
      <path value="Task.extension.extension" />
      <max value="0" />
    </element>
    <element id="Task.extension.value[x]">
      <path value="Task.extension.value[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="Task.extension.value[x]:valueReference">
      <path value="Task.extension.value[x]" />
      <sliceName value="valueReference" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://medmij.nl/fhir/StructureDefinition/pt-DigitalActivity" />
      </type>
    </element>
    <element id="Task.extension:digitalActivity">
      <path value="Task.extension" />
      <sliceName value="digitalActivity" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://medmij.nl/fhir/StructureDefinition/ext-Task.DigitalActivity" />
      </type>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-2" />
        <comment value="DigitalActivity" />
      </mapping>
    </element>
    <element id="Task.identifier">
      <path value="Task.identifier" />
      <short value="Identifier" />
      <definition value="Business identifier for this patient task." />
      <alias value="Identificatie" />
      <min value="1" />
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-33" />
        <comment value="Identifier" />
      </mapping>
    </element>
    <element id="Task.basedOn">
      <path value="Task.basedOn" />
      <short value="Digital group plan" />
      <definition value="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 value="DigitaalGroepsplan" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://medmij.nl/fhir/StructureDefinition/pt-DigitalGroupPlan" />
      </type>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-3" />
        <comment value="GroupPlan" />
      </mapping>
    </element>
    <element id="Task.status">
      <path value="Task.status" />
      <short value="Status" />
      <alias value="Status" />
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-4" />
        <comment value="Status" />
      </mapping>
    </element>
    <element id="Task.intent">
      <path value="Task.intent" />
      <comment value="Within the Provider Tasks data service all Tasks are expected to have an intent of _order_." />
    </element>
    <element id="Task.priority">
      <path value="Task.priority" />
      <short value="Priority" />
      <definition value="Indicates how urgent it is to perform the activity (e.g., routine, urgent, asap)." />
      <alias value="Prioriteit" />
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-5" />
        <comment value="Priority" />
      </mapping>
    </element>
    <element id="Task.description">
      <path value="Task.description" />
      <definition value="A free-text description of what is to be performed. Implementers should ensure the text is readable on mobile applications." />
      <alias value="Omschrijving" />
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-6" />
        <comment value="Description" />
      </mapping>
    </element>
    <element id="Task.focus">
      <path value="Task.focus" />
      <short value="Patient-specific execution details" />
      <definition value="Reference to the ServiceRequest that contains patient-specific scheduling and/or instructions that deviate from or complement the generic ActivityDefinition guidance." />
      <alias value="Uitvoeringsopdracht" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://medmij.nl/fhir/StructureDefinition/pt-ExecutionOrder" />
      </type>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-19" />
        <comment value="ExecutionOrder" />
      </mapping>
    </element>
    <element id="Task.for">
      <path value="Task.for" />
      <definition value="The patient who benefits from the performance of the service specified in the task." />
      <requirements value="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 value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-Patient" />
      </type>
    </element>
    <element id="Task.executionPeriod">
      <path value="Task.executionPeriod" />
      <short value="ExecutionPeriod" />
      <definition value="Time window in which the task should be performed (start/end), if applicable." />
      <alias value="Periode" />
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-7" />
        <comment value="ExecutionPeriod" />
      </mapping>
    </element>
    <element id="Task.authoredOn">
      <path value="Task.authoredOn" />
      <short value="AuthoredOn" />
      <alias value="CreatieDatumTijd" />
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-34" />
        <comment value="AuthoredOn" />
      </mapping>
    </element>
    <element id="Task.lastModified">
      <path value="Task.lastModified" />
      <short value="LastModified" />
      <alias value="MutatieDatumTijd" />
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-35" />
        <comment value="LastModified" />
      </mapping>
    </element>
    <element id="Task.requester">
      <path value="Task.requester" />
      <short value="Requester" />
      <definition value="The healthcare professional who requested or initiated this Task." />
      <comment value="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.&#xA;&#xA;In 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 value="Aanvrager" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole" />
      </type>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-8" />
        <comment value="Requester" />
      </mapping>
    </element>
    <element id="Task.owner">
      <path value="Task.owner" />
      <short value="Owner" />
      <definition value="The party currently responsible for executing the task." />
      <comment value="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.&#xA;&#xA;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.&#xA;&#xA;In 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 value="Eigenaar" />
      <alias value="Executer" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CareTeam" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/HealthcareService" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-CareTeam" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-Patient" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-ContactPerson" />
      </type>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-24" />
        <comment value="Owner" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>