<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" />
  <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="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 value="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 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.1 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="A patient-specific actionable item, assigned to the patient and optionally linked to an ActivityDefinition describing what to launch or perform." />
      <alias value="Taak" />
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-1" />
        <comment value="Task" />
      </mapping>
    </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. In both MedMij and Koppeltaal implementations, this link is carried using the Koppeltaal instantiates extension." />
      <alias value="DigitaleActiviteit" />
      <alias value="user content" />
    </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-ActivityDefinition" />
      </type>
    </element>
    <element id="Task.extension:resource-origin">
      <path value="Task.extension" />
      <sliceName value="resource-origin" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://koppeltaal.nl/fhir/StructureDefinition/resource-origin" />
      </type>
    </element>
    <element id="Task.extension:instantiates">
      <path value="Task.extension" />
      <sliceName value="instantiates" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="http://vzvz.nl/fhir/StructureDefinition/instantiates" />
      </type>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-2" />
        <comment value="ActivityDefinition" />
      </mapping>
    </element>
    <element id="Task.identifier">
      <path value="Task.identifier" />
      <min value="1" />
    </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="GebaseerdOp" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://medmij.nl/fhir/StructureDefinition/pt-ServiceRequest-DigitalGroupPlan" />
      </type>
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-3" />
        <comment value="BasedOn" />
      </mapping>
    </element>
    <element id="Task.partOf">
      <path value="Task.partOf" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://medmij.nl/fhir/StructureDefinition/pt-Task" />
      </type>
    </element>
    <element id="Task.status">
      <path value="Task.status" />
      <short value="Status" />
      <definition value="Current state of the Task in the workflow (e.g., requested, received, accepted, in-progress, completed, cancelled)." />
      <alias value="Status" />
      <mapping>
        <identity value="pt-dataset-100-alpha1-20260511" />
        <map value="pt-dataelement-4" />
        <comment value="Status" />
      </mapping>
    </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." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://medmij.nl/fhir/StructureDefinition/pt-ServiceRequest-ExecutionOrder" />
      </type>
    </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." />
      <comment value="In this profile, this element always refers to the patient for whom the task is intended." />
      <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.requester">
      <path value="Task.requester" />
      <definition value="In Koppeltaal this element contains a reference to the person requesting the eHealth 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/Device" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <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" />
      <definition value="Practitioner, CareTeam, RelatedPerson or Patient currently responsible for task execution." />
      <comment value="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.&#xD;&#xA;&#xD;&#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.&#xD;&#xA;&#xD;&#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.&#xD;&#xA;&#xD;&#xA; 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 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>
    </element>
  </differential>
</StructureDefinition>