STU 3 Ballot

This page is part of the FHIR Specification (v1.6.0: STU 3 Ballot 4). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

12.19 Resource Task - Content

Orders and Observations Work GroupMaturity Level: 0Compartments: Not linked to any defined compartments

A task to be performed.

12.19.1 Scope and Usage

An task resource 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.

Note that there are a variety of processes associated with making and processing orders. Some orders may be handled immediately by automated systems but most require real world actions by one or more humans. Some orders can only be processed when other real world actions happen, such as a patient actually presenting themselves so that the action to be performed can actually be performed. Often these real world dependencies are only implicit in the order details.

12.19.2 Background and Context

12.19.2.1 Using Tasks in a RESTful context

In a RESTful context, a server functions as a repository of tasks. The server itself, or other agents are expected to monitor task activity, and initiate appropriate actions to ensure task completion, updating the status of the task as it proceeds through its various stages of completion. These agents can be coordinated, following well choreographed business logic to ensure that tasks are completed. Task management may also be centrally controlled using some form of workflow engine, in which case, the workflow engine itself may update and maintain the task resources in the server, and through its orchestration activities, ensure that tasks are completed. The task resource enables either model of task management, yet provides a consistent view of the status of tasks being executed in support of healthcare workflows.

The assignment of tasks into categories by type of task and type of performer, and task status enable the server to function as a queue of work items. This queue can be polled or subscribed to by various agents, enabling automation of workflows in FHIR using existing search and subscription mechanisms. Owners, requesterss, other agents (e.g. workflow managers) can thus be ready to initiate the next steps in a complex workflow.

12.19.2.2 Tasks State Machine

Tasks start in a Created state. Once they have been assigned to an owner they transition to the Ready state, indicating that they are ready to be performed. Once the owner initiates activity on the task, the task transitions to the In Progress state, indicating that work is being performed. Upon normal completion, the task enters the Completed state. If there is a failure during the task execution that prevents the task from being completed, it can also enter a Failed state, indicating an abnormal termination of the task. A task in any non-terminal state may also be Cancelled, representing an abnormal termination of the task due to external forces, rather than an error condition.

Tasks in any non-terminal state (Created, Reading, 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.

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.

12.19.2.3 Using Tasks with operations

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. For example, only tasks that are in the "In Process" state might be allowed to be "Completed" or "Failed". Use or support of these operations is not essential in simple workflow environments where task activity needs little management.

There is no distinct operation for creating a new task because the FHIR RESTful API already distinguishes between the create and update operations.

The task history allows applications monitoring the state of a workflow to identify tasks that are long running, perhaps stuck in some queue, to enable management activities that could ensure completion. It also enables tracking of task statistics such as wait time, or time in progress, or time to completion, enabling capture of important task metrics in support of optimization and quality improvement.

12.19.3 Boundaries and Relationships

The task resource 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. For example, in a task supporting reading of radiology image, the inputs might include both the imaging study to be read, as well as relevant prior images. Outputs could represent radiology measurements as well as the Radiologist's diagnostic report.

Inputs and outputs are tracked by the task because workflow management activity may automate the transer of outputs from one task to inputs to a subsequent task.

To facilitate the integration of off the shelf workflow applications with FHIR, the task resource may reference a definition. This definition can represent a description of the workflow actitivity to be performed, using a standard workflow description language such as BPEL, BPMN, or XPDL, a workflow definition such as those defined in IHE profiles, or even simple written instructions explaining a process to be performed.

12.19.4 Resource Content

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Task IDomainResourceA task to be performed
Last modified date must be greater than or equal to created date.
... identifier 0..1IdentifierTask Instance Identifier
... basedOn Σ0..*Reference(Any)Request fulfilled by this task
... requisition Σ0..1IdentifierRequisition or grouper id
... parent Σ0..*Reference(Task)Composite task
... status Σ1..1codedraft | requested | received | accepted | +
TaskStatus (Required)
... statusReason Σ0..1CodeableConceptReason for current status
... businessStatus Σ0..1CodeableConceptE.g. "Specimen collected", "IV prepped"
... stage Σ1..1CodeableConceptproposed | planned | actionable +
Task Stage Codes (Extensible)
... code Σ0..1CodeableConceptTask Type
... priority 0..1codelow | normal | high
TaskPriority (Required)
... description Σ0..1stringHuman-readable explanation of task
... focus Σ0..1Reference(Any)What task is acting on
... for Σ0..1Reference(Any)Beneficiary of the Task
... context Σ0..1Reference(Encounter | EpisodeOfCare)Healthcare event during which this task originated
... created I1..1dateTimeTask Creation Date
... lastModified ΣI1..1dateTimeTask Last Modified Date
... requester Σ1..1Reference(Device | Organization | Patient | Practitioner | RelatedPerson)Task Creator
... owner Σ0..1Reference(Device | Organization | Patient | Practitioner | RelatedPerson)Task Owner
... performerType 0..*CodeableConceptrequester | dispatcher | scheduler | performer | monitor | manager | acquirer | reviewer
TaskPerformerType (Preferred)
... reason 0..1CodeableConceptWhy task is needed
... note 0..*AnnotationComments made about the task
... fulfillment 0..1BackboneElementConstraints on fulfillment tasks
.... repetitions 0..1positiveIntHow many times to repeat
.... period 0..1PeriodOver what time-period is fulfillment sought
.... recipients 0..*Reference(Patient | Practitioner | RelatedPerson | Group | Organization)For whom is fulfillment sought?
... definition Σ0..1uriTask Definition
... input 0..*BackboneElementSupporting information
.... type 1..1CodeableConceptLabel for the input
.... value[x] 1..1*Input Value
... output 0..*BackboneElementTask Output
.... type 1..1CodeableConceptOutput Name
.... value[x] 1..1*Output Value

doco Documentation for this format

UML Diagram (Legend)

Task (DomainResource)The business identifier for this taskidentifier : Identifier [0..1]Identifies a plan, proposal or order that this task has been created in fulfillment ofbasedOn : Reference [0..*] « Any »An identifier that links together multiple tasks and other requests that were created in the same contextrequisition : Identifier [0..1]Task that this particular task is part ofparent : Reference [0..*] « Task »The current status of the taskstatus : code [1..1] « The current status of the task. (Strength=Required)TaskStatus! »An explanation as to why this task is held, failed, was refused, etcstatusReason : CodeableConcept [0..1]Contains business-specific nuances of the business statebusinessStatus : CodeableConcept [0..1]Indicates the "level" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etcstage : CodeableConcept [1..1] « Distinguishes whether the task is a proposal, plan or full order (Strength=Extensible)Task Stage + »A name or code (or both) briefly describing what the task involvescode : CodeableConcept [0..1]The priority of the task among other tasks of the same typepriority : code [0..1] « The task's priority (Strength=Required)TaskPriority! »A free-text description of what is to be performeddescription : string [0..1]The request being actioned or the resource being manipulated by this taskfocus : Reference [0..1] « Any »The entity who benefits from the performance of the service specified in the task (e.g., the patient)for : Reference [0..1] « Any »The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was createdcontext : Reference [0..1] « Encounter|EpisodeOfCare »The date and time this task was createdcreated : dateTime [1..1]The date and time of last modification to this tasklastModified : dateTime [1..1]The creator of the taskrequester : Reference [1..1] « Device|Organization|Patient| Practitioner|RelatedPerson »The owner of this task. The participant who can execute this taskowner : Reference [0..1] « Device|Organization|Patient|Practitioner| RelatedPerson »The type of participant that can execute the taskperformerType : CodeableConcept [0..*] « The type(s) of task performers allowed (Strength=Preferred)TaskPerformerType? »A description or code indicating why this task needs to be performedreason : CodeableConcept [0..1]Free-text information captured about the task as it progressesnote : Annotation [0..*]A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etcdefinition : uri [0..1]FulfillmentIndicates the number of times the requested action should occurrepetitions : positiveInt [0..1]Over what time-period is fulfillment soughtperiod : Period [0..1]For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?recipients : Reference [0..*] « Patient|Practitioner|RelatedPerson| Group|Organization »ParameterA code or description indicating how the input is intended to be used as part of the task executiontype : CodeableConcept [1..1]The value of the input parameter as a basic typevalue[x] : * [1..1]OutputThe name of the Output parametertype : CodeableConcept [1..1]The value of the Output parameter as a basic typevalue[x] : * [1..1]Identifies any limitations on what part of a referenced task subject request should be actionedfulfillment[0..1]Additional information that may be needed in the execution of the taskinput[0..*]Outputs produced by the Taskoutput[0..*]

XML Template

<Task xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <identifier><!-- 0..1 Identifier Task Instance Identifier --></identifier>
 <basedOn><!-- 0..* Reference(Any) Request fulfilled by this task --></basedOn>
 <requisition><!-- 0..1 Identifier Requisition or grouper id --></requisition>
 <parent><!-- 0..* Reference(Task) Composite task --></parent>
 <status value="[code]"/><!-- 1..1 draft | requested | received | accepted | + -->
 <statusReason><!-- 0..1 CodeableConcept Reason for current status --></statusReason>
 <businessStatus><!-- 0..1 CodeableConcept E.g. "Specimen collected", "IV prepped" --></businessStatus>
 <stage><!-- 1..1 CodeableConcept proposed | planned | actionable + --></stage>
 <code><!-- 0..1 CodeableConcept Task Type --></code>
 <priority value="[code]"/><!-- 0..1 low | normal | high -->
 <description value="[string]"/><!-- 0..1 Human-readable explanation of task -->
 <focus><!-- 0..1 Reference(Any) What task is acting on --></focus>
 <for><!-- 0..1 Reference(Any) Beneficiary of the Task --></for>
 <context><!-- 0..1 Reference(Encounter|EpisodeOfCare) Healthcare event during which this task originated --></context>
 <created value="[dateTime]"/><!-- ?? 1..1 Task Creation Date -->
 <lastModified value="[dateTime]"/><!-- ?? 1..1 Task Last Modified Date -->
 <requester><!-- 1..1 Reference(Device|Organization|Patient|Practitioner|
   RelatedPerson) Task Creator --></requester>
 <owner><!-- 0..1 Reference(Device|Organization|Patient|Practitioner|
   RelatedPerson) Task Owner --></owner>
 <performerType><!-- 0..* CodeableConcept requester | dispatcher | scheduler | performer | monitor | manager | acquirer | reviewer --></performerType>
 <reason><!-- 0..1 CodeableConcept Why task is needed --></reason>
 <note><!-- 0..* Annotation Comments made about the task --></note>
 <fulfillment>  <!-- 0..1 Constraints on fulfillment tasks -->
  <repetitions value="[positiveInt]"/><!-- 0..1 How many times to repeat -->
  <period><!-- 0..1 Period Over what time-period is fulfillment sought --></period>
  <recipients><!-- 0..* Reference(Patient|Practitioner|RelatedPerson|Group|
    Organization) For whom is fulfillment sought? --></recipients>
 </fulfillment>
 <definition value="[uri]"/><!-- 0..1 Task Definition -->
 <input>  <!-- 0..* Supporting information -->
  <type><!-- 1..1 CodeableConcept Label for the input --></type>
  <value[x]><!-- 1..1 * Input Value --></value[x]>
 </input>
 <output>  <!-- 0..* Task Output -->
  <type><!-- 1..1 CodeableConcept Output Name --></type>
  <value[x]><!-- 1..1 * Output Value --></value[x]>
 </output>
</Task>

JSON Template

{doco
  "resourceType" : "Task",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "identifier" : { Identifier }, // Task Instance Identifier
  "basedOn" : [{ Reference(Any) }], // Request fulfilled by this task
  "requisition" : { Identifier }, // Requisition or grouper id
  "parent" : [{ Reference(Task) }], // Composite task
  "status" : "<code>", // R!  draft | requested | received | accepted | +
  "statusReason" : { CodeableConcept }, // Reason for current status
  "businessStatus" : { CodeableConcept }, // E.g. "Specimen collected", "IV prepped"
  "stage" : { CodeableConcept }, // R!  proposed | planned | actionable +
  "code" : { CodeableConcept }, // Task Type
  "priority" : "<code>", // low | normal | high
  "description" : "<string>", // Human-readable explanation of task
  "focus" : { Reference(Any) }, // What task is acting on
  "for" : { Reference(Any) }, // Beneficiary of the Task
  "context" : { Reference(Encounter|EpisodeOfCare) }, // Healthcare event during which this task originated
  "created" : "<dateTime>", // C? R!  Task Creation Date
  "lastModified" : "<dateTime>", // C? R!  Task Last Modified Date
  "requester" : { Reference(Device|Organization|Patient|Practitioner|
   RelatedPerson) }, // R!  Task Creator
  "owner" : { Reference(Device|Organization|Patient|Practitioner|
   RelatedPerson) }, // Task Owner
  "performerType" : [{ CodeableConcept }], // requester | dispatcher | scheduler | performer | monitor | manager | acquirer | reviewer
  "reason" : { CodeableConcept }, // Why task is needed
  "note" : [{ Annotation }], // Comments made about the task
  "fulfillment" : { // Constraints on fulfillment tasks
    "repetitions" : "<positiveInt>", // How many times to repeat
    "period" : { Period }, // Over what time-period is fulfillment sought
    "recipients" : [{ Reference(Patient|Practitioner|RelatedPerson|Group|
    Organization) }] // For whom is fulfillment sought?
  },
  "definition" : "<uri>", // Task Definition
  "input" : [{ // Supporting information
    "type" : { CodeableConcept }, // R!  Label for the input
    // value[x]: Input Value. One of these 23:
    "valueInteger" : <integer>
    "valueDecimal" : <decimal>
    "valueDateTime" : "<dateTime>"
    "valueDate" : "<date>"
    "valueInstant" : "<instant>"
    "valueString" : "<string>"
    "valueUri" : "<uri>"
    "valueBoolean" : <boolean>
    "valueCode" : "<code>"
    "valueBase64Binary" : "<base64Binary>"
    "valueCoding" : { Coding }
    "valueCodeableConcept" : { CodeableConcept }
    "valueAttachment" : { Attachment }
    "valueIdentifier" : { Identifier }
    "valueQuantity" : { Quantity }
    "valueRange" : { Range }
    "valuePeriod" : { Period }
    "valueRatio" : { Ratio }
    "valueHumanName" : { HumanName }
    "valueAddress" : { Address }
    "valueContactPoint" : { ContactPoint }
    "valueSchedule" : { Schedule }
    "valueReference" : { Reference }
  }],
  "output" : [{ // Task Output
    "type" : { CodeableConcept }, // R!  Output Name
    // value[x]: Output Value. One of these 23:
    "valueInteger" : <integer>
    "valueDecimal" : <decimal>
    "valueDateTime" : "<dateTime>"
    "valueDate" : "<date>"
    "valueInstant" : "<instant>"
    "valueString" : "<string>"
    "valueUri" : "<uri>"
    "valueBoolean" : <boolean>
    "valueCode" : "<code>"
    "valueBase64Binary" : "<base64Binary>"
    "valueCoding" : { Coding }
    "valueCodeableConcept" : { CodeableConcept }
    "valueAttachment" : { Attachment }
    "valueIdentifier" : { Identifier }
    "valueQuantity" : { Quantity }
    "valueRange" : { Range }
    "valuePeriod" : { Period }
    "valueRatio" : { Ratio }
    "valueHumanName" : { HumanName }
    "valueAddress" : { Address }
    "valueContactPoint" : { ContactPoint }
    "valueSchedule" : { Schedule }
    "valueReference" : { Reference }
  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:Task;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:Task.identifier [ Identifier ]; # 0..1 Task Instance Identifier
  fhir:Task.basedOn [ Reference(Any) ], ... ; # 0..* Request fulfilled by this task
  fhir:Task.requisition [ Identifier ]; # 0..1 Requisition or grouper id
  fhir:Task.parent [ Reference(Task) ], ... ; # 0..* Composite task
  fhir:Task.status [ code ]; # 1..1 draft | requested | received | accepted | +
  fhir:Task.statusReason [ CodeableConcept ]; # 0..1 Reason for current status
  fhir:Task.businessStatus [ CodeableConcept ]; # 0..1 E.g. "Specimen collected", "IV prepped"
  fhir:Task.stage [ CodeableConcept ]; # 1..1 proposed | planned | actionable +
  fhir:Task.code [ CodeableConcept ]; # 0..1 Task Type
  fhir:Task.priority [ code ]; # 0..1 low | normal | high
  fhir:Task.description [ string ]; # 0..1 Human-readable explanation of task
  fhir:Task.focus [ Reference(Any) ]; # 0..1 What task is acting on
  fhir:Task.for [ Reference(Any) ]; # 0..1 Beneficiary of the Task
  fhir:Task.context [ Reference(Encounter|EpisodeOfCare) ]; # 0..1 Healthcare event during which this task originated
  fhir:Task.created [ dateTime ]; # 1..1 Task Creation Date
  fhir:Task.lastModified [ dateTime ]; # 1..1 Task Last Modified Date
  fhir:Task.requester [ Reference(Device|Organization|Patient|Practitioner|RelatedPerson) ]; # 1..1 Task Creator
  fhir:Task.owner [ Reference(Device|Organization|Patient|Practitioner|RelatedPerson) ]; # 0..1 Task Owner
  fhir:Task.performerType [ CodeableConcept ], ... ; # 0..* requester | dispatcher | scheduler | performer | monitor | manager | acquirer | reviewer
  fhir:Task.reason [ CodeableConcept ]; # 0..1 Why task is needed
  fhir:Task.note [ Annotation ], ... ; # 0..* Comments made about the task
  fhir:Task.fulfillment [ # 0..1 Constraints on fulfillment tasks
    fhir:Task.fulfillment.repetitions [ positiveInt ]; # 0..1 How many times to repeat
    fhir:Task.fulfillment.period [ Period ]; # 0..1 Over what time-period is fulfillment sought
    fhir:Task.fulfillment.recipients [ Reference(Patient|Practitioner|RelatedPerson|Group|Organization) ], ... ; # 0..* For whom is fulfillment sought?
  ];
  fhir:Task.definition [ uri ]; # 0..1 Task Definition
  fhir:Task.input [ # 0..* Supporting information
    fhir:Task.input.type [ CodeableConcept ]; # 1..1 Label for the input
    # Task.input.value[x] : 1..1 Input Value. One of these 38
      fhir:Task.input.valueBase64Binary [ base64Binary ]
      fhir:Task.input.valueBoolean [ boolean ]
      fhir:Task.input.valueCode [ code ]
      fhir:Task.input.valueDate [ date ]
      fhir:Task.input.valueDateTime [ dateTime ]
      fhir:Task.input.valueDecimal [ decimal ]
      fhir:Task.input.valueId [ id ]
      fhir:Task.input.valueInstant [ instant ]
      fhir:Task.input.valueInteger [ integer ]
      fhir:Task.input.valueMarkdown [ markdown ]
      fhir:Task.input.valueOid [ oid ]
      fhir:Task.input.valuePositiveInt [ positiveInt ]
      fhir:Task.input.valueString [ string ]
      fhir:Task.input.valueTime [ time ]
      fhir:Task.input.valueUnsignedInt [ unsignedInt ]
      fhir:Task.input.valueUri [ uri ]
      fhir:Task.input.valueAddress [ Address ]
      fhir:Task.input.valueAge [ Age ]
      fhir:Task.input.valueAnnotation [ Annotation ]
      fhir:Task.input.valueAttachment [ Attachment ]
      fhir:Task.input.valueCodeableConcept [ CodeableConcept ]
      fhir:Task.input.valueCoding [ Coding ]
      fhir:Task.input.valueContactPoint [ ContactPoint ]
      fhir:Task.input.valueCount [ Count ]
      fhir:Task.input.valueDistance [ Distance ]
      fhir:Task.input.valueDuration [ Duration ]
      fhir:Task.input.valueHumanName [ HumanName ]
      fhir:Task.input.valueIdentifier [ Identifier ]
      fhir:Task.input.valueMoney [ Money ]
      fhir:Task.input.valuePeriod [ Period ]
      fhir:Task.input.valueQuantity [ Quantity ]
      fhir:Task.input.valueRange [ Range ]
      fhir:Task.input.valueRatio [ Ratio ]
      fhir:Task.input.valueReference [ Reference ]
      fhir:Task.input.valueSampledData [ SampledData ]
      fhir:Task.input.valueSignature [ Signature ]
      fhir:Task.input.valueTiming [ Timing ]
      fhir:Task.input.valueMeta [ Meta ]
  ], ...;
  fhir:Task.output [ # 0..* Task Output
    fhir:Task.output.type [ CodeableConcept ]; # 1..1 Output Name
    # Task.output.value[x] : 1..1 Output Value. One of these 38
      fhir:Task.output.valueBase64Binary [ base64Binary ]
      fhir:Task.output.valueBoolean [ boolean ]
      fhir:Task.output.valueCode [ code ]
      fhir:Task.output.valueDate [ date ]
      fhir:Task.output.valueDateTime [ dateTime ]
      fhir:Task.output.valueDecimal [ decimal ]
      fhir:Task.output.valueId [ id ]
      fhir:Task.output.valueInstant [ instant ]
      fhir:Task.output.valueInteger [ integer ]
      fhir:Task.output.valueMarkdown [ markdown ]
      fhir:Task.output.valueOid [ oid ]
      fhir:Task.output.valuePositiveInt [ positiveInt ]
      fhir:Task.output.valueString [ string ]
      fhir:Task.output.valueTime [ time ]
      fhir:Task.output.valueUnsignedInt [ unsignedInt ]
      fhir:Task.output.valueUri [ uri ]
      fhir:Task.output.valueAddress [ Address ]
      fhir:Task.output.valueAge [ Age ]
      fhir:Task.output.valueAnnotation [ Annotation ]
      fhir:Task.output.valueAttachment [ Attachment ]
      fhir:Task.output.valueCodeableConcept [ CodeableConcept ]
      fhir:Task.output.valueCoding [ Coding ]
      fhir:Task.output.valueContactPoint [ ContactPoint ]
      fhir:Task.output.valueCount [ Count ]
      fhir:Task.output.valueDistance [ Distance ]
      fhir:Task.output.valueDuration [ Duration ]
      fhir:Task.output.valueHumanName [ HumanName ]
      fhir:Task.output.valueIdentifier [ Identifier ]
      fhir:Task.output.valueMoney [ Money ]
      fhir:Task.output.valuePeriod [ Period ]
      fhir:Task.output.valueQuantity [ Quantity ]
      fhir:Task.output.valueRange [ Range ]
      fhir:Task.output.valueRatio [ Ratio ]
      fhir:Task.output.valueReference [ Reference ]
      fhir:Task.output.valueSampledData [ SampledData ]
      fhir:Task.output.valueSignature [ Signature ]
      fhir:Task.output.valueTiming [ Timing ]
      fhir:Task.output.valueMeta [ Meta ]
  ], ...;
]

Changes since DSTU2

This resource did not exist in Release 2

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Task IDomainResourceA task to be performed
Last modified date must be greater than or equal to created date.
... identifier 0..1IdentifierTask Instance Identifier
... basedOn Σ0..*Reference(Any)Request fulfilled by this task
... requisition Σ0..1IdentifierRequisition or grouper id
... parent Σ0..*Reference(Task)Composite task
... status Σ1..1codedraft | requested | received | accepted | +
TaskStatus (Required)
... statusReason Σ0..1CodeableConceptReason for current status
... businessStatus Σ0..1CodeableConceptE.g. "Specimen collected", "IV prepped"
... stage Σ1..1CodeableConceptproposed | planned | actionable +
Task Stage Codes (Extensible)
... code Σ0..1CodeableConceptTask Type
... priority 0..1codelow | normal | high
TaskPriority (Required)
... description Σ0..1stringHuman-readable explanation of task
... focus Σ0..1Reference(Any)What task is acting on
... for Σ0..1Reference(Any)Beneficiary of the Task
... context Σ0..1Reference(Encounter | EpisodeOfCare)Healthcare event during which this task originated
... created I1..1dateTimeTask Creation Date
... lastModified ΣI1..1dateTimeTask Last Modified Date
... requester Σ1..1Reference(Device | Organization | Patient | Practitioner | RelatedPerson)Task Creator
... owner Σ0..1Reference(Device | Organization | Patient | Practitioner | RelatedPerson)Task Owner
... performerType 0..*CodeableConceptrequester | dispatcher | scheduler | performer | monitor | manager | acquirer | reviewer
TaskPerformerType (Preferred)
... reason 0..1CodeableConceptWhy task is needed
... note 0..*AnnotationComments made about the task
... fulfillment 0..1BackboneElementConstraints on fulfillment tasks
.... repetitions 0..1positiveIntHow many times to repeat
.... period 0..1PeriodOver what time-period is fulfillment sought
.... recipients 0..*Reference(Patient | Practitioner | RelatedPerson | Group | Organization)For whom is fulfillment sought?
... definition Σ0..1uriTask Definition
... input 0..*BackboneElementSupporting information
.... type 1..1CodeableConceptLabel for the input
.... value[x] 1..1*Input Value
... output 0..*BackboneElementTask Output
.... type 1..1CodeableConceptOutput Name
.... value[x] 1..1*Output Value

doco Documentation for this format

UML Diagram (Legend)

Task (DomainResource)The business identifier for this taskidentifier : Identifier [0..1]Identifies a plan, proposal or order that this task has been created in fulfillment ofbasedOn : Reference [0..*] « Any »An identifier that links together multiple tasks and other requests that were created in the same contextrequisition : Identifier [0..1]Task that this particular task is part ofparent : Reference [0..*] « Task »The current status of the taskstatus : code [1..1] « The current status of the task. (Strength=Required)TaskStatus! »An explanation as to why this task is held, failed, was refused, etcstatusReason : CodeableConcept [0..1]Contains business-specific nuances of the business statebusinessStatus : CodeableConcept [0..1]Indicates the "level" of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etcstage : CodeableConcept [1..1] « Distinguishes whether the task is a proposal, plan or full order (Strength=Extensible)Task Stage + »A name or code (or both) briefly describing what the task involvescode : CodeableConcept [0..1]The priority of the task among other tasks of the same typepriority : code [0..1] « The task's priority (Strength=Required)TaskPriority! »A free-text description of what is to be performeddescription : string [0..1]The request being actioned or the resource being manipulated by this taskfocus : Reference [0..1] « Any »The entity who benefits from the performance of the service specified in the task (e.g., the patient)for : Reference [0..1] « Any »The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was createdcontext : Reference [0..1] « Encounter|EpisodeOfCare »The date and time this task was createdcreated : dateTime [1..1]The date and time of last modification to this tasklastModified : dateTime [1..1]The creator of the taskrequester : Reference [1..1] « Device|Organization|Patient| Practitioner|RelatedPerson »The owner of this task. The participant who can execute this taskowner : Reference [0..1] « Device|Organization|Patient|Practitioner| RelatedPerson »The type of participant that can execute the taskperformerType : CodeableConcept [0..*] « The type(s) of task performers allowed (Strength=Preferred)TaskPerformerType? »A description or code indicating why this task needs to be performedreason : CodeableConcept [0..1]Free-text information captured about the task as it progressesnote : Annotation [0..*]A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etcdefinition : uri [0..1]FulfillmentIndicates the number of times the requested action should occurrepetitions : positiveInt [0..1]Over what time-period is fulfillment soughtperiod : Period [0..1]For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?recipients : Reference [0..*] « Patient|Practitioner|RelatedPerson| Group|Organization »ParameterA code or description indicating how the input is intended to be used as part of the task executiontype : CodeableConcept [1..1]The value of the input parameter as a basic typevalue[x] : * [1..1]OutputThe name of the Output parametertype : CodeableConcept [1..1]The value of the Output parameter as a basic typevalue[x] : * [1..1]Identifies any limitations on what part of a referenced task subject request should be actionedfulfillment[0..1]Additional information that may be needed in the execution of the taskinput[0..*]Outputs produced by the Taskoutput[0..*]

XML Template

<Task xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <identifier><!-- 0..1 Identifier Task Instance Identifier --></identifier>
 <basedOn><!-- 0..* Reference(Any) Request fulfilled by this task --></basedOn>
 <requisition><!-- 0..1 Identifier Requisition or grouper id --></requisition>
 <parent><!-- 0..* Reference(Task) Composite task --></parent>
 <status value="[code]"/><!-- 1..1 draft | requested | received | accepted | + -->
 <statusReason><!-- 0..1 CodeableConcept Reason for current status --></statusReason>
 <businessStatus><!-- 0..1 CodeableConcept E.g. "Specimen collected", "IV prepped" --></businessStatus>
 <stage><!-- 1..1 CodeableConcept proposed | planned | actionable + --></stage>
 <code><!-- 0..1 CodeableConcept Task Type --></code>
 <priority value="[code]"/><!-- 0..1 low | normal | high -->
 <description value="[string]"/><!-- 0..1 Human-readable explanation of task -->
 <focus><!-- 0..1 Reference(Any) What task is acting on --></focus>
 <for><!-- 0..1 Reference(Any) Beneficiary of the Task --></for>
 <context><!-- 0..1 Reference(Encounter|EpisodeOfCare) Healthcare event during which this task originated --></context>
 <created value="[dateTime]"/><!-- ?? 1..1 Task Creation Date -->
 <lastModified value="[dateTime]"/><!-- ?? 1..1 Task Last Modified Date -->
 <requester><!-- 1..1 Reference(Device|Organization|Patient|Practitioner|
   RelatedPerson) Task Creator --></requester>
 <owner><!-- 0..1 Reference(Device|Organization|Patient|Practitioner|
   RelatedPerson) Task Owner --></owner>
 <performerType><!-- 0..* CodeableConcept requester | dispatcher | scheduler | performer | monitor | manager | acquirer | reviewer --></performerType>
 <reason><!-- 0..1 CodeableConcept Why task is needed --></reason>
 <note><!-- 0..* Annotation Comments made about the task --></note>
 <fulfillment>  <!-- 0..1 Constraints on fulfillment tasks -->
  <repetitions value="[positiveInt]"/><!-- 0..1 How many times to repeat -->
  <period><!-- 0..1 Period Over what time-period is fulfillment sought --></period>
  <recipients><!-- 0..* Reference(Patient|Practitioner|RelatedPerson|Group|
    Organization) For whom is fulfillment sought? --></recipients>
 </fulfillment>
 <definition value="[uri]"/><!-- 0..1 Task Definition -->
 <input>  <!-- 0..* Supporting information -->
  <type><!-- 1..1 CodeableConcept Label for the input --></type>
  <value[x]><!-- 1..1 * Input Value --></value[x]>
 </input>
 <output>  <!-- 0..* Task Output -->
  <type><!-- 1..1 CodeableConcept Output Name --></type>
  <value[x]><!-- 1..1 * Output Value --></value[x]>
 </output>
</Task>

JSON Template

{doco
  "resourceType" : "Task",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "identifier" : { Identifier }, // Task Instance Identifier
  "basedOn" : [{ Reference(Any) }], // Request fulfilled by this task
  "requisition" : { Identifier }, // Requisition or grouper id
  "parent" : [{ Reference(Task) }], // Composite task
  "status" : "<code>", // R!  draft | requested | received | accepted | +
  "statusReason" : { CodeableConcept }, // Reason for current status
  "businessStatus" : { CodeableConcept }, // E.g. "Specimen collected", "IV prepped"
  "stage" : { CodeableConcept }, // R!  proposed | planned | actionable +
  "code" : { CodeableConcept }, // Task Type
  "priority" : "<code>", // low | normal | high
  "description" : "<string>", // Human-readable explanation of task
  "focus" : { Reference(Any) }, // What task is acting on
  "for" : { Reference(Any) }, // Beneficiary of the Task
  "context" : { Reference(Encounter|EpisodeOfCare) }, // Healthcare event during which this task originated
  "created" : "<dateTime>", // C? R!  Task Creation Date
  "lastModified" : "<dateTime>", // C? R!  Task Last Modified Date
  "requester" : { Reference(Device|Organization|Patient|Practitioner|
   RelatedPerson) }, // R!  Task Creator
  "owner" : { Reference(Device|Organization|Patient|Practitioner|
   RelatedPerson) }, // Task Owner
  "performerType" : [{ CodeableConcept }], // requester | dispatcher | scheduler | performer | monitor | manager | acquirer | reviewer
  "reason" : { CodeableConcept }, // Why task is needed
  "note" : [{ Annotation }], // Comments made about the task
  "fulfillment" : { // Constraints on fulfillment tasks
    "repetitions" : "<positiveInt>", // How many times to repeat
    "period" : { Period }, // Over what time-period is fulfillment sought
    "recipients" : [{ Reference(Patient|Practitioner|RelatedPerson|Group|
    Organization) }] // For whom is fulfillment sought?
  },
  "definition" : "<uri>", // Task Definition
  "input" : [{ // Supporting information
    "type" : { CodeableConcept }, // R!  Label for the input
    // value[x]: Input Value. One of these 23:
    "valueInteger" : <integer>
    "valueDecimal" : <decimal>
    "valueDateTime" : "<dateTime>"
    "valueDate" : "<date>"
    "valueInstant" : "<instant>"
    "valueString" : "<string>"
    "valueUri" : "<uri>"
    "valueBoolean" : <boolean>
    "valueCode" : "<code>"
    "valueBase64Binary" : "<base64Binary>"
    "valueCoding" : { Coding }
    "valueCodeableConcept" : { CodeableConcept }
    "valueAttachment" : { Attachment }
    "valueIdentifier" : { Identifier }
    "valueQuantity" : { Quantity }
    "valueRange" : { Range }
    "valuePeriod" : { Period }
    "valueRatio" : { Ratio }
    "valueHumanName" : { HumanName }
    "valueAddress" : { Address }
    "valueContactPoint" : { ContactPoint }
    "valueSchedule" : { Schedule }
    "valueReference" : { Reference }
  }],
  "output" : [{ // Task Output
    "type" : { CodeableConcept }, // R!  Output Name
    // value[x]: Output Value. One of these 23:
    "valueInteger" : <integer>
    "valueDecimal" : <decimal>
    "valueDateTime" : "<dateTime>"
    "valueDate" : "<date>"
    "valueInstant" : "<instant>"
    "valueString" : "<string>"
    "valueUri" : "<uri>"
    "valueBoolean" : <boolean>
    "valueCode" : "<code>"
    "valueBase64Binary" : "<base64Binary>"
    "valueCoding" : { Coding }
    "valueCodeableConcept" : { CodeableConcept }
    "valueAttachment" : { Attachment }
    "valueIdentifier" : { Identifier }
    "valueQuantity" : { Quantity }
    "valueRange" : { Range }
    "valuePeriod" : { Period }
    "valueRatio" : { Ratio }
    "valueHumanName" : { HumanName }
    "valueAddress" : { Address }
    "valueContactPoint" : { ContactPoint }
    "valueSchedule" : { Schedule }
    "valueReference" : { Reference }
  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:Task;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:Task.identifier [ Identifier ]; # 0..1 Task Instance Identifier
  fhir:Task.basedOn [ Reference(Any) ], ... ; # 0..* Request fulfilled by this task
  fhir:Task.requisition [ Identifier ]; # 0..1 Requisition or grouper id
  fhir:Task.parent [ Reference(Task) ], ... ; # 0..* Composite task
  fhir:Task.status [ code ]; # 1..1 draft | requested | received | accepted | +
  fhir:Task.statusReason [ CodeableConcept ]; # 0..1 Reason for current status
  fhir:Task.businessStatus [ CodeableConcept ]; # 0..1 E.g. "Specimen collected", "IV prepped"
  fhir:Task.stage [ CodeableConcept ]; # 1..1 proposed | planned | actionable +
  fhir:Task.code [ CodeableConcept ]; # 0..1 Task Type
  fhir:Task.priority [ code ]; # 0..1 low | normal | high
  fhir:Task.description [ string ]; # 0..1 Human-readable explanation of task
  fhir:Task.focus [ Reference(Any) ]; # 0..1 What task is acting on
  fhir:Task.for [ Reference(Any) ]; # 0..1 Beneficiary of the Task
  fhir:Task.context [ Reference(Encounter|EpisodeOfCare) ]; # 0..1 Healthcare event during which this task originated
  fhir:Task.created [ dateTime ]; # 1..1 Task Creation Date
  fhir:Task.lastModified [ dateTime ]; # 1..1 Task Last Modified Date
  fhir:Task.requester [ Reference(Device|Organization|Patient|Practitioner|RelatedPerson) ]; # 1..1 Task Creator
  fhir:Task.owner [ Reference(Device|Organization|Patient|Practitioner|RelatedPerson) ]; # 0..1 Task Owner
  fhir:Task.performerType [ CodeableConcept ], ... ; # 0..* requester | dispatcher | scheduler | performer | monitor | manager | acquirer | reviewer
  fhir:Task.reason [ CodeableConcept ]; # 0..1 Why task is needed
  fhir:Task.note [ Annotation ], ... ; # 0..* Comments made about the task
  fhir:Task.fulfillment [ # 0..1 Constraints on fulfillment tasks
    fhir:Task.fulfillment.repetitions [ positiveInt ]; # 0..1 How many times to repeat
    fhir:Task.fulfillment.period [ Period ]; # 0..1 Over what time-period is fulfillment sought
    fhir:Task.fulfillment.recipients [ Reference(Patient|Practitioner|RelatedPerson|Group|Organization) ], ... ; # 0..* For whom is fulfillment sought?
  ];
  fhir:Task.definition [ uri ]; # 0..1 Task Definition
  fhir:Task.input [ # 0..* Supporting information
    fhir:Task.input.type [ CodeableConcept ]; # 1..1 Label for the input
    # Task.input.value[x] : 1..1 Input Value. One of these 38
      fhir:Task.input.valueBase64Binary [ base64Binary ]
      fhir:Task.input.valueBoolean [ boolean ]
      fhir:Task.input.valueCode [ code ]
      fhir:Task.input.valueDate [ date ]
      fhir:Task.input.valueDateTime [ dateTime ]
      fhir:Task.input.valueDecimal [ decimal ]
      fhir:Task.input.valueId [ id ]
      fhir:Task.input.valueInstant [ instant ]
      fhir:Task.input.valueInteger [ integer ]
      fhir:Task.input.valueMarkdown [ markdown ]
      fhir:Task.input.valueOid [ oid ]
      fhir:Task.input.valuePositiveInt [ positiveInt ]
      fhir:Task.input.valueString [ string ]
      fhir:Task.input.valueTime [ time ]
      fhir:Task.input.valueUnsignedInt [ unsignedInt ]
      fhir:Task.input.valueUri [ uri ]
      fhir:Task.input.valueAddress [ Address ]
      fhir:Task.input.valueAge [ Age ]
      fhir:Task.input.valueAnnotation [ Annotation ]
      fhir:Task.input.valueAttachment [ Attachment ]
      fhir:Task.input.valueCodeableConcept [ CodeableConcept ]
      fhir:Task.input.valueCoding [ Coding ]
      fhir:Task.input.valueContactPoint [ ContactPoint ]
      fhir:Task.input.valueCount [ Count ]
      fhir:Task.input.valueDistance [ Distance ]
      fhir:Task.input.valueDuration [ Duration ]
      fhir:Task.input.valueHumanName [ HumanName ]
      fhir:Task.input.valueIdentifier [ Identifier ]
      fhir:Task.input.valueMoney [ Money ]
      fhir:Task.input.valuePeriod [ Period ]
      fhir:Task.input.valueQuantity [ Quantity ]
      fhir:Task.input.valueRange [ Range ]
      fhir:Task.input.valueRatio [ Ratio ]
      fhir:Task.input.valueReference [ Reference ]
      fhir:Task.input.valueSampledData [ SampledData ]
      fhir:Task.input.valueSignature [ Signature ]
      fhir:Task.input.valueTiming [ Timing ]
      fhir:Task.input.valueMeta [ Meta ]
  ], ...;
  fhir:Task.output [ # 0..* Task Output
    fhir:Task.output.type [ CodeableConcept ]; # 1..1 Output Name
    # Task.output.value[x] : 1..1 Output Value. One of these 38
      fhir:Task.output.valueBase64Binary [ base64Binary ]
      fhir:Task.output.valueBoolean [ boolean ]
      fhir:Task.output.valueCode [ code ]
      fhir:Task.output.valueDate [ date ]
      fhir:Task.output.valueDateTime [ dateTime ]
      fhir:Task.output.valueDecimal [ decimal ]
      fhir:Task.output.valueId [ id ]
      fhir:Task.output.valueInstant [ instant ]
      fhir:Task.output.valueInteger [ integer ]
      fhir:Task.output.valueMarkdown [ markdown ]
      fhir:Task.output.valueOid [ oid ]
      fhir:Task.output.valuePositiveInt [ positiveInt ]
      fhir:Task.output.valueString [ string ]
      fhir:Task.output.valueTime [ time ]
      fhir:Task.output.valueUnsignedInt [ unsignedInt ]
      fhir:Task.output.valueUri [ uri ]
      fhir:Task.output.valueAddress [ Address ]
      fhir:Task.output.valueAge [ Age ]
      fhir:Task.output.valueAnnotation [ Annotation ]
      fhir:Task.output.valueAttachment [ Attachment ]
      fhir:Task.output.valueCodeableConcept [ CodeableConcept ]
      fhir:Task.output.valueCoding [ Coding ]
      fhir:Task.output.valueContactPoint [ ContactPoint ]
      fhir:Task.output.valueCount [ Count ]
      fhir:Task.output.valueDistance [ Distance ]
      fhir:Task.output.valueDuration [ Duration ]
      fhir:Task.output.valueHumanName [ HumanName ]
      fhir:Task.output.valueIdentifier [ Identifier ]
      fhir:Task.output.valueMoney [ Money ]
      fhir:Task.output.valuePeriod [ Period ]
      fhir:Task.output.valueQuantity [ Quantity ]
      fhir:Task.output.valueRange [ Range ]
      fhir:Task.output.valueRatio [ Ratio ]
      fhir:Task.output.valueReference [ Reference ]
      fhir:Task.output.valueSampledData [ SampledData ]
      fhir:Task.output.valueSignature [ Signature ]
      fhir:Task.output.valueTiming [ Timing ]
      fhir:Task.output.valueMeta [ Meta ]
  ], ...;
]

Changes since DSTU2

This resource did not exist in Release 2

 

Alternate definitions: Master Definition (XML, JSON), XML Schema/Schematron (for ) + JSON Schema, ShEx (for Turtle)

12.19.4.1 Terminology Bindings

PathDefinitionTypeReference
Task.status The current status of the task.RequiredTaskStatus
Task.businessStatus The domain-specific business-contextual sub-state of the task. For example: "Blood drawn", "IV inserted", "Awaiting physician signature", etc.UnknownNo details provided yet
Task.stage Distinguishes whether the task is a proposal, plan or full orderExtensibleTask Stage Codes
Task.priority The task's priorityRequiredTaskPriority
Task.performerType The type(s) of task performers allowedPreferredTaskPerformerType
Task.reason Indicates why the task is needed. E.g. Suspended because patient admitted to hospital.UnknownNo details provided yet
Task.input.type Codes to identify types of input parameters. These will typically be specific to a particular workflow. E.g. "Comparison source", "Applicable consent", "Concommitent Medications", etc.UnknownNo details provided yet
Task.output.type Codes to identify types of input parameters. These will typically be specific to a particular workflow. E.g. "Identified issues", "Preliminary results", "Filler order", "Final results", etc.UnknownNo details provided yet

12.19.4.2 Constraints

  • inv-1: Last modified date must be greater than or equal to created date. (expression : lastModified >= created)

12.19.5 Processing Tasks

TBD

12.19.6 Search Parameters

Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

NameTypeDescriptionPaths
codetokenSearch by task codeTask.code
createddateSearch by creation dateTask.created
definitionuriSearch by task definitionTask.definition
focusreferenceSearch by task focusTask.focus
(Any)
identifiertokenSearch for a task instance by its business identifierTask.identifier
modifieddateSearch by last modification dateTask.lastModified
ownerreferenceSearch by task ownerTask.owner
(Practitioner, Organization, Device, Patient, RelatedPerson)
parentreferenceSearch by parent taskTask.parent
(Task)
patientreferenceSearch by patientTask.for
(Patient)
performertokenSearch by recommended type of performer (e.g., Requester, Performer, Scheduler).Task.performerType
prioritytokenSearch by task priorityTask.priority
requesterreferenceSearch by task requesterTask.requester
(Practitioner, Organization, Device, Patient, RelatedPerson)
stagetokenSearch by task stageTask.stage
statustokenSearch by task statusTask.status
statusreasontokenSearch by status reasonTask.statusReason