<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="basetask-profile" />
  <url value="http://fhir.xt.dev/StructureDefinition/BaseTask" />
  <version value="2.1.0" />
  <name value="BaseTask" />
  <status value="active" />
  <date value="2026-07-29T22:13:37.6670843+02:00" />
  <publisher value="x-tention Informationstechnologie GmbH" />
  <contact>
    <telecom>
      <system value="email" />
      <value value="fhir.profiling@x-tention.com" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="Adds the requestedPerformer and performer from R5 Tasks to R4 Tasks and sets some basic standards for x-tention solutions." />
  <copyright value="x-tention Informationstechnologie GmbH" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="true" />
  <type value="Task" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Task" />
  <derivation value="constraint" />
  <differential>
    <element id="Task.extension:performer">
      <path value="Task.extension" />
      <sliceName value="performer" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://fhir.xt.dev/StructureDefinition/TaskPerformer" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Task.extension:requestedPerformer">
      <path value="Task.extension" />
      <sliceName value="requestedPerformer" />
      <type>
        <code value="Extension" />
        <profile value="http://fhir.xt.dev/StructureDefinition/TaskRequestedPerformer" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Task.instantiatesCanonical">
      <path value="Task.instantiatesCanonical" />
      <max value="0" />
    </element>
    <element id="Task.partOf">
      <path value="Task.partOf" />
      <max value="1" />
    </element>
    <element id="Task.partOf.extension:taskRelationship">
      <path value="Task.partOf.extension" />
      <sliceName value="taskRelationship" />
      <type>
        <code value="Extension" />
        <profile value="http://fhir.xt.dev/StructureDefinition/TaskRelationship" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Task.executionPeriod.start">
      <path value="Task.executionPeriod.start" />
      <definition value="When should the task be available for the performer to execute? Before this time, the task may be hidden. Tasks before their execution time period starts should be in draft status." />
    </element>
    <element id="Task.executionPeriod.end">
      <path value="Task.executionPeriod.end" />
      <short value="When was the task completed" />
      <definition value="If the task is not completed, this should be empty." />
    </element>
    <element id="Task.restriction">
      <path value="Task.restriction" />
      <requirements value="This is constrained to specifically express when the task should be fulfilled. If period.start is set, the Task should not be fulfilled before that date. If period.end is set, the Task should be fulfilled before that date." />
    </element>
    <element id="Task.restriction.period">
      <path value="Task.restriction.period" />
      <definition value="Over what time-period is fulfillment sought. If period.start is set, the Task should not be fulfilled before that date. If period.end is set, the Task should be fulfilled before that date." />
      <comment value="Note that period.end is the due date representing the time by which the task should be completed." />
      <min value="1" />
    </element>
    <element id="Task.restriction.recipient">
      <path value="Task.restriction.recipient" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>