<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ocp-task" />
  <meta>
    <versionId value="1" />
    <lastUpdated value="2018-04-27T21:55:30.078+00:00" />
  </meta>
  <language value="US-en" />
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml"> 
The FHIR STU3 (Release 3) Omnibus Care Plan (OCP) Task profile uses FHIR resources and describes an activity that can be performed and tracks the state of completion of that activity. It is a representation that an activity should be or has been initiated, and eventually, represents the successful or unsuccessful completion of that activity. It identifies which core elements, extensions, and value sets SHALL be present in the resource when using this profile.
Dependencies:
   Task profile that conform to this specification must include reference to other resources 
<ul><li>Task</li><li>Encounter</li><li>EpisodeOfCare</li><li>Device</li><li>Organization</li><li>RelatedPerson</li><li>Group</li><li>OCP-Patient</li><li>OCP-Practitioner</li></ul></div>
  </text>
  <url value="http://hl7.org/fhir/StructureDefinition/ocp-task" />
  <version value="1.0" />
  <name value="OCP Task Profile" />
  <title value="OCP Task Profile" />
  <status value="draft" />
  <date value="2018-03-23T19:09:20.153-04:00" />
  <publisher value="SAMHSA" />
  <contact>
    <name value="Neelima Chennamaraja" />
    <telecom>
      <system value="url" />
      <value value="www.eversolve.com" />
      <period>
        <start value="1999-06-15" />
      </period>
    </telecom>
    <telecom>
      <system value="email" />
      <value value="neelima@eversolve.com" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="This profile tracks the state of a task, enabling systems to ensure that tasks are completed. This information is kept separate from the operational details necessary to complete the task, as those details vary across and even within workflows. That detail is expected to be carried as the subject of the task. Tasks may have named inputs and outputs. Inputs represent information that may or must be present in order for a task to complete. Outputs represent intermediate or final results produced by a task." />
  <jurisdiction>
    <coding>
      <code value="US" />
      <display value="US-Realm" />
    </coding>
    <text value="US-Realm OCP Pratient Profile published by SAMHSA" />
  </jurisdiction>
  <purpose value="This profile for task resource is created with basic need for OCP (which could change over time) with supported fields. This profile is intended to be implemented by OCP (Omnibus Care Plan) systems." />
  <copyright value="+Copyright (c) 2017 SAMHSA. All Rights Reserved." />
  <fhirVersion value="3.0.1" />
  <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" />
      <definition value="A task to be performed. The Task resource defines several operations to enable rich control over the task execution environment. A server managing task resources may allow unfettered read access to all tasks that it maintains, but restrict write access to the task resources to itself in order to exert control over the task state machine. Instead, it might offer operations on tasks that enable strictly controlled write operations following commonly accepted business rules for task management." />
      <comment value="For example, only tasks that are in the &quot;In Process&quot; state might be allowed to be &quot;Completed&quot; or &quot;Failed&quot;. Use or support of these operations is not essential in simple workflow environments where task activity needs little management. &#xD;&#xA;Tasks in any non-terminal state (Created, Ready, In Progress) can be suspended and resumed. When a task is suspended, it is typically resumed in the state it was in when it was originally suspended. Suspending a task suspends all of its children as well. Resuming a task resumes all of its children.&#xD;&#xA;An In-progress task can also be stopped, returning it to a Ready state. This may be in preparation for delegation or reassignment (e.g., because it cannot be completed by the current owner), to restart a task due to a temporary failure (e.g., to reattempt completion of the activity), or in preparation to allow others to claim the task." />
    </element>
    <element id="Task.definition[x]">
      <path value="Task.definition[x]" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Task.basedOn">
      <path value="Task.basedOn" />
      <definition value="May be used in future to record event/request that resulted in task. BasedOn refers to a higher-level authorization that triggered the creation of the task.  It references a &quot;request&quot; resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the &quot;request&quot; resource the task is seeking to fulfil.  This latter resource is referenced by FocusOn.  For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient." />
    </element>
    <element id="Task.partOf">
      <path value="Task.partOf" />
      <definition value="Task that this particular task is part of. Used for task hierarchy. When a child task is added, it will be linkted to the parent task. Additional rules may be introduced at later time to ensure the state transition between parent and child." />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Task.status">
      <path value="Task.status" />
      <definition value="The current status of the task. Includes all status for now. Will narrow done applicable status and related workflow for specific use cases." />
      <mustSupport value="true" />
    </element>
    <element id="Task.intent">
      <path value="Task.intent" />
      <mustSupport value="true" />
    </element>
    <element id="Task.priority">
      <path value="Task.priority" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Task.description">
      <path value="Task.description" />
      <definition value="A free-text description of what is to be performed. Generally this will be provided by the user who creates the task while &quot;comment&quot; is used by user who is assigned owner for the task. But at this time, application will not put any restrictions." />
      <mustSupport value="true" />
    </element>
    <element id="Task.for">
      <path value="Task.for" />
      <definition value="The entity who benefits from the performance of the service specified in the task (e.g., the patient). Use this for reference to Patient (Beneficiary)." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Task.context">
      <path value="Task.context" />
      <definition value="The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created. Create and assign EpisodeOfCare when  ActivityDefinition.name = &quot;Enrollment&quot;. Use the same EpisodeOfcare for subsequent tasks.  Leave it null if any other tasks created before Enrollment occurred." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Encounter" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ocp-episodeofcare" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Task.executionPeriod">
      <path value="Task.executionPeriod" />
      <definition value="Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end). Start date and end date populated by system on status change (e.g. Start date when status is changed to &quot;in-progress&quot; and End date when status is changed to &quot;Completed&quot;. No need to store and display time portion (i.e. just the date is enough)." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Task.authoredOn">
      <path value="Task.authoredOn" />
      <definition value="The date and time this task was created. System populated date/time when task created." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Task.lastModified">
      <path value="Task.lastModified" />
      <definition value="The date and time of last modification to this task. System populated date/time when task modified." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Task.requester">
      <path value="Task.requester" />
      <definition value="Creator of the task is also treated as requester so use this to store the user who creates the task." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Task.requester.agent">
      <path value="Task.requester.agent" />
      <definition value="The device, practitioner, etc. who initiated the task. Reference to current user related resource. Only limit this to Reference(Practitioner) who may be Care Manager or Care coordinator or other practitioner member of the Care Team." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ocp-patient" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ocp-practitioner" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ocp-relatedperson" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Task.requester.onBehalfOf">
      <path value="Task.requester.onBehalfOf" />
      <definition value="Not used at this time but will be useful to indicate third-party organization that requests the task (e.g. ACO or PCP or State). &#xD;&#xA;The organization the device or practitioner was acting on behalf of when they initiated the task." />
      <max value="0" />
      <meaningWhenMissing value="The organization that the agent is associated (e.g. the organization or ACO of a care/case worker)." />
    </element>
    <element id="Task.performerType">
      <path value="Task.performerType" />
      <definition value="The type of participant that can execute the task. Allow user to select from all availale types at this time. The valueset may be updated later on with different types." />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Task.owner">
      <path value="Task.owner" />
      <definition value="Individual organization or Device currently responsible for task execution. Assigned individual for this task.  Limit it to Reference(Practitioner) at this time." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ocp-patient" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ocp-practitioner" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ocp-relatedperson" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Task.reason">
      <path value="Task.reason" />
      <definition value="A description or code indicating why this task needs to be performed. We will probably add this later to use some standard terminology codes such as SNOMED-CT  findings." />
    </element>
    <element id="Task.note">
      <path value="Task.note" />
      <definition value="Free-text information captured about the task as it progresses. Comments about task. Generally entered by the user who is assigned to complete the task (as opposed to Description data element above that is used by person who create the task). But no restrictions to be implemented at this time." />
      <max value="1" />
      <type>
        <code value="Annotation" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Annotation" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Task.relevantHistory">
      <path value="Task.relevantHistory" />
      <definition value="Provenance is not to be used here but we need to separate discussion how to use it in reference to Task and other resources in general across OCP. &#xD;&#xA;Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task." />
    </element>
    <element id="Task.restriction.recipient">
      <path value="Task.restriction.recipient" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ocp-patient" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ocp-practitioner" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ocp-relatedperson" />
      </type>
    </element>
    <element id="Task.input">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="Parameter" />
      </extension>
      <path value="Task.input" />
      <definition value="This may be used for reference to any information sources.  May be used at later time for specific requirement. &#xD;&#xA;Additional information that may be needed in the execution of the task." />
    </element>
    <element id="Task.output">
      <path value="Task.output" />
      <definition value="Outputs produced by the Task. This may be used for reference to any information generated from the task. May be used at later time for specific requirement." />
    </element>
  </differential>
</StructureDefinition>