Task
Introduction
Scope and Usage
Note to Balloters: To ensure this resource is ready for Normative status, we are seeking ballot comment on the substantive content. The key changes made since R5 include:
- Removed the Task.instantiatesCanonical and Task.instantiatesURI; and advise implementers to use the workflow instantiates extensions
- Made the Task.focus element a new backbone
- Consolidated the Task State Machine sections to the Notes section:task.html#statemachine
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.
Concretely the Task resource could be used in FHIR to serve different purposes like:
- operationalize a Request (but could exist without a Request),
- communicate between Filler and Placer,
- track business status (i.e. collection of specimen, dispense of medication, procedure scheduled),
- communicate the results of the execution of the Task via .output,
- launch an application (https://www.hl7.org/fhir/smart-app-launch/task-launch.html),
- fill in a Questionnaire,
- provide CDS advice that recommends performing a certain action (https://www.hl7.org/fhir/uv/cpg/StructureDefinition-cpg-administermedicationtask.html).
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.
If a Task is seeking to instantiate or modify something, the entity to be instantiated or modified SHALL be pointed to by the Task.focus.
[%stu-note dstu%] Task.instantiatesCanonical and Task.instantiatesURI have been removed from the core elements. Instead, use the following workflow extensions:
[%end-note%]
Background and Context
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 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.
[%stu-note dstu%] Currently, task pre-requisites can be represented using Task's `description` element or the RequestOrchestration 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. [%end-note%]
Boundaries and Relationships
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. 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.
The Task resource can represent an authorization for a service to be provided or the fulfillment of an authorization (by another Task or resource type that implements the Request pattern). For further information about the separation of responsibilities, refer to the Fulfillment/Execution section of the Request pattern. Information about the details of the fulfillment of an authorization may be handled by additional Task resource instances.
Tasks may have named inputs and outputs. Inputs represent information that is provided in order for a task to be completed. Outputs represent intermediate or final results produced while performing a task. For example, in a task supporting reading of radiology images, 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.
Notes
Tasks vs. other Requests
While Task can be used to seek fulfillment of other authorizations such as ServiceRequests, MedicationRequests, etc., Task can also be used on its own to solicit action without any prior authorization. However, such requests for action should be tightly time-bound and be satisfied with a single 'event'. I.e. they should ask as a task-list checkbox that can easily be marked as complete. Any action that requires ongoing repeated performance should be captured using a different type of resource, not Task.
Task Titles
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.
Task state machine
Tasks start in a Draft 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 (Draft, 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.
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").
The Cancelled state
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.
StructureDefinition
Elements (Simplified)
- Task [0..*]: - A task to be performed
- Task.identifier [0..*]: Identifier Task Instance Identifier
- Task.basedOn [0..*]: Reference(Resource) Request fulfilled by this task
- Task.groupIdentifier [0..1]: Identifier Requisition or grouper id
- Task.partOf [0..*]: Reference(Task) Composite task
- Task.status [1..1]: code required:task-status draft | requested | received | accepted | +
- Task.statusReason [0..*]: CodeableReference example:task-status-reason Reason for current status
- Task.businessStatus [0..1]: CodeableConcept example:task-business-status E.g. "Specimen collected", "IV prepped"
- Task.intent [1..1]: code required:task-intent unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
- Task.priority [0..1]: code required:request-priority routine | urgent | asap | stat
- Task.doNotPerform [0..1]: boolean True if Task is prohibiting action
- Task.code [0..1]: CodeableConcept extensible:task-code Task Type
- Task.description [0..1]: markdown Human-readable explanation of task
- Task.focus [0..*]: BackboneElement What task is acting on
- Task.focus.value[x] [1..1]: Reference(Resource), canonical What task is acting on
- Task.for [0..1]: Reference(Resource) Beneficiary of the Task
- Task.encounter [0..1]: Reference(Encounter) Healthcare event during which this task originated
- Task.requestedPeriod [0..1]: Period When the task should be performed
- Task.executionPeriod [0..1]: Period Start and end time of execution
- Task.authoredOn [0..1]: dateTime Task Creation Date
- Task.lastModified [0..1]: dateTime Task Last Modified Date
- Task.requester [0..1]: [Reference(Device](/Reference(Device), Group, Organization, Patient, Practitioner, PractitionerRole, RelatedPerson)) Who is asking for task to be done
- Task.requestedPerformer [0..*]: CodeableReference preferred:performer-role Who should perform the Task
- Task.owner [0..1]: [Reference(Practitioner](/Reference(Practitioner), PractitionerRole, Organization, CareTeam, Patient, RelatedPerson, Group)) Responsible individual
- Task.performer [0..*]: BackboneElement Who or what performed the task
- Task.performer.function [0..1]: CodeableConcept example:task-performer-function-code Type of performance
- Task.performer.actor [1..1]: [Reference(Practitioner](/Reference(Practitioner), Device, Organization, PractitionerRole, CareTeam, Patient, RelatedPerson, Group)) Who performed the task
- Task.location [0..1]: Reference(Location) Where task occurs
- Task.reason [0..*]: CodeableReference example:task-reason Why task is needed
- Task.insurance [0..*]: [Reference(Coverage](/Reference(Coverage), ClaimResponse)) Associated insurance coverage
- Task.note [0..*]: Annotation Comments made about the task
- Task.relevantHistory [0..*]: Reference(Provenance) Key events in history of the Task
- Task.restriction [0..1]: BackboneElement Constraints on fulfillment tasks
- Task.restriction.repetitions [0..1]: positiveInt How many times to repeat
- Task.restriction.period [0..1]: Period When fulfillment is sought
- Task.restriction.recipient [0..*]: [Reference(Patient](/Reference(Patient), Practitioner, PractitionerRole, RelatedPerson, Group, Organization, Device)) Individual or entity from whom fulfillment is being sought
- Task.input [0..*]: BackboneElement Information used to perform task
- Task.input.type [1..1]: CodeableConcept example:task-inputoutput-parameter-type Label for the input
- Task.input.value[x] [1..1]: base64Binary, boolean, canonical, code, date, dateTime, decimal, id, instant, integer, integer64, markdown, oid, positiveInt, string, time, unsignedInt, uri, url, uuid, Address, Age, Annotation, Attachment, CodeableConcept, Coding, ContactPoint, Count, Distance, Duration, HumanName, Identifier, Money, Period, Quantity, Range, Ratio, Reference, SampledData, Signature, Timing, ContactDetail, DataRequirement, Expression, ParameterDefinition, RelatedArtifact, TriggerDefinition, UsageContext, Dosage, CodeableReference, Meta Content to use in performing the task
- Task.output [0..*]: BackboneElement Information produced as part of task
- Task.output.type [1..1]: CodeableConcept example:task-inputoutput-parameter-type Label for output
- Task.output.value[x] [1..1]: base64Binary, boolean, canonical, code, date, dateTime, decimal, id, instant, integer, integer64, markdown, oid, positiveInt, string, time, unsignedInt, uri, url, uuid, Address, Age, Annotation, Attachment, CodeableConcept, Coding, ContactPoint, Count, Distance, Duration, HumanName, Identifier, Money, Period, Quantity, Range, Ratio, Reference, SampledData, Signature, Timing, ContactDetail, DataRequirement, Expression, ParameterDefinition, RelatedArtifact, TriggerDefinition, UsageContext, Dosage, CodeableReference, Meta Result of output
Mappings
- Task Mappings — 83 mapping entries
Implementation Guide
implementationguide-Task-core.xml
<?xml version="1.0" encoding="UTF-8"?>
<ImplementationGuide xmlns="http://hl7.org/fhir">
<id value="Task-core"/>
<version value="0.1"/>
<name value="TaskHL7Extensions"/>
<title value="Task H L7 Extensions"/>
<status value="draft"/>
<date value="2017-02-16T00:00:00.000"/>
<publisher value="Health Level Seven, Inc. - FHIR I WG"/>
<description value="Defines common extensions used with or related to the Task resource"/>
</ImplementationGuide>
Resource Packs
list-Task-packs.xml
<?xml version="1.0" encoding="UTF-8"?>
<List xmlns="http://hl7.org/fhir">
<id value="Task-packs"/>
<status value="current"/>
<mode value="working"/>
<entry>
<item>
<reference value="ImplementationGuide/Task-core"/>
</item>
</entry>
</List>
Search Parameters
- authored-on — date — Search by creation date —
Task.authoredOn - based-on — reference — Search by requests this task is based on —
Task.basedOn - business-status — token — Search by business status —
Task.businessStatus - code — token — Search by task code —
Task.code - encounter — reference — Search by encounter —
Task.encounter - focus-reference — reference — Search by task focus - reference —
Task.focus.value.ofType(Reference) - focus-canonical — uri — Search by task focus - canonical —
Task.focus.value.ofType(canonical) - group-identifier — token — Search by group identifier —
Task.groupIdentifier - identifier — token — Search for a task instance by its business identifier —
Task.identifier - input — reference — Search by task input —
Task.input.value.ofType(Reference) - intent — token — Search by task intent —
Task.intent - modified — date — Search by last modification date —
Task.lastModified - output — reference — Search by task output —
Task.output.value.ofType(Reference) - owner — reference — Search by task owner —
Task.owner - part-of — reference — Search by task this task is part of —
Task.partOf - patient — reference — Search by patient —
Task.for.where(resolve() is Patient) - performer — token — Search by recommended type of performer (e.g., Requester, Performer, Scheduler). —
Task.requestedPerformer.concept - requestedperformer-reference — reference — Search by specific requested performer. —
Task.requestedPerformer.reference - actor — reference — Search by specific performer. —
Task.performer.actor - period — date — Search by period Task is/was underway —
Task.executionPeriod - priority — token — Search by task priority —
Task.priority - requester — reference — Search by task requester —
Task.requester - status — token — Search by task status —
Task.status - subject — reference — Search by subject —
Task.for
Examples
- cpg-example-1 — task-cpg-example-1 — Example of a task to not administer a particular questionnaire, because it is part of typical care and patient circumstances indicate it should not be given
- example1 — task-example1 — Example of in-progress/awaiting specimen task for a lipid panel order
- example2 — task-example2 — Example of an accepted, filler generated specimen collection subtask
- example3 — task-example3 — Example of simple prescription task
- example4 — task-example4 — Example of a completed filler generated specimen collection subtask
- example5 — task-example5 — Example of in-progress/test results pending task for a lipid panel order
- example6 — task-example6 — Example of completed task for a lipid panel order
- fm-example1 — task-example-fm-cancel — Example of the cancellation of a preauthorization
- fm-example2 — task-example-fm-poll — Example of polling for queued resources
- fm-example3 — task-example-fm-release — Example of the release of the balance of reserved funds for a preauthorization
- fm-example4 — task-example-fm-reprocess — Example of the cancellation of a preauthorization
- fm-example5 — task-example-fm-status — Example of checking the processing status of a preauthorization
- fm-example6 — task-example-fm-status-resp — Example of the response to checking the processing status of a preauthorization
- task-example — task-example
- task-example-fm-cancel — task-example-fm-cancel
- task-example-fm-poll — task-example-fm-poll
- task-example-fm-release — task-example-fm-release
- task-example-fm-reprocess — task-example-fm-reprocess
- task-example-fm-status — task-example-fm-status
- task-example-fm-status-resp — task-example-fm-status-resp
- task-example1 — task-example1
- task-example2 — task-example2
- task-example3 — task-example3
- task-example4 — task-example4
- task-example5 — task-example5
- task-example6 — task-example6
- task-examples-header — task-examples-header
Mapping Exceptions
task-event-mapping-exceptions.xml
Divergent Elements
- Event.identifier → Task.identifier
- summary | reason=Unknown | pattern=true
- shortUnmatched | reason=Unknown | pattern=Business identifier for task | resource=Task Instance Identifier
- definitionUnmatched | reason=Unknown | pattern=Business identifiers assigned to this task by the performer and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server. | resource=The business identifier for this task.
- commentsUnmatched | reason=Unknown | pattern=Note: This is a business identifier, not a resource identifier (see discussion). It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types. For example, multiple Patient and a Person resource instance might share the same social insurance number.
- requirementsUnmatched | reason=Unknown | pattern=Allows identification of the task as it is known by various participating systems and in a way that remains consistent across servers.
- Event.basedOn → Task.basedOn
- missingTypes | reason=Unknown | pattern=Reference(Request)
- extraTypes | reason=Unknown
- shortUnmatched | reason=Unknown | pattern=Fulfills plan, proposal or order | resource=Request fulfilled by this task
- definitionUnmatched | reason=Unknown | pattern=A plan, proposal or order that is fulfilled in whole or in part by this task. | resource=BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a "request" resource such as a ServiceRequest, MedicationRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfill. This latter resource is referenced by focus. For example, based on a CarePlan (= basedOn), a task is created to fulfill a ServiceRequest ( = focus ) to collect a specimen from a patient.
- requirementsUnmatched | reason=Unknown | pattern=Allows tracing of authorization for the task and tracking whether proposals/recommendations were acted upon.
- Event.partOf → Task.partOf
- missingTypes | reason=Unknown | pattern=Reference(Event)
- extraTypes | reason=Unknown
- shortUnmatched | reason=Unknown | pattern=Part of referenced event | resource=Composite task
- definitionUnmatched | reason=Unknown | pattern=A larger event of which this particular task is a component or step. | resource=Task that this particular task is part of.
- commentsUnmatched | reason=Unknown | pattern=Not to be used to link an task to an Encounter - use 'context' for that. | resource=This should usually be 0..1.
- Event.status → Task.status
- shortUnmatched | reason=Unknown | pattern=preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error | unknown | resource=draft | requested | received | accepted | +
- definitionUnmatched | reason=Unknown | pattern=The current state of the task. | resource=The current status of the task.
- commentsUnmatched | reason=Unknown | pattern=A nominal state-transition diagram can be found in the (Event pattern documentation
Unknown does not represent "other" - one of the defined statuses must apply. Unknown is used when the authoring system is not sure what the current status is.
- Event.statusReason → Task.statusReason
- missingTypes | reason=Unknown | pattern=CodeableConcept
- extraTypes | reason=Unknown
- summary | reason=Unknown | pattern=false
- definitionUnmatched | reason=Unknown | pattern=Captures the reason for the current state of the task. | resource=An explanation as to why this task is held, failed, was refused, etc.
- commentsUnmatched | reason=Unknown | pattern=This is generally only used for "exception" statuses such as "not-done", "suspended" or "cancelled". The reason for performing the event at all is captured in reasonCode, not here. . | resource=This applies to the current status. Look at the history of the task to see reasons for past statuses.
- Event.code → Task.code
- bindingStrength | reason=Unknown | pattern=example
- shortUnmatched | reason=Unknown | pattern=What service was done | resource=Task Type
- definitionUnmatched | reason=Unknown | pattern=A code that identifies the specific service or action that was or is being performed. | resource=A name or code (or both) briefly describing what the task involves.
- Event.product → Task.focus
- missingTypes | reason=Unknown | pattern=CodeableReference(BiologicallyDerivedProduct, Device, DeviceDefinition, Medication, NutritionProduct, Substance)
- extraTypes | reason=Unknown
- shortUnmatched | reason=Unknown | pattern=Product used/provided | resource=What task is acting on
- definitionUnmatched | reason=Unknown | pattern=Indicates the product supplied or manipulated by this task. | resource=The request being fulfilled or the resource being manipulated (changed, suspended, etc.) by this task.
- Event.subject → Task.for
- missingTypes | reason=Unknown | pattern=Reference(Patient, Group)
- extraTypes | reason=Unknown
- shortUnmatched | reason=Unknown | pattern=Individual service was done for/to | resource=Beneficiary of the Task
- definitionUnmatched | reason=Unknown | pattern=The individual or set of individuals the action is being or was performed on. | resource=The entity who benefits from the performance of the service specified in the task (e.g., the patient).
- requirementsUnmatched | reason=Unknown | pattern=Links the task to the Patient context. May also affect access control. | resource=Used to track tasks outstanding for a beneficiary. Do not use to track the task owner or creator (see owner and creator respectively). This can also affect access control.
- Event.encounter → Task.encounter
- shortUnmatched | reason=Unknown | pattern=Encounter the task is part of | resource=Healthcare event during which this task originated
- definitionUnmatched | reason=Unknown | pattern=The Encounter during which this task was created or to which the creation of this record is tightly associated. | resource=The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.
- commentsUnmatched | reason=Unknown | pattern=This will typically be the encounter the task was created during, but some tasks may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission lab tests).
- requirementsUnmatched | reason=Unknown | pattern=Links the task to the Encounter context. May also affect access control. | resource=For some tasks it may be important to know the link between the encounter the task originated within.
- Event.occurrence[x] → Task.executionPeriod
- missingTypes | reason=Unknown | pattern=dateTime, Timing
- shortUnmatched | reason=Unknown | pattern=When task occurred/is occurring | resource=Start and end time of execution
- definitionUnmatched | reason=Unknown | pattern=The date, period or timing when the task did occur or is occurring. | resource=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).
- commentsUnmatched | reason=Unknown | pattern=This indicates when the activity actually occurred or is occurring, not when it was asked/requested/ordered to occur. For the latter, look at the occurence element of the Request this {{event}} is "basedOn". The status code allows differentiation of whether the timing reflects a historic event or an ongoing event. Ongoing events should not include an upper bound in the Period or Timing.bounds. .
- Event.recorded → Task.authoredOn
- summary | reason=Unknown | pattern=true
- shortUnmatched | reason=Unknown | pattern=When task was first captured in the subject's record | resource=Task Creation Date
- definitionUnmatched | reason=Unknown | pattern=The date the occurrence of the task was first captured in the record - potentially significantly after the occurrence of the event. | resource=The date and time this task was created.
- commentsUnmatched | reason=Unknown | pattern=The recorded date indicates the date when the data was placed in the record maintained by the performing practitioner, or the date of disclosure by Patient or RelatedPerson, not a date of record transfer. If the record is transferred from one system to another (in paper or electronic form), it does not create a distinct recorded date. In most cases, performing practitioners will record on the same date the event occurred, but sometimes there are delays. If information is being relayed second-hand, the recorded date indicates when the system is first made aware of the data.
The recorded date is NOT intended to be the same as a database.createdTimestamp - that would be captured as part of resource.meta or possibly Provenance.
It is possible for the same event to be disclosed to different systems at different times. E.g. a patient might tell two different clinicians about a historical event at different visits. If the disclosure is from the patient rather than record transfer from clinician A to B, the recorded date would be the date each respective clinician put the data in their record. If the data flowed from clinician A to B, the recorded date would remain the recorded date as initially set in clinician A's system.
- Event.performer.function → Task.requestedPerformer
- missingTypes | reason=Unknown | pattern=CodeableConcept
- extraTypes | reason=Unknown
- summary | reason=Unknown | pattern=true
- shortUnmatched | reason=Unknown | pattern=Type of performance | resource=Who should perform the Task
- definitionUnmatched | reason=Unknown | pattern=Distinguishes the type of involvement of the performer in the task.. | resource=The kind of participant or specific participant that should perform the task.
- requirementsUnmatched | reason=Unknown | pattern=Allows disambiguation of the types of involvement of different performers. | resource=Use to distinguish tasks on different activity queues.
- Event.performer.actor → Task.owner
- missingTypes | reason=Unknown | pattern=Reference(Device)
- extraTypes | reason=Unknown
- shortUnmatched | reason=Unknown | pattern=Who performed task | resource=Responsible individual
- definitionUnmatched | reason=Unknown | pattern=Indicates who or what performed the task. | resource=Party responsible for managing task execution.
- Event.location → Task.location
- shortUnmatched | reason=Unknown | pattern=Where task occurred | resource=Where task occurs
- definitionUnmatched | reason=Unknown | pattern=The principal physical location where the task was performed. | resource=Principal physical location where this task is performed.
- requirementsUnmatched | reason=Unknown | pattern=Ties the event to where the records are likely kept and provides context around the event occurrence (e.g. if it occurred inside or outside a dedicated healthcare setting). | resource=Provides context around the event occurrence (e.g. if it occurred inside or outside a dedicated healthcare setting).
- Event.reason → Task.reason
- summary | reason=Unknown | pattern=true
- shortUnmatched | reason=Unknown | pattern=Why was task performed? | resource=Why task is needed
- definitionUnmatched | reason=Unknown | pattern=Describes why the task occurred in coded or textual form or Indicates another resource whose existence justifies this task. | resource=A description, code, or reference indicating why this task needs to be performed.
- commentsUnmatched | reason=Unknown | pattern=Textual reasons can be captured using reasonCode.text. | resource=This will typically not be present for Tasks with a code of 'please fulfill' as, for those, the reason for action is conveyed on the Request pointed to by Task.focus. Some types of tasks will not need a 'reason'. E.g. a request to discharge a patient can be inferred to be 'because the patient is ready' and this would not need a reason to be stated on the Task.
- Event.note → Task.note
- shortUnmatched | reason=Unknown | pattern=Comments made about the event | resource=Comments made about the task
- definitionUnmatched | reason=Unknown | pattern=Comments made about the task by the performer, subject or other participants. | resource=Free-text information about the task during its lifecycle.
Unmapped Elements
- Event.reported — Unknown
- Event.relevantHistory — Unknown
- Event.category — Unknown
- Event.performer — Unknown
task-fivews-mapping-exceptions.xml
Divergent Elements
- FiveWs.what[x] → Task.doNotPerform
- FiveWs.what[x] → Task.focus
Unmapped Elements
- FiveWs.cause — Unknown
- FiveWs.version — Unknown
- FiveWs.witness — Unknown
- FiveWs.init — Unknown
- FiveWs.source — Unknown
- FiveWs.who — Unknown
- FiveWs.planned — Unknown
task-request-mapping-exceptions.xml
Divergent Elements
- Request.identifier → Task.identifier
- summary | reason=Unknown | pattern=true
- shortUnmatched | reason=Unknown | pattern=Business Identifier for task | resource=Task Instance Identifier
- definitionUnmatched | reason=Unknown | pattern=Business identifiers assigned to this task by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server. | resource=The business identifier for this task.
- commentsUnmatched | reason=Unknown | pattern=The identifier.type element is used to distinguish between the identifiers assigned by the requester/placer and the performer/filler.
Note: This is a business identifier, not a resource identifier (see discussion). It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types. For example, multiple Patient and a Person resource instance might share the same social insurance number.
- requirementsUnmatched | reason=Unknown | pattern=Allows identification of the task as it is known by various participating systems and in a way that remains consistent across servers.
- Request.basedOn → Task.basedOn
- missingTypes | reason=Unknown | pattern=Reference(Request)
- extraTypes | reason=Unknown
- shortUnmatched | reason=Unknown | pattern=Fulfills plan, proposal or order | resource=Request fulfilled by this task
- definitionUnmatched | reason=Unknown | pattern=A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this task. Authorization from the 'basedOn' request flows through to the referencing task. | resource=BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a "request" resource such as a ServiceRequest, MedicationRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfill. This latter resource is referenced by focus. For example, based on a CarePlan (= basedOn), a task is created to fulfill a ServiceRequest ( = focus ) to collect a specimen from a patient.
- commentsUnmatched | reason=Unknown | pattern=basedOn represents the 'authorization' chain for an action, not the 'reason for action'. For example, an order might be placed on hold under the authorization for a surgery. However the 'reason' for placing the hold is "to avoid interaction with anesthesia medications"
. | resource=Task.basedOn is never the same as Task.focus. Task.basedOn will typically not be present for 'please fulfill' Tasks as a distinct authorization is rarely needed to request fulfillment. If the Task is seeking fulfillment of an order, the order to be fulfilled is always communicated using
focus, never basedOn. However, authorization may be needed to perform other types of Task actions. As an example of when both would be present, a Task seeking suspension of a prescription might have a Task.basedOn pointing to the ServiceRequest ordering surgery (which is the driver for suspending the MedicationRequest - which would be the Task.focus). - requirementsUnmatched | reason=Unknown | pattern=Allows tracing of authorization for the request and tracking whether proposals/recommendations were acted upon.
- Request.groupIdentifier → Task.groupIdentifier
- shortUnmatched | reason=Unknown | pattern=Composite request this is part of | resource=Requisition or grouper id
- definitionUnmatched | reason=Unknown | pattern=A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form. | resource=A shared identifier common to multiple independent Task and Request instances that were activated/authorized more or less simultaneously by a single author. The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc. E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.
- commentsUnmatched | reason=Unknown | pattern=Requests are linked either by a "basedOn" relationship (i.e. one request is fulfilling another) or by having a common requisition. Requests that are part of the same requisition are generally treated independently from the perspective of changing their state or maintaining them after initial creation.
- requirementsUnmatched | reason=Unknown | pattern=Some business processes need to know if multiple items were ordered as part of the same "prescription" or "requisition" for billing or other purposes. | resource=Billing and/or reporting can be linked to whether multiple requests were created as a single unit.
- Request.status → Task.status
- shortUnmatched | reason=Unknown | pattern=draft | active | on-hold | revoked | completed | entered-in-error | unknown | resource=draft | requested | received | accepted | +
- definitionUnmatched | reason=Unknown | pattern=The current state of the task. | resource=The current status of the task.
- commentsUnmatched | reason=Unknown | pattern=The status is generally fully in the control of the requester - they determine whether the order is draft or active and, after it has been activated, completed, cancelled or suspended. States relating to the activities of the performer are reflected on either the corresponding]](s) or using the]] resource. A nominal state-transition diagram can be found in the] documentation Unknown does not represent "other" - one of the defined statuses must apply. Unknown is used when the authoring system is not sure what the current status is. A status of 'active' when doNotPerform is true means that the request to not perform is currently in force.
A status of completed for a "doNotPerform" request indicates that the period of non-performance is now satisfied and the request no longer holds.
- Request.statusReason → Task.statusReason
- missingTypes | reason=Unknown | pattern=CodeableConcept
- extraTypes | reason=Unknown
- summary | reason=Unknown | pattern=false
- definitionUnmatched | reason=Unknown | pattern=Captures the reason for the current state of the task. Note that any change to the state requires the removal of any existing statusReasons, and, if appropriate, populating new statusReasons. | resource=An explanation as to why this task is held, failed, was refused, etc.
- commentsUnmatched | reason=Unknown | pattern=This is generally only used for "exception" statuses such as "suspended" or "cancelled". The reason why the task was created at all is captured in reasonCode, not here. . | resource=This applies to the current status. Look at the history of the task to see reasons for past statuses.
- Request.intent → Task.intent
- shortUnmatched | reason=Unknown | pattern=proposal | plan | order (immutable) | resource=unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
- definitionUnmatched | reason=Unknown | pattern=Indicates the level of authority/intentionality associated with the task and where the request fits into the workflow chain. | resource=Indicates the "level" of actionability associated with the Task, i.e. this a proposed task, a planned task, an actionable task, etc.
- commentsUnmatched | reason=Unknown | pattern=This element is expected to be immutable. E.g. A "proposal" instance should never change to be a "plan" instance or "order" instance. Instead, a new instance 'basedOn' the prior instance should be created with the new 'intent' value.
One exception to this is that the granularity of Request.intent is allowed to change. For example, a Request identified as an "order" might later be clarified to be a "filler-order". Or, in rarer cases (to meet recipient constraints), the reverse might also occur.
When resources map to this element, they are free to define as many codes as necessary to cover their space and will map to "proposal, plan or order". Can have multiple codes that map to one of these. E.g. "original order", "encoded order", "reflex order" would all map to "order". Expectation is that the set of codes is mutually exclusive or a strict all-encompassing hierarchy. | resource=This element is immutable. Proposed tasks, planned tasks, etc. must be distinct instances.
In most cases, Tasks will have an intent of "order".
- requirementsUnmatched | reason=Unknown | pattern=Proposals/recommendations, plans and orders all use the same structure and can exist in the same fulfillment chain.
- Request.priority → Task.priority
- summary | reason=Unknown | pattern=true
- definitionUnmatched | reason=Unknown | pattern=Indicates how quickly the task should be addressed with respect to other requests. | resource=Indicates how quickly the Task should be addressed with respect to other requests.
- Request.doNotPerform → Task.doNotPerform
- shortUnmatched | reason=Unknown | pattern=true if request is prohibiting action | resource=True if Task is prohibiting action
- definitionUnmatched | reason=Unknown | pattern=If true indicates that the task is asking for the specified action to not occur. | resource=If true indicates that the Task is asking for the specified action to not occur.
- commentsUnmatched | reason=Unknown | pattern=The attributes provided with the request qualify what is not to be done. For example, if an effectiveTime is provided, the "do not" request only applies within the specified time. If a performerType is specified then the "do not" request only applies to performers of that type. Qualifiers include: code, subject, occurrence, performerType and performer.
In some cases, the Request.code may pre-coordinate prohibition into the requested action. E.g. "NPO" (nothing by mouth), "DNR" (do not recussitate). If this happens, doNotPerform SHALL NOT be set to true. I.e. The resource shall not have double negation. (E.g. "Do not DNR"). | resource=The attributes provided with the Task qualify what is not to be done. For example, if a requestedPeriod is provided, the 'do not' request only applies within the specified time. If a requestedPerformer is specified then the 'do not' request only applies to performers of that type. Qualifiers include: code, subject, occurrence, requestedPerformer and performer.
In some cases, the Request.code may pre-coordinate prohibition into the requested action. E.g. 'NPO' (nothing by mouth), 'DNR' (do not resuscitate). If this happens, doNotPerform SHALL NOT be set to true. I.e. The resource SHALL NOT have double negation. (E.g. 'Do not DNR').
When Task.focus refers to a Request Resource, it is that Request's doNotPerform Flag that indicates that the action should not be performed. A Task can be used to request that authorized action is not performed by having task.focus point to that request resource and use Task.code as the do not perform indicator.
Note that the use of doNotPerform and negation in Task.code can cause ambiguity and the impact of this should be considered not only for task but also for all related resources.
- requirementsUnmatched | reason=Unknown | pattern=Supports things like Do Not Recussitate, Nothing by mouth, etc.
- Request.code → Task.code
- bindingStrength | reason=Unknown | pattern=example
- shortUnmatched | reason=Unknown | pattern=Service requested/ordered | resource=Task Type
- definitionUnmatched | reason=Unknown | pattern=A code that identifies the specific service or action being asked to be done (or not done). | resource=A name or code (or both) briefly describing what the task involves.
- Request.product → Task.focus
- missingTypes | reason=Unknown | pattern=CodeableReference(BiologicallyDerivedProduct, Device, DeviceDefinition, Medication, NutritionProduct, Substance)
- extraTypes | reason=Unknown
- shortUnmatched | reason=Unknown | pattern=Product requested/ordered | resource=What task is acting on
- definitionUnmatched | reason=Unknown | pattern=Indicates the product whose supply or manipulation is authorized by this task. | resource=The request being fulfilled or the resource being manipulated (changed, suspended, etc.) by this task.
- Request.subject → Task.for
- missingTypes | reason=Unknown | pattern=Reference(Patient, Group)
- extraTypes | reason=Unknown
- shortUnmatched | reason=Unknown | pattern=Individual the service is ordered/prohibited for | resource=Beneficiary of the Task
- definitionUnmatched | reason=Unknown | pattern=The individual or set of individuals the action is to be performed/not performed on or for. | resource=The entity who benefits from the performance of the service specified in the task (e.g., the patient).
- requirementsUnmatched | reason=Unknown | pattern=Links the request to the Patient context. | resource=Used to track tasks outstanding for a beneficiary. Do not use to track the task owner or creator (see owner and creator respectively). This can also affect access control.
- Request.encounter → Task.encounter
- shortUnmatched | reason=Unknown | pattern=Encounter the task is tied to | resource=Healthcare event during which this task originated
- definitionUnmatched | reason=Unknown | pattern=The Encounter during which this task was created or to which the creation of this record is tightly associated. | resource=The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.
- commentsUnmatched | reason=Unknown | pattern=This will typically be the encounter during which the task was created. However, some {{title}s may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission activities).
- requirementsUnmatched | reason=Unknown | pattern=Links the task to the Encounter context. | resource=For some tasks it may be important to know the link between the encounter the task originated within.
- Request.occurrence[x] → Task.requestedPeriod
- missingTypes | reason=Unknown | pattern=dateTime, Timing
- shortUnmatched | reason=Unknown | pattern=When service should (not) occur | resource=When the task should be performed
- definitionUnmatched | reason=Unknown | pattern=The date or time(s) at which the activity or service is desired to occur or not occur. | resource=Indicates the start and/or end of the period of time when completion of the task is desired to take place.
- Request.authoredOn → Task.authoredOn
- summary | reason=Unknown | pattern=true
- shortUnmatched | reason=Unknown | pattern=When request was created/transitioned to active | resource=Task Creation Date
- definitionUnmatched | reason=Unknown | pattern=For draft tasks, indicates the date of initial creation. For requests with other statuses, indicates the date of activation. | resource=The date and time this task was created.
- Request.requester → Task.requester
- extraTypes | reason=Unknown
- shortUnmatched | reason=Unknown | pattern=Who/what is requesting service | resource=Who is asking for task to be done
- definitionUnmatched | reason=Unknown | pattern=Who initiated the {{request}} and has responsibility for its activation. | resource=The creator of the task.
- Request.performerType → Task.requestedPerformer
- missingTypes | reason=Unknown | pattern=CodeableConcept
- extraTypes | reason=Unknown
- summary | reason=Unknown | pattern=true
- shortUnmatched | reason=Unknown | pattern=Desired kind of service performer | resource=Who should perform the Task
- definitionUnmatched | reason=Unknown | pattern=The type of individual that is desired to act upon/ not act upon the {{request}}. | resource=The kind of participant or specific participant that should perform the task.
- commentsUnmatched | reason=Unknown | pattern=If specified without indicating a performer, this indicates that the performer must be (or can't be) of the specified type. If specified with a performer then it indicates the requirements of the performer if the designated performer is not available. If doNotPerform is true, then only one of performerType and performer should be present. | resource=Group is only allowed in the circumstance where the group represents a family or a household, and should not represent groups of Practitioners where other more specific resources can be used instead.
- Request.performer → Task.owner
- missingTypes | reason=Unknown | pattern=Reference(HealthcareService, Device)
- extraTypes | reason=Unknown
- shortUnmatched | reason=Unknown | pattern=Specific desired (non)performer | resource=Responsible individual
- definitionUnmatched | reason=Unknown | pattern=Indicates who or what is being asked to perform (or not perform) the {{request}}. | resource=Party responsible for managing task execution.
- Request.reason → Task.reason
- summary | reason=Unknown | pattern=true
- shortUnmatched | reason=Unknown | pattern=Why is service (not) needed? | resource=Why task is needed
- definitionUnmatched | reason=Unknown | pattern=Describes why the request is being made in coded or textual form, or Indicates another resource whose existence justifies this request. | resource=A description, code, or reference indicating why this task needs to be performed.
- commentsUnmatched | reason=Unknown | pattern=Textual reasons can be captured using reasonCode.text. If doNoPerform is true, this will be the reason why the request is being made to not act. | resource=This will typically not be present for Tasks with a code of 'please fulfill' as, for those, the reason for action is conveyed on the Request pointed to by Task.focus. Some types of tasks will not need a 'reason'. E.g. a request to discharge a patient can be inferred to be 'because the patient is ready' and this would not need a reason to be stated on the Task.
- Request.insurance → Task.insurance
- definitionUnmatched | reason=Unknown | pattern=Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant in delivering the requested service. | resource=Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.
- Request.supportingInfo → Task.input.value[x]
- missingTypes | reason=Unknown | pattern=Reference(Any)
- extraTypes | reason=Unknown
- shortUnmatched | reason=Unknown | pattern=Extra information to use in performing request | resource=Content to use in performing the task
- definitionUnmatched | reason=Unknown | pattern=Information that may be needed by/relevant to the performer in their execution of this task. | resource=The value of the input parameter as a basic type.
- commentsUnmatched | reason=Unknown | pattern=See guidance on notes vs. supportingInfo.
- Request.note → Task.note
- shortUnmatched | reason=Unknown | pattern=Comments made about task | resource=Comments made about the task
- definitionUnmatched | reason=Unknown | pattern=Comments made about the task by the requester, performer, subject or other participants. | resource=Free-text information about the task during its lifecycle.
- commentsUnmatched | reason=Unknown | pattern=See guidance on notes vs. supportingInfo.
- Request.relevantHistory → Task.relevantHistory
- missingTypes | reason=Unknown | pattern=Reference(ProvenanceRelevantHistory)
- extraTypes | reason=Unknown
- shortUnmatched | reason=Unknown | pattern=Key events in history of task | resource=Key events in history of the Task
- definitionUnmatched | reason=Unknown | pattern=Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource. | resource=Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.
- commentsUnmatched | reason=Unknown | pattern=This element does not point to the Provenance associated with the current version of the resource - as it would be created after this version existed. The Provenance for the current version can be retrieved with a _revinclude. Referenced provenances SHOULD adhere to the provenance-relevant-history profile.
See additional guidance here. | resource=This element does not point to the Provenance associated with the current version of the resource - as it would be created after this version existed. The Provenance for the current version can be retrieved with a _revinclude.
Unmapped Elements
- Request.deliverTo — Unknown
- Request.category — Unknown
- Request.reported — Unknown