Release 5 Preview #3

This page is part of the FHIR Specification (v4.5.0: R5 Preview #3). 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.1 Resource Task - Content

Orders and Observations Work GroupMaturity Level: 2 Trial UseSecurity Category: Not Classified Compartments: Not linked to any defined compartments

A task to be performed.

A 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 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.

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 a 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, 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, requesters, other agents (e.g. workflow managers) can thus be ready to initiate the next steps in a complex workflow.

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, 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.

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.

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.

Note: Currently, task pre-requisites can be represented using Task's `description` element or the RequestGroup resource. We are seeking input from the implementer community in evaluating whether there is need for adding another mechanism to this resource for this purpose.

Feedback here .

Task spans both intent and event and tracks the execution through to completion. A Task is a workflow step such as cancelling an order, fulfilling an order, signing an order, merging a set of records, admitting a patient. In contrast, Procedures are actions that are intended to result in a physical or mental change to or for the subject (for example, surgery, physiotherapy, training, counseling). A Task resource often exists in parallel with clinical resources. For example, a Task could request fulfillment of a ServiceRequest ordering a Procedure that would result in a Procedure, Observation, DiagnosticReport, ImagingStudy or similar resource. Another example would be a Task that requests fulfillment of a CommunicationRequest to be performed between various actors.

As stated above, 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 in the referenced `focus` 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 transfer 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 activity 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.

This resource is referenced by CarePlan, ImagingStudy, PaymentReconciliation and itself.

This resource does not implement any patterns.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Task TUDomainResourceA task to be performed
+ Rule: Last modified date must be greater than or equal to authored-on date.
Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... identifier 0..*IdentifierTask Instance Identifier
... instantiatesCanonical Σ0..1canonical(ActivityDefinition)Formal definition of task
... instantiatesUri Σ0..1uriFormal definition of task
... basedOn Σ0..*Reference(Any)Request fulfilled by this task
... groupIdentifier Σ0..1IdentifierRequisition or grouper id
... partOf Σ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"
... intent Σ1..1codeunknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
TaskIntent (Required)
... priority 0..1coderoutine | urgent | asap | stat
Request priority (Required)
... code Σ0..1CodeableConceptTask Type
Task Codes (Example)
... description Σ0..1stringHuman-readable explanation of task
... focus Σ0..1Reference(Any)What task is acting on
... for Σ0..1Reference(Any)Beneficiary of the Task
... encounter Σ0..1Reference(Encounter)Healthcare event during which this task originated
... executionPeriod Σ0..1PeriodStart and end time of execution
... authoredOn I0..1dateTimeTask Creation Date
... lastModified ΣI0..1dateTimeTask Last Modified Date
... requester Σ0..1Reference(Device | Organization | Patient | Practitioner | PractitionerRole | RelatedPerson)Who is asking for task to be done
... performerType 0..*CodeableConceptRequested performer
Procedure Performer Role Codes (Preferred)
... owner Σ0..1Reference(Practitioner | PractitionerRole | Organization | CareTeam | HealthcareService | Patient | Device | RelatedPerson)Responsible individual
... location Σ0..1Reference(Location)Where task occurs
... reasonCode 0..1CodeableConceptWhy task is needed
... reasonReference 0..1Reference(Any)Why task is needed
... insurance 0..*Reference(Coverage | ClaimResponse)Associated insurance coverage
... note 0..*AnnotationComments made about the task
... relevantHistory 0..*Reference(Provenance)Key events in history of the Task
... restriction 0..1BackboneElementConstraints on fulfillment tasks
.... repetitions 0..1positiveIntHow many times to repeat
.... period 0..1PeriodWhen fulfillment sought
.... recipient 0..*Reference(Patient | Practitioner | PractitionerRole | RelatedPerson | Group | Organization)For whom is fulfillment sought?
... input 0..*BackboneElementInformation used to perform task
.... type 1..1CodeableConceptLabel for the input
.... value[x] 1..1*Content to use in performing the task
... output 0..*BackboneElementInformation produced as part of task
.... type 1..1CodeableConceptLabel for output
.... value[x] 1..1*Result of output

doco Documentation for this format

UML Diagram (Legend)

Task (DomainResource)The business identifier for this taskidentifier : Identifier [0..*]The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this TaskinstantiatesCanonical : canonical [0..1] « ActivityDefinition »The URL pointing to an *externally* maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this TaskinstantiatesUri : uri [0..1]BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a "request" resource such as a ServiceRequest, MedicationRequest, ServiceRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfill. This latter resource is referenced by FocusOn. For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patientbasedOn : Reference [0..*] « Any »An identifier that links together multiple tasks and other requests that were created in the same contextgroupIdentifier : Identifier [0..1]Task that this particular task is part ofpartOf : Reference [0..*] « Task »The current status of the task (this element modifies the meaning of other elements)status : 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. i+R[9]Cs this a proposed task, a planned task, an actionable task, etcintent : code [1..1] « Distinguishes whether the task is a proposal, plan or full order. (Strength=Required)TaskIntent! »Indicates how quickly the Task should be addressed with respect to other requestspriority : code [0..1] « The task's priority. (Strength=Required)RequestPriority! »A name or code (or both) briefly describing what the task involvescode : CodeableConcept [0..1] « Codes to identify what the task involves. These will typically be specific to a particular workflow. (Strength=Example)TaskCode?? »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 createdencounter : Reference [0..1] « Encounter »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)executionPeriod : Period [0..1]The date and time this task was createdauthoredOn : dateTime [0..1]The date and time of last modification to this tasklastModified : dateTime [0..1]The creator of the taskrequester : Reference [0..1] « Device|Organization|Patient| Practitioner|PractitionerRole|RelatedPerson »The kind of participant that should perform the taskperformerType : CodeableConcept [0..*] « The type(s) of task performers allowed. (Strength=Preferred)ProcedurePerformerRoleCodes? »Individual organization or Device currently responsible for task executionowner : Reference [0..1] « Practitioner|PractitionerRole| Organization|CareTeam|HealthcareService|Patient|Device| RelatedPerson »Principal physical location where the this task is performedlocation : Reference [0..1] « Location »A description or code indicating why this task needs to be performedreasonCode : CodeableConcept [0..1]A resource reference indicating why this task needs to be performedreasonReference : Reference [0..1] « Any »Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Taskinsurance : Reference [0..*] « Coverage|ClaimResponse »Free-text information captured about the task as it progressesnote : Annotation [0..*]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 taskrelevantHistory : Reference [0..*] « Provenance »RestrictionIndicates 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 one potential recipient/target, to identify who is fulfillment is sought forrecipient : Reference [0..*] « Patient|Practitioner|PractitionerRole| 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]If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actionedrestriction[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..* Identifier Task Instance Identifier --></identifier>
 <instantiatesCanonical><!-- 0..1 canonical(ActivityDefinition) Formal definition of task --></instantiatesCanonical>
 <instantiatesUri value="[uri]"/><!-- 0..1 Formal definition of task -->
 <basedOn><!-- 0..* Reference(Any) Request fulfilled by this task --></basedOn>
 <groupIdentifier><!-- 0..1 Identifier Requisition or grouper id --></groupIdentifier>
 <partOf><!-- 0..* Reference(Task) Composite task --></partOf>
 <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>
 <intent value="[code]"/><!-- 1..1 unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option -->
 <priority value="[code]"/><!-- 0..1 routine | urgent | asap | stat -->
 <code><!-- 0..1 CodeableConcept Task Type --></code>
 <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>
 <encounter><!-- 0..1 Reference(Encounter) Healthcare event during which this task originated --></encounter>
 <executionPeriod><!-- 0..1 Period Start and end time of execution --></executionPeriod>
 <authoredOn value="[dateTime]"/><!-- ?? 0..1 Task Creation Date -->
 <lastModified value="[dateTime]"/><!-- ?? 0..1 Task Last Modified Date -->
 <requester><!-- 0..1 Reference(Device|Organization|Patient|Practitioner|
   PractitionerRole|RelatedPerson) Who is asking for task to be done --></requester>
 <performerType><!-- 0..* CodeableConcept Requested performer --></performerType>
 <owner><!-- 0..1 Reference(CareTeam|Device|HealthcareService|Organization|
   Patient|Practitioner|PractitionerRole|RelatedPerson) Responsible individual --></owner>
 <location><!-- 0..1 Reference(Location) Where task occurs --></location>
 <reasonCode><!-- 0..1 CodeableConcept Why task is needed --></reasonCode>
 <reasonReference><!-- 0..1 Reference(Any) Why task is needed --></reasonReference>
 <insurance><!-- 0..* Reference(ClaimResponse|Coverage) Associated insurance coverage --></insurance>
 <note><!-- 0..* Annotation Comments made about the task --></note>
 <relevantHistory><!-- 0..* Reference(Provenance) Key events in history of the Task --></relevantHistory>
 <restriction>  <!-- 0..1 Constraints on fulfillment tasks -->
  <repetitions value="[positiveInt]"/><!-- 0..1 How many times to repeat -->
  <period><!-- 0..1 Period When fulfillment sought --></period>
  <recipient><!-- 0..* Reference(Group|Organization|Patient|Practitioner|
    PractitionerRole|RelatedPerson) For whom is fulfillment sought? --></recipient>
 </restriction>
 <input>  <!-- 0..* Information used to perform task -->
  <type><!-- 1..1 CodeableConcept Label for the input --></type>
  <value[x]><!-- 1..1 * Content to use in performing the task --></value[x]>
 </input>
 <output>  <!-- 0..* Information produced as part of task -->
  <type><!-- 1..1 CodeableConcept Label for output --></type>
  <value[x]><!-- 1..1 * Result of output --></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
  "instantiatesCanonical" : { canonical(ActivityDefinition) }, // Formal definition of task
  "instantiatesUri" : "<uri>", // Formal definition of task
  "basedOn" : [{ Reference(Any) }], // Request fulfilled by this task
  "groupIdentifier" : { Identifier }, // Requisition or grouper id
  "partOf" : [{ 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"
  "intent" : "<code>", // R!  unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
  "priority" : "<code>", // routine | urgent | asap | stat
  "code" : { CodeableConcept }, // Task Type
  "description" : "<string>", // Human-readable explanation of task
  "focus" : { Reference(Any) }, // What task is acting on
  "for" : { Reference(Any) }, // Beneficiary of the Task
  "encounter" : { Reference(Encounter) }, // Healthcare event during which this task originated
  "executionPeriod" : { Period }, // Start and end time of execution
  "authoredOn" : "<dateTime>", // C? Task Creation Date
  "lastModified" : "<dateTime>", // C? Task Last Modified Date
  "requester" : { Reference(Device|Organization|Patient|Practitioner|
   PractitionerRole|RelatedPerson) }, // Who is asking for task to be done
  "performerType" : [{ CodeableConcept }], // Requested performer
  "owner" : { Reference(CareTeam|Device|HealthcareService|Organization|
   Patient|Practitioner|PractitionerRole|RelatedPerson) }, // Responsible individual
  "location" : { Reference(Location) }, // Where task occurs
  "reasonCode" : { CodeableConcept }, // Why task is needed
  "reasonReference" : { Reference(Any) }, // Why task is needed
  "insurance" : [{ Reference(ClaimResponse|Coverage) }], // Associated insurance coverage
  "note" : [{ Annotation }], // Comments made about the task
  "relevantHistory" : [{ Reference(Provenance) }], // Key events in history of the Task
  "restriction" : { // Constraints on fulfillment tasks
    "repetitions" : "<positiveInt>", // How many times to repeat
    "period" : { Period }, // When fulfillment sought
    "recipient" : [{ Reference(Group|Organization|Patient|Practitioner|
    PractitionerRole|RelatedPerson) }] // For whom is fulfillment sought?
  },
  "input" : [{ // Information used to perform task
    "type" : { CodeableConcept }, // R!  Label for the input
    // value[x]: Content to use in performing the task. One of these 51:
    "valueBase64Binary" : "<base64Binary>"
    "valueBoolean" : <boolean>
    "valueCanonical" : "<canonical>"
    "valueCode" : "<code>"
    "valueDate" : "<date>"
    "valueDateTime" : "<dateTime>"
    "valueDecimal" : <decimal>
    "valueId" : "<id>"
    "valueInstant" : "<instant>"
    "valueInteger" : <integer>
    "valueInteger64" : "<integer64>"
    "valueMarkdown" : "<markdown>"
    "valueOid" : "<oid>"
    "valuePositiveInt" : "<positiveInt>"
    "valueString" : "<string>"
    "valueTime" : "<time>"
    "valueUnsignedInt" : "<unsignedInt>"
    "valueUri" : "<uri>"
    "valueUrl" : "<url>"
    "valueUuid" : "<uuid>"
    "valueAddress" : { Address }
    "valueAge" : { Age }
    "valueAnnotation" : { Annotation }
    "valueAttachment" : { Attachment }
    "valueCodeableConcept" : { CodeableConcept }
    "valueCoding" : { Coding }
    "valueContactPoint" : { ContactPoint }
    "valueCount" : { Count }
    "valueDistance" : { Distance }
    "valueDuration" : { Duration }
    "valueHumanName" : { HumanName }
    "valueIdentifier" : { Identifier }
    "valueMoney" : { Money }
    "valuePeriod" : { Period }
    "valueQuantity" : { Quantity }
    "valueRange" : { Range }
    "valueRatio" : { Ratio }
    "valueReference" : { Reference }
    "valueSampledData" : { SampledData }
    "valueSignature" : { Signature }
    "valueTiming" : { Timing }
    "valueContactDetail" : { ContactDetail }
    "valueContributor" : { Contributor }
    "valueDataRequirement" : { DataRequirement }
    "valueExpression" : { Expression }
    "valueParameterDefinition" : { ParameterDefinition }
    "valueRelatedArtifact" : { RelatedArtifact }
    "valueTriggerDefinition" : { TriggerDefinition }
    "valueUsageContext" : { UsageContext }
    "valueDosage" : { Dosage }
    "valueMeta" : { Meta }
  }],
  "output" : [{ // Information produced as part of task
    "type" : { CodeableConcept }, // R!  Label for output
    // value[x]: Result of output. One of these 51:
    "valueBase64Binary" : "<base64Binary>"
    "valueBoolean" : <boolean>
    "valueCanonical" : "<canonical>"
    "valueCode" : "<code>"
    "valueDate" : "<date>"
    "valueDateTime" : "<dateTime>"
    "valueDecimal" : <decimal>
    "valueId" : "<id>"
    "valueInstant" : "<instant>"
    "valueInteger" : <integer>
    "valueInteger64" : "<integer64>"
    "valueMarkdown" : "<markdown>"
    "valueOid" : "<oid>"
    "valuePositiveInt" : "<positiveInt>"
    "valueString" : "<string>"
    "valueTime" : "<time>"
    "valueUnsignedInt" : "<unsignedInt>"
    "valueUri" : "<uri>"
    "valueUrl" : "<url>"
    "valueUuid" : "<uuid>"
    "valueAddress" : { Address }
    "valueAge" : { Age }
    "valueAnnotation" : { Annotation }
    "valueAttachment" : { Attachment }
    "valueCodeableConcept" : { CodeableConcept }
    "valueCoding" : { Coding }
    "valueContactPoint" : { ContactPoint }
    "valueCount" : { Count }
    "valueDistance" : { Distance }
    "valueDuration" : { Duration }
    "valueHumanName" : { HumanName }
    "valueIdentifier" : { Identifier }
    "valueMoney" : { Money }
    "valuePeriod" : { Period }
    "valueQuantity" : { Quantity }
    "valueRange" : { Range }
    "valueRatio" : { Ratio }
    "valueReference" : { Reference }
    "valueSampledData" : { SampledData }
    "valueSignature" : { Signature }
    "valueTiming" : { Timing }
    "valueContactDetail" : { ContactDetail }
    "valueContributor" : { Contributor }
    "valueDataRequirement" : { DataRequirement }
    "valueExpression" : { Expression }
    "valueParameterDefinition" : { ParameterDefinition }
    "valueRelatedArtifact" : { RelatedArtifact }
    "valueTriggerDefinition" : { TriggerDefinition }
    "valueUsageContext" : { UsageContext }
    "valueDosage" : { Dosage }
    "valueMeta" : { Meta }
  }]
}

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..* Task Instance Identifier
  fhir:Task.instantiatesCanonical [ canonical(ActivityDefinition) ]; # 0..1 Formal definition of task
  fhir:Task.instantiatesUri [ uri ]; # 0..1 Formal definition of task
  fhir:Task.basedOn [ Reference(Any) ], ... ; # 0..* Request fulfilled by this task
  fhir:Task.groupIdentifier [ Identifier ]; # 0..1 Requisition or grouper id
  fhir:Task.partOf [ 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.intent [ code ]; # 1..1 unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
  fhir:Task.priority [ code ]; # 0..1 routine | urgent | asap | stat
  fhir:Task.code [ CodeableConcept ]; # 0..1 Task Type
  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.encounter [ Reference(Encounter) ]; # 0..1 Healthcare event during which this task originated
  fhir:Task.executionPeriod [ Period ]; # 0..1 Start and end time of execution
  fhir:Task.authoredOn [ dateTime ]; # 0..1 Task Creation Date
  fhir:Task.lastModified [ dateTime ]; # 0..1 Task Last Modified Date
  fhir:Task.requester [ Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ]; # 0..1 Who is asking for task to be done
  fhir:Task.performerType [ CodeableConcept ], ... ; # 0..* Requested performer
  fhir:Task.owner [ Reference(CareTeam|Device|HealthcareService|Organization|Patient|Practitioner|
  PractitionerRole|RelatedPerson) ]; # 0..1 Responsible individual
  fhir:Task.location [ Reference(Location) ]; # 0..1 Where task occurs
  fhir:Task.reasonCode [ CodeableConcept ]; # 0..1 Why task is needed
  fhir:Task.reasonReference [ Reference(Any) ]; # 0..1 Why task is needed
  fhir:Task.insurance [ Reference(ClaimResponse|Coverage) ], ... ; # 0..* Associated insurance coverage
  fhir:Task.note [ Annotation ], ... ; # 0..* Comments made about the task
  fhir:Task.relevantHistory [ Reference(Provenance) ], ... ; # 0..* Key events in history of the Task
  fhir:Task.restriction [ # 0..1 Constraints on fulfillment tasks
    fhir:Task.restriction.repetitions [ positiveInt ]; # 0..1 How many times to repeat
    fhir:Task.restriction.period [ Period ]; # 0..1 When fulfillment sought
    fhir:Task.restriction.recipient [ Reference(Group|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ], ... ; # 0..* For whom is fulfillment sought?
  ];
  fhir:Task.input [ # 0..* Information used to perform task
    fhir:Task.input.type [ CodeableConcept ]; # 1..1 Label for the input
    # Task.input.value[x] : 1..1 Content to use in performing the task. One of these 51
      fhir:Task.input.valueBase64Binary [ base64Binary ]
      fhir:Task.input.valueBoolean [ boolean ]
      fhir:Task.input.valueCanonical [ canonical ]
      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.valueInteger64 [ integer64 ]
      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.valueUrl [ url ]
      fhir:Task.input.valueUuid [ uuid ]
      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.valueContactDetail [ ContactDetail ]
      fhir:Task.input.valueContributor [ Contributor ]
      fhir:Task.input.valueDataRequirement [ DataRequirement ]
      fhir:Task.input.valueExpression [ Expression ]
      fhir:Task.input.valueParameterDefinition [ ParameterDefinition ]
      fhir:Task.input.valueRelatedArtifact [ RelatedArtifact ]
      fhir:Task.input.valueTriggerDefinition [ TriggerDefinition ]
      fhir:Task.input.valueUsageContext [ UsageContext ]
      fhir:Task.input.valueDosage [ Dosage ]
      fhir:Task.input.valueMeta [ Meta ]
  ], ...;
  fhir:Task.output [ # 0..* Information produced as part of task
    fhir:Task.output.type [ CodeableConcept ]; # 1..1 Label for output
    # Task.output.value[x] : 1..1 Result of output. One of these 51
      fhir:Task.output.valueBase64Binary [ base64Binary ]
      fhir:Task.output.valueBoolean [ boolean ]
      fhir:Task.output.valueCanonical [ canonical ]
      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.valueInteger64 [ integer64 ]
      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.valueUrl [ url ]
      fhir:Task.output.valueUuid [ uuid ]
      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.valueContactDetail [ ContactDetail ]
      fhir:Task.output.valueContributor [ Contributor ]
      fhir:Task.output.valueDataRequirement [ DataRequirement ]
      fhir:Task.output.valueExpression [ Expression ]
      fhir:Task.output.valueParameterDefinition [ ParameterDefinition ]
      fhir:Task.output.valueRelatedArtifact [ RelatedArtifact ]
      fhir:Task.output.valueTriggerDefinition [ TriggerDefinition ]
      fhir:Task.output.valueUsageContext [ UsageContext ]
      fhir:Task.output.valueDosage [ Dosage ]
      fhir:Task.output.valueMeta [ Meta ]
  ], ...;
]

Changes since R3

Task
Task.status
  • Change value set from http://hl7.org/fhir/ValueSet/task-status|4.0.0 to http://hl7.org/fhir/ValueSet/task-status|4.5.0
Task.intent
  • Change value set from http://hl7.org/fhir/ValueSet/task-intent|4.0.0 to http://hl7.org/fhir/ValueSet/task-intent|4.5.0
Task.priority
  • Change value set from http://hl7.org/fhir/ValueSet/request-priority|4.0.0 to http://hl7.org/fhir/ValueSet/request-priority|4.5.0
Task.input.value[x]
  • Add Types integer64, Meta
Task.output.value[x]
  • Add Types integer64, Meta

See the Full Difference for further information

This analysis is available as XML or JSON.

See R3 <--> R4 Conversion Maps (status = 6 tests that all execute ok. 3 fail round-trip testing and 1 r3 resources are invalid (0 errors).)

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Task TUDomainResourceA task to be performed
+ Rule: Last modified date must be greater than or equal to authored-on date.
Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... identifier 0..*IdentifierTask Instance Identifier
... instantiatesCanonical Σ0..1canonical(ActivityDefinition)Formal definition of task
... instantiatesUri Σ0..1uriFormal definition of task
... basedOn Σ0..*Reference(Any)Request fulfilled by this task
... groupIdentifier Σ0..1IdentifierRequisition or grouper id
... partOf Σ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"
... intent Σ1..1codeunknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
TaskIntent (Required)
... priority 0..1coderoutine | urgent | asap | stat
Request priority (Required)
... code Σ0..1CodeableConceptTask Type
Task Codes (Example)
... description Σ0..1stringHuman-readable explanation of task
... focus Σ0..1Reference(Any)What task is acting on
... for Σ0..1Reference(Any)Beneficiary of the Task
... encounter Σ0..1Reference(Encounter)Healthcare event during which this task originated
... executionPeriod Σ0..1PeriodStart and end time of execution
... authoredOn I0..1dateTimeTask Creation Date
... lastModified ΣI0..1dateTimeTask Last Modified Date
... requester Σ0..1Reference(Device | Organization | Patient | Practitioner | PractitionerRole | RelatedPerson)Who is asking for task to be done
... performerType 0..*CodeableConceptRequested performer
Procedure Performer Role Codes (Preferred)
... owner Σ0..1Reference(Practitioner | PractitionerRole | Organization | CareTeam | HealthcareService | Patient | Device | RelatedPerson)Responsible individual
... location Σ0..1Reference(Location)Where task occurs
... reasonCode 0..1CodeableConceptWhy task is needed
... reasonReference 0..1Reference(Any)Why task is needed
... insurance 0..*Reference(Coverage | ClaimResponse)Associated insurance coverage
... note 0..*AnnotationComments made about the task
... relevantHistory 0..*Reference(Provenance)Key events in history of the Task
... restriction 0..1BackboneElementConstraints on fulfillment tasks
.... repetitions 0..1positiveIntHow many times to repeat
.... period 0..1PeriodWhen fulfillment sought
.... recipient 0..*Reference(Patient | Practitioner | PractitionerRole | RelatedPerson | Group | Organization)For whom is fulfillment sought?
... input 0..*BackboneElementInformation used to perform task
.... type 1..1CodeableConceptLabel for the input
.... value[x] 1..1*Content to use in performing the task
... output 0..*BackboneElementInformation produced as part of task
.... type 1..1CodeableConceptLabel for output
.... value[x] 1..1*Result of output

doco Documentation for this format

UML Diagram (Legend)

Task (DomainResource)The business identifier for this taskidentifier : Identifier [0..*]The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this TaskinstantiatesCanonical : canonical [0..1] « ActivityDefinition »The URL pointing to an *externally* maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this TaskinstantiatesUri : uri [0..1]BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a "request" resource such as a ServiceRequest, MedicationRequest, ServiceRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfill. This latter resource is referenced by FocusOn. For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patientbasedOn : Reference [0..*] « Any »An identifier that links together multiple tasks and other requests that were created in the same contextgroupIdentifier : Identifier [0..1]Task that this particular task is part ofpartOf : Reference [0..*] « Task »The current status of the task (this element modifies the meaning of other elements)status : 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. i+R[9]Cs this a proposed task, a planned task, an actionable task, etcintent : code [1..1] « Distinguishes whether the task is a proposal, plan or full order. (Strength=Required)TaskIntent! »Indicates how quickly the Task should be addressed with respect to other requestspriority : code [0..1] « The task's priority. (Strength=Required)RequestPriority! »A name or code (or both) briefly describing what the task involvescode : CodeableConcept [0..1] « Codes to identify what the task involves. These will typically be specific to a particular workflow. (Strength=Example)TaskCode?? »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 createdencounter : Reference [0..1] « Encounter »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)executionPeriod : Period [0..1]The date and time this task was createdauthoredOn : dateTime [0..1]The date and time of last modification to this tasklastModified : dateTime [0..1]The creator of the taskrequester : Reference [0..1] « Device|Organization|Patient| Practitioner|PractitionerRole|RelatedPerson »The kind of participant that should perform the taskperformerType : CodeableConcept [0..*] « The type(s) of task performers allowed. (Strength=Preferred)ProcedurePerformerRoleCodes? »Individual organization or Device currently responsible for task executionowner : Reference [0..1] « Practitioner|PractitionerRole| Organization|CareTeam|HealthcareService|Patient|Device| RelatedPerson »Principal physical location where the this task is performedlocation : Reference [0..1] « Location »A description or code indicating why this task needs to be performedreasonCode : CodeableConcept [0..1]A resource reference indicating why this task needs to be performedreasonReference : Reference [0..1] « Any »Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Taskinsurance : Reference [0..*] « Coverage|ClaimResponse »Free-text information captured about the task as it progressesnote : Annotation [0..*]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 taskrelevantHistory : Reference [0..*] « Provenance »RestrictionIndicates 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 one potential recipient/target, to identify who is fulfillment is sought forrecipient : Reference [0..*] « Patient|Practitioner|PractitionerRole| 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]If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actionedrestriction[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..* Identifier Task Instance Identifier --></identifier>
 <instantiatesCanonical><!-- 0..1 canonical(ActivityDefinition) Formal definition of task --></instantiatesCanonical>
 <instantiatesUri value="[uri]"/><!-- 0..1 Formal definition of task -->
 <basedOn><!-- 0..* Reference(Any) Request fulfilled by this task --></basedOn>
 <groupIdentifier><!-- 0..1 Identifier Requisition or grouper id --></groupIdentifier>
 <partOf><!-- 0..* Reference(Task) Composite task --></partOf>
 <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>
 <intent value="[code]"/><!-- 1..1 unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option -->
 <priority value="[code]"/><!-- 0..1 routine | urgent | asap | stat -->
 <code><!-- 0..1 CodeableConcept Task Type --></code>
 <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>
 <encounter><!-- 0..1 Reference(Encounter) Healthcare event during which this task originated --></encounter>
 <executionPeriod><!-- 0..1 Period Start and end time of execution --></executionPeriod>
 <authoredOn value="[dateTime]"/><!-- ?? 0..1 Task Creation Date -->
 <lastModified value="[dateTime]"/><!-- ?? 0..1 Task Last Modified Date -->
 <requester><!-- 0..1 Reference(Device|Organization|Patient|Practitioner|
   PractitionerRole|RelatedPerson) Who is asking for task to be done --></requester>
 <performerType><!-- 0..* CodeableConcept Requested performer --></performerType>
 <owner><!-- 0..1 Reference(CareTeam|Device|HealthcareService|Organization|
   Patient|Practitioner|PractitionerRole|RelatedPerson) Responsible individual --></owner>
 <location><!-- 0..1 Reference(Location) Where task occurs --></location>
 <reasonCode><!-- 0..1 CodeableConcept Why task is needed --></reasonCode>
 <reasonReference><!-- 0..1 Reference(Any) Why task is needed --></reasonReference>
 <insurance><!-- 0..* Reference(ClaimResponse|Coverage) Associated insurance coverage --></insurance>
 <note><!-- 0..* Annotation Comments made about the task --></note>
 <relevantHistory><!-- 0..* Reference(Provenance) Key events in history of the Task --></relevantHistory>
 <restriction>  <!-- 0..1 Constraints on fulfillment tasks -->
  <repetitions value="[positiveInt]"/><!-- 0..1 How many times to repeat -->
  <period><!-- 0..1 Period When fulfillment sought --></period>
  <recipient><!-- 0..* Reference(Group|Organization|Patient|Practitioner|
    PractitionerRole|RelatedPerson) For whom is fulfillment sought? --></recipient>
 </restriction>
 <input>  <!-- 0..* Information used to perform task -->
  <type><!-- 1..1 CodeableConcept Label for the input --></type>
  <value[x]><!-- 1..1 * Content to use in performing the task --></value[x]>
 </input>
 <output>  <!-- 0..* Information produced as part of task -->
  <type><!-- 1..1 CodeableConcept Label for output --></type>
  <value[x]><!-- 1..1 * Result of output --></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
  "instantiatesCanonical" : { canonical(ActivityDefinition) }, // Formal definition of task
  "instantiatesUri" : "<uri>", // Formal definition of task
  "basedOn" : [{ Reference(Any) }], // Request fulfilled by this task
  "groupIdentifier" : { Identifier }, // Requisition or grouper id
  "partOf" : [{ 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"
  "intent" : "<code>", // R!  unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
  "priority" : "<code>", // routine | urgent | asap | stat
  "code" : { CodeableConcept }, // Task Type
  "description" : "<string>", // Human-readable explanation of task
  "focus" : { Reference(Any) }, // What task is acting on
  "for" : { Reference(Any) }, // Beneficiary of the Task
  "encounter" : { Reference(Encounter) }, // Healthcare event during which this task originated
  "executionPeriod" : { Period }, // Start and end time of execution
  "authoredOn" : "<dateTime>", // C? Task Creation Date
  "lastModified" : "<dateTime>", // C? Task Last Modified Date
  "requester" : { Reference(Device|Organization|Patient|Practitioner|
   PractitionerRole|RelatedPerson) }, // Who is asking for task to be done
  "performerType" : [{ CodeableConcept }], // Requested performer
  "owner" : { Reference(CareTeam|Device|HealthcareService|Organization|
   Patient|Practitioner|PractitionerRole|RelatedPerson) }, // Responsible individual
  "location" : { Reference(Location) }, // Where task occurs
  "reasonCode" : { CodeableConcept }, // Why task is needed
  "reasonReference" : { Reference(Any) }, // Why task is needed
  "insurance" : [{ Reference(ClaimResponse|Coverage) }], // Associated insurance coverage
  "note" : [{ Annotation }], // Comments made about the task
  "relevantHistory" : [{ Reference(Provenance) }], // Key events in history of the Task
  "restriction" : { // Constraints on fulfillment tasks
    "repetitions" : "<positiveInt>", // How many times to repeat
    "period" : { Period }, // When fulfillment sought
    "recipient" : [{ Reference(Group|Organization|Patient|Practitioner|
    PractitionerRole|RelatedPerson) }] // For whom is fulfillment sought?
  },
  "input" : [{ // Information used to perform task
    "type" : { CodeableConcept }, // R!  Label for the input
    // value[x]: Content to use in performing the task. One of these 51:
    "valueBase64Binary" : "<base64Binary>"
    "valueBoolean" : <boolean>
    "valueCanonical" : "<canonical>"
    "valueCode" : "<code>"
    "valueDate" : "<date>"
    "valueDateTime" : "<dateTime>"
    "valueDecimal" : <decimal>
    "valueId" : "<id>"
    "valueInstant" : "<instant>"
    "valueInteger" : <integer>
    "valueInteger64" : "<integer64>"
    "valueMarkdown" : "<markdown>"
    "valueOid" : "<oid>"
    "valuePositiveInt" : "<positiveInt>"
    "valueString" : "<string>"
    "valueTime" : "<time>"
    "valueUnsignedInt" : "<unsignedInt>"
    "valueUri" : "<uri>"
    "valueUrl" : "<url>"
    "valueUuid" : "<uuid>"
    "valueAddress" : { Address }
    "valueAge" : { Age }
    "valueAnnotation" : { Annotation }
    "valueAttachment" : { Attachment }
    "valueCodeableConcept" : { CodeableConcept }
    "valueCoding" : { Coding }
    "valueContactPoint" : { ContactPoint }
    "valueCount" : { Count }
    "valueDistance" : { Distance }
    "valueDuration" : { Duration }
    "valueHumanName" : { HumanName }
    "valueIdentifier" : { Identifier }
    "valueMoney" : { Money }
    "valuePeriod" : { Period }
    "valueQuantity" : { Quantity }
    "valueRange" : { Range }
    "valueRatio" : { Ratio }
    "valueReference" : { Reference }
    "valueSampledData" : { SampledData }
    "valueSignature" : { Signature }
    "valueTiming" : { Timing }
    "valueContactDetail" : { ContactDetail }
    "valueContributor" : { Contributor }
    "valueDataRequirement" : { DataRequirement }
    "valueExpression" : { Expression }
    "valueParameterDefinition" : { ParameterDefinition }
    "valueRelatedArtifact" : { RelatedArtifact }
    "valueTriggerDefinition" : { TriggerDefinition }
    "valueUsageContext" : { UsageContext }
    "valueDosage" : { Dosage }
    "valueMeta" : { Meta }
  }],
  "output" : [{ // Information produced as part of task
    "type" : { CodeableConcept }, // R!  Label for output
    // value[x]: Result of output. One of these 51:
    "valueBase64Binary" : "<base64Binary>"
    "valueBoolean" : <boolean>
    "valueCanonical" : "<canonical>"
    "valueCode" : "<code>"
    "valueDate" : "<date>"
    "valueDateTime" : "<dateTime>"
    "valueDecimal" : <decimal>
    "valueId" : "<id>"
    "valueInstant" : "<instant>"
    "valueInteger" : <integer>
    "valueInteger64" : "<integer64>"
    "valueMarkdown" : "<markdown>"
    "valueOid" : "<oid>"
    "valuePositiveInt" : "<positiveInt>"
    "valueString" : "<string>"
    "valueTime" : "<time>"
    "valueUnsignedInt" : "<unsignedInt>"
    "valueUri" : "<uri>"
    "valueUrl" : "<url>"
    "valueUuid" : "<uuid>"
    "valueAddress" : { Address }
    "valueAge" : { Age }
    "valueAnnotation" : { Annotation }
    "valueAttachment" : { Attachment }
    "valueCodeableConcept" : { CodeableConcept }
    "valueCoding" : { Coding }
    "valueContactPoint" : { ContactPoint }
    "valueCount" : { Count }
    "valueDistance" : { Distance }
    "valueDuration" : { Duration }
    "valueHumanName" : { HumanName }
    "valueIdentifier" : { Identifier }
    "valueMoney" : { Money }
    "valuePeriod" : { Period }
    "valueQuantity" : { Quantity }
    "valueRange" : { Range }
    "valueRatio" : { Ratio }
    "valueReference" : { Reference }
    "valueSampledData" : { SampledData }
    "valueSignature" : { Signature }
    "valueTiming" : { Timing }
    "valueContactDetail" : { ContactDetail }
    "valueContributor" : { Contributor }
    "valueDataRequirement" : { DataRequirement }
    "valueExpression" : { Expression }
    "valueParameterDefinition" : { ParameterDefinition }
    "valueRelatedArtifact" : { RelatedArtifact }
    "valueTriggerDefinition" : { TriggerDefinition }
    "valueUsageContext" : { UsageContext }
    "valueDosage" : { Dosage }
    "valueMeta" : { Meta }
  }]
}

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..* Task Instance Identifier
  fhir:Task.instantiatesCanonical [ canonical(ActivityDefinition) ]; # 0..1 Formal definition of task
  fhir:Task.instantiatesUri [ uri ]; # 0..1 Formal definition of task
  fhir:Task.basedOn [ Reference(Any) ], ... ; # 0..* Request fulfilled by this task
  fhir:Task.groupIdentifier [ Identifier ]; # 0..1 Requisition or grouper id
  fhir:Task.partOf [ 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.intent [ code ]; # 1..1 unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
  fhir:Task.priority [ code ]; # 0..1 routine | urgent | asap | stat
  fhir:Task.code [ CodeableConcept ]; # 0..1 Task Type
  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.encounter [ Reference(Encounter) ]; # 0..1 Healthcare event during which this task originated
  fhir:Task.executionPeriod [ Period ]; # 0..1 Start and end time of execution
  fhir:Task.authoredOn [ dateTime ]; # 0..1 Task Creation Date
  fhir:Task.lastModified [ dateTime ]; # 0..1 Task Last Modified Date
  fhir:Task.requester [ Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ]; # 0..1 Who is asking for task to be done
  fhir:Task.performerType [ CodeableConcept ], ... ; # 0..* Requested performer
  fhir:Task.owner [ Reference(CareTeam|Device|HealthcareService|Organization|Patient|Practitioner|
  PractitionerRole|RelatedPerson) ]; # 0..1 Responsible individual
  fhir:Task.location [ Reference(Location) ]; # 0..1 Where task occurs
  fhir:Task.reasonCode [ CodeableConcept ]; # 0..1 Why task is needed
  fhir:Task.reasonReference [ Reference(Any) ]; # 0..1 Why task is needed
  fhir:Task.insurance [ Reference(ClaimResponse|Coverage) ], ... ; # 0..* Associated insurance coverage
  fhir:Task.note [ Annotation ], ... ; # 0..* Comments made about the task
  fhir:Task.relevantHistory [ Reference(Provenance) ], ... ; # 0..* Key events in history of the Task
  fhir:Task.restriction [ # 0..1 Constraints on fulfillment tasks
    fhir:Task.restriction.repetitions [ positiveInt ]; # 0..1 How many times to repeat
    fhir:Task.restriction.period [ Period ]; # 0..1 When fulfillment sought
    fhir:Task.restriction.recipient [ Reference(Group|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ], ... ; # 0..* For whom is fulfillment sought?
  ];
  fhir:Task.input [ # 0..* Information used to perform task
    fhir:Task.input.type [ CodeableConcept ]; # 1..1 Label for the input
    # Task.input.value[x] : 1..1 Content to use in performing the task. One of these 51
      fhir:Task.input.valueBase64Binary [ base64Binary ]
      fhir:Task.input.valueBoolean [ boolean ]
      fhir:Task.input.valueCanonical [ canonical ]
      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.valueInteger64 [ integer64 ]
      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.valueUrl [ url ]
      fhir:Task.input.valueUuid [ uuid ]
      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.valueContactDetail [ ContactDetail ]
      fhir:Task.input.valueContributor [ Contributor ]
      fhir:Task.input.valueDataRequirement [ DataRequirement ]
      fhir:Task.input.valueExpression [ Expression ]
      fhir:Task.input.valueParameterDefinition [ ParameterDefinition ]
      fhir:Task.input.valueRelatedArtifact [ RelatedArtifact ]
      fhir:Task.input.valueTriggerDefinition [ TriggerDefinition ]
      fhir:Task.input.valueUsageContext [ UsageContext ]
      fhir:Task.input.valueDosage [ Dosage ]
      fhir:Task.input.valueMeta [ Meta ]
  ], ...;
  fhir:Task.output [ # 0..* Information produced as part of task
    fhir:Task.output.type [ CodeableConcept ]; # 1..1 Label for output
    # Task.output.value[x] : 1..1 Result of output. One of these 51
      fhir:Task.output.valueBase64Binary [ base64Binary ]
      fhir:Task.output.valueBoolean [ boolean ]
      fhir:Task.output.valueCanonical [ canonical ]
      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.valueInteger64 [ integer64 ]
      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.valueUrl [ url ]
      fhir:Task.output.valueUuid [ uuid ]
      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.valueContactDetail [ ContactDetail ]
      fhir:Task.output.valueContributor [ Contributor ]
      fhir:Task.output.valueDataRequirement [ DataRequirement ]
      fhir:Task.output.valueExpression [ Expression ]
      fhir:Task.output.valueParameterDefinition [ ParameterDefinition ]
      fhir:Task.output.valueRelatedArtifact [ RelatedArtifact ]
      fhir:Task.output.valueTriggerDefinition [ TriggerDefinition ]
      fhir:Task.output.valueUsageContext [ UsageContext ]
      fhir:Task.output.valueDosage [ Dosage ]
      fhir:Task.output.valueMeta [ Meta ]
  ], ...;
]

Changes since Release 3

Task
Task.status
  • Change value set from http://hl7.org/fhir/ValueSet/task-status|4.0.0 to http://hl7.org/fhir/ValueSet/task-status|4.5.0
Task.intent
  • Change value set from http://hl7.org/fhir/ValueSet/task-intent|4.0.0 to http://hl7.org/fhir/ValueSet/task-intent|4.5.0
Task.priority
  • Change value set from http://hl7.org/fhir/ValueSet/request-priority|4.0.0 to http://hl7.org/fhir/ValueSet/request-priority|4.5.0
Task.input.value[x]
  • Add Types integer64, Meta
Task.output.value[x]
  • Add Types integer64, Meta

See the Full Difference for further information

This analysis is available as XML or JSON.

See R3 <--> R4 Conversion Maps (status = 6 tests that all execute ok. 3 fail round-trip testing and 1 r3 resources are invalid (0 errors).)

 

See the Profiles & Extensions and the alternate definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) + see the extensions, the spreadsheet version & the dependency analysis a

PathDefinitionTypeReference
Task.status The current status of the task.RequiredTaskStatus
Task.statusReason Codes to identify the reason for current status. These will typically be specific to a particular workflow.UnknownNo details provided yet
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.intent Distinguishes whether the task is a proposal, plan or full order.RequiredTaskIntent
Task.priority The task's priority.RequiredRequestPriority
Task.code Codes to identify what the task involves. These will typically be specific to a particular workflow.ExampleTaskCode
Task.performerType The type(s) of task performers allowed.PreferredProcedurePerformerRoleCodes
Task.reasonCode 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", "Concomitent 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

idLevelLocationDescriptionExpression
inv-1Rule (base)Last modified date must be greater than or equal to authored-on date.lastModified.exists().not() or authoredOn.exists().not() or lastModified >= authoredOn

Tasks often have titles (eg "My Tasks", "Outstanding Tasks for Patient X") which can be presented in a list. The task title should go into the Task.code as a coded concept and/or text.

The following diagram reflects the "typical" state machine for Task. Note that not all states will be supported by all workflows and that some workflows may support additional transitions, including transitions from terminal states (e.g. back to "in-progress" from "failed" or "completed").

Diagram showing typical state machine for the Task resource

While the intention of a "cancelled" task is that all work authorized by the task should cease, this might not always be possible practice. It is possible that the originally requested action could still be completed and still attached to the Task but this would not change the status of the task. If the placer cancels a task, it signals they no longer care about the outcome of the task.

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

NameTypeDescriptionExpressionIn Common
authored-on NdateSearch by creation dateTask.authoredOn
based-onreferenceSearch by requests this task is based onTask.basedOn
(Any)
business-statustokenSearch by business statusTask.businessStatus
codetokenSearch by task codeTask.code
encounterreferenceSearch by encounterTask.encounter
(Encounter)
focusreferenceSearch by task focusTask.focus
(Any)
group-identifiertokenSearch by group identifierTask.groupIdentifier
identifiertokenSearch for a task instance by its business identifierTask.identifier
intent NtokenSearch by task intentTask.intent
modified NdateSearch by last modification dateTask.lastModified
ownerreferenceSearch by task ownerTask.owner
(Practitioner, Organization, CareTeam, Device, Patient, HealthcareService, PractitionerRole, RelatedPerson)
part-ofreferenceSearch by task this task is part ofTask.partOf
(Task)
patientreferenceSearch by patientTask.for.where(resolve() is Patient)
(Patient)
performertokenSearch by recommended type of performer (e.g., Requester, Performer, Scheduler).Task.performerType
perioddateSearch by period Task is/was underwayTask.executionPeriod
priority NtokenSearch by task priorityTask.priority
requesterreferenceSearch by task requesterTask.requester
(Practitioner, Organization, Device, Patient, PractitionerRole, RelatedPerson)
status NtokenSearch by task statusTask.status
subjectreferenceSearch by subjectTask.for
(Any)