QI-Core Implementation Guide
8.0.0-ballot - STU 8 - ballot

QI-Core Implementation Guide, published by HL7 International / Clinical Quality Information. This guide is not an authorized publication; it is the continuous build for version 8.0.0-ballot built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-qi-core/ and changes regularly. See the Directory of published versions

## Resource Profile: QICore Task Done

Official URL: http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-taskdone | Version: 8.0.0-ballot
Standards status: Trial-use Active as of 2018-08-22 | Maturity Level: 4 | Computable Name: QICoreTaskDone

Positive profile of Task for decision support/quality metrics. Indicates a task that with a positive status

"Must Have", "QI Elements" and "primary code path" are defined in the QI-Core Must Support section.
QI Elements:

- basedOn: (QI) Request fulfilled by this task
- executionPeriod: (QI) Start and end time of execution
- focus: (QI) What task is acting on
- intent: (QI) unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance
- code: (QI) Task Type
- status: (QI) draft​ | requested​ | received​ | accepted​ | ready | in-progress​ | on-hold​ | completed
- encounter: (QI) Healthcare event during which this task originated
- for: (QI) Beneficiary of the Task
- priority: (QI) routine | urgent | asap | stat

Primary code path: code
(PCPath) This element is the primary code path for this resource CQL Retrieve
Usage

The Task profile defines the conformance expectations for a Task, regardless of whether it is a positive or negative statement. The TaskDone and TaskRejected profiles represent the positive and negative statements for a task.

See the patterns page for implementation and usage patterns.

### Examples

Task Example

Usages:

- Examples for this Profile: Task/done-example

You can also check for usages in the FHIR IG Statistics

### Formal Views of Profile Content

Description Differentials, Snapshots, and other representations.

- Key Elements Table
- Differential Table
- Snapshot Table
- Statistics/References
- All

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Task | C | 0..* | QICoreTask | A task to be performed Constraints: inv-1, tsk-1
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
status | ?!Σ | 1..1 | code | (QI) draft​ | requested​ | received​ | accepted​ | ready | in-progress​ | on-hold​ | completed Binding: Positive Task Status (required)
intent | Σ | 1..1 | code | (QI) unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance Binding: TaskIntent (required): Distinguishes whether the task is a proposal, plan or full order.
priority |  | 1..1 | code | (QI) routine | urgent | asap | stat Binding: RequestPriority (required): The task's priority.
code | Σ C | 1..1 | CodeableConcept | (QI) Task Type Binding: TaskCode (preferred): Codes to identify what the task involves. These will typically be specific to a particular workflow
Slices for extension |  |  |  | Content/Rules for all slices
extension:codeOptions | C | 0..1 | canonical(ValueSet) | (QI) Url of a value set of candidate tasks URL: http://hl7.org/fhir/StructureDefinition/codeOptions
executionPeriod | Σ | 1..1 | Period | (QI) Start and end time of execution
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Task.status | Base | required | Positive Task Status | 📦8.0.0-ballot | This IG
Task.intent | Base | required | TaskIntent | 📍4.0.1 | FHIR Std.
Task.priority | Base | required | Request priority | 📍4.0.1 | FHIR Std.
Task.code | Base | preferred | Task Codes | 📦4.0.1 | FHIR Std.

#### Constraints

Id | Grade | Path(s) | Description | Expression
dom-2 | error | Task | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | Task | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | Task | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | Task | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | Task | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
inv-1 | error | Task | Last modified date must be greater than or equal to authored-on date. | `lastModified.exists().not() or authoredOn.exists().not() or lastModified >= authoredOn`
tsk-1 | error | Task | to indicate what, either at least one coding in the code or a codeOptions extension shall be provided | `code.extension('http://hl7.org/fhir/StructureDefinition/codeOptions').exists() xor code.coding.exists()`

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Task |  | 0..* | QICoreTask | A task to be performed
status |  | 1..1 | code | (QI) draft​ | requested​ | received​ | accepted​ | ready | in-progress​ | on-hold​ | completed Binding: Positive Task Status (required)
Documentation for this format

#### Terminology Bindings (Differential)

Path | Status | Usage | ValueSet | Version | Source
Task.status | Base | required | Positive Task Status | 📦8.0.0-ballot | This IG

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Task | C | 0..* | QICoreTask | A task to be performed Constraints: inv-1, tsk-1
id | Σ | 0..1 | id | Logical id of this artifact
meta | Σ | 0..1 | Meta | Metadata about the resource
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
language |  | 0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): A human language.
Additional Bindings | Purpose
AllLanguages | Max Binding
text |  | 0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements
contained |  | 0..* | Resource | Contained, inline Resources
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
identifier |  | 0..* | Identifier | Task Instance Identifier
instantiatesCanonical | Σ | 0..1 | canonical(ActivityDefinition) | Formal definition of task
instantiatesUri | Σ | 0..1 | uri | Formal definition of task
basedOn | Σ | 0..* | Reference(Resource) | (QI) Request fulfilled by this task
groupIdentifier | Σ | 0..1 | Identifier | Requisition or grouper id
partOf | Σ | 0..* | Reference(Task) | Composite task
status | ?!Σ | 1..1 | code | (QI) draft​ | requested​ | received​ | accepted​ | ready | in-progress​ | on-hold​ | completed Binding: Positive Task Status (required)
statusReason | Σ | 0..1 | CodeableConcept | Reason for current status Binding Description: (example): Codes to identify the reason for current status. These will typically be specific to a particular workflow.
businessStatus | Σ | 0..1 | CodeableConcept | E.g. "Specimen collected", "IV prepped" Binding Description: (example): The domain-specific business-contextual sub-state of the task. For example: "Blood drawn", "IV inserted", "Awaiting physician signature", etc.
intent | Σ | 1..1 | code | (QI) unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance Binding: TaskIntent (required): Distinguishes whether the task is a proposal, plan or full order.
priority |  | 1..1 | code | (QI) routine | urgent | asap | stat Binding: RequestPriority (required): The task's priority.
code | Σ C | 1..1 | CodeableConcept | (QI) Task Type Binding: TaskCode (preferred): Codes to identify what the task involves. These will typically be specific to a particular workflow
id |  | 0..1 | string | Unique id for inter-element referencing
Slices for extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
extension:codeOptions | C | 0..1 | canonical(ValueSet) | (QI) Url of a value set of candidate tasks URL: http://hl7.org/fhir/StructureDefinition/codeOptions
coding | Σ | 0..* | Coding | Code defined by a terminology system
text | Σ | 0..1 | string | Plain text representation of the concept
description | Σ | 0..1 | string | Human-readable explanation of task
focus | Σ | 0..1 | Reference(Resource) | (QI) What task is acting on
for | Σ | 0..1 | Reference(QICore Patient) | (QI) Beneficiary of the Task
encounter | Σ | 0..1 | Reference(QICore Encounter) | (QI) Healthcare event during which this task originated
executionPeriod | Σ | 1..1 | Period | (QI) Start and end time of execution
authoredOn | C | 0..1 | dateTime | Task Creation Date
lastModified | Σ C | 0..1 | dateTime | Task Last Modified Date
requester | Σ | 0..1 | Reference(Device | Organization | Patient | Practitioner | PractitionerRole | RelatedPerson) | Who is asking for task to be done
performerType |  | 0..* | CodeableConcept | Requested performer Binding: ProcedurePerformerRoleCodes (preferred): The type(s) of task performers allowed.
owner | Σ | 0..1 | Reference(Practitioner | PractitionerRole | Organization | CareTeam | HealthcareService | Patient | Device | RelatedPerson) | Responsible individual
location | Σ | 0..1 | Reference(Location) | Where task occurs
reasonCode |  | 0..1 | CodeableConcept | Why task is needed Binding Description: (example): Indicates why the task is needed. E.g. Suspended because patient admitted to hospital.
reasonReference |  | 0..1 | Reference(Resource) | Why task is needed
insurance |  | 0..* | Reference(Coverage | ClaimResponse) | Associated insurance coverage
note |  | 0..* | Annotation | Comments made about the task
relevantHistory |  | 0..* | Reference(Provenance) | Key events in history of the Task
restriction |  | 0..1 | BackboneElement | Constraints on fulfillment tasks
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
repetitions |  | 0..1 | positiveInt | How many times to repeat
period |  | 0..1 | Period | When fulfillment sought
recipient |  | 0..* | Reference(Patient | Practitioner | PractitionerRole | RelatedPerson | Group | Organization) | For whom is fulfillment sought?
input |  | 0..* | BackboneElement | Information used to perform task
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
type |  | 1..1 | CodeableConcept | Label for the input Binding Description: (example): 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.
value[x] |  | 1..1 |  | Content to use in performing the task
valueBase64Binary |  |  | base64Binary |
valueBoolean |  |  | boolean |
valueCanonical |  |  | canonical(Any) |
valueCode |  |  | code |
valueDate |  |  | date |
valueDateTime |  |  | dateTime |
valueDecimal |  |  | decimal |
valueId |  |  | id |
valueInstant |  |  | instant |
valueInteger |  |  | integer |
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(Any) |
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 |  | 0..* | BackboneElement | Information produced as part of task
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
type |  | 1..1 | CodeableConcept | Label for output Binding Description: (example): 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.
value[x] |  | 1..1 |  | Result of output
valueBase64Binary |  |  | base64Binary |
valueBoolean |  |  | boolean |
valueCanonical |  |  | canonical(Any) |
valueCode |  |  | code |
valueDate |  |  | date |
valueDateTime |  |  | dateTime |
valueDecimal |  |  | decimal |
valueId |  |  | id |
valueInstant |  |  | instant |
valueInteger |  |  | integer |
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(Any) |
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 |
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Task.language | Base | preferred | Common Languages | 📍4.0.1 | FHIR Std.
Task.status | Base | required | Positive Task Status | 📦8.0.0-ballot | This IG
Task.statusReason | Base | example |  | Not State | Unknown
Task.businessStatus | Base | example |  | Not State | Unknown
Task.intent | Base | required | TaskIntent | 📍4.0.1 | FHIR Std.
Task.priority | Base | required | Request priority | 📍4.0.1 | FHIR Std.
Task.code | Base | preferred | Task Codes | 📦4.0.1 | FHIR Std.
Task.performerType | Base | preferred | Procedure Performer Role Codes | 📍4.0.1 | FHIR Std.
Task.reasonCode | Base | example |  | Not State | Unknown
Task.input.type | Base | example |  | Not State | Unknown
Task.output.type | Base | example |  | Not State | Unknown

#### Constraints

Id | Grade | Path(s) | Description | Expression
dom-2 | error | Task | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | Task | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | Task | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | Task | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | Task | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
inv-1 | error | Task | Last modified date must be greater than or equal to authored-on date. | `lastModified.exists().not() or authoredOn.exists().not() or lastModified >= authoredOn`
tsk-1 | error | Task | to indicate what, either at least one coding in the code or a codeOptions extension shall be provided | `code.extension('http://hl7.org/fhir/StructureDefinition/codeOptions').exists() xor code.coding.exists()`

Summary

Mandatory: 1 element

Maturity: 4

Key Elements View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Task | C | 0..* | QICoreTask | A task to be performed Constraints: inv-1, tsk-1
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
status | ?!Σ | 1..1 | code | (QI) draft​ | requested​ | received​ | accepted​ | ready | in-progress​ | on-hold​ | completed Binding: Positive Task Status (required)
intent | Σ | 1..1 | code | (QI) unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance Binding: TaskIntent (required): Distinguishes whether the task is a proposal, plan or full order.
priority |  | 1..1 | code | (QI) routine | urgent | asap | stat Binding: RequestPriority (required): The task's priority.
code | Σ C | 1..1 | CodeableConcept | (QI) Task Type Binding: TaskCode (preferred): Codes to identify what the task involves. These will typically be specific to a particular workflow
Slices for extension |  |  |  | Content/Rules for all slices
extension:codeOptions | C | 0..1 | canonical(ValueSet) | (QI) Url of a value set of candidate tasks URL: http://hl7.org/fhir/StructureDefinition/codeOptions
executionPeriod | Σ | 1..1 | Period | (QI) Start and end time of execution
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Task.status | Base | required | Positive Task Status | 📦8.0.0-ballot | This IG
Task.intent | Base | required | TaskIntent | 📍4.0.1 | FHIR Std.
Task.priority | Base | required | Request priority | 📍4.0.1 | FHIR Std.
Task.code | Base | preferred | Task Codes | 📦4.0.1 | FHIR Std.

#### Constraints

Id | Grade | Path(s) | Description | Expression
dom-2 | error | Task | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | Task | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | Task | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | Task | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | Task | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
inv-1 | error | Task | Last modified date must be greater than or equal to authored-on date. | `lastModified.exists().not() or authoredOn.exists().not() or lastModified >= authoredOn`
tsk-1 | error | Task | to indicate what, either at least one coding in the code or a codeOptions extension shall be provided | `code.extension('http://hl7.org/fhir/StructureDefinition/codeOptions').exists() xor code.coding.exists()`

Differential View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Task |  | 0..* | QICoreTask | A task to be performed
status |  | 1..1 | code | (QI) draft​ | requested​ | received​ | accepted​ | ready | in-progress​ | on-hold​ | completed Binding: Positive Task Status (required)
Documentation for this format

#### Terminology Bindings (Differential)

Path | Status | Usage | ValueSet | Version | Source
Task.status | Base | required | Positive Task Status | 📦8.0.0-ballot | This IG

Snapshot ViewView

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Task | C | 0..* | QICoreTask | A task to be performed Constraints: inv-1, tsk-1
id | Σ | 0..1 | id | Logical id of this artifact
meta | Σ | 0..1 | Meta | Metadata about the resource
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
language |  | 0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): A human language.
Additional Bindings | Purpose
AllLanguages | Max Binding
text |  | 0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements
contained |  | 0..* | Resource | Contained, inline Resources
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
identifier |  | 0..* | Identifier | Task Instance Identifier
instantiatesCanonical | Σ | 0..1 | canonical(ActivityDefinition) | Formal definition of task
instantiatesUri | Σ | 0..1 | uri | Formal definition of task
basedOn | Σ | 0..* | Reference(Resource) | (QI) Request fulfilled by this task
groupIdentifier | Σ | 0..1 | Identifier | Requisition or grouper id
partOf | Σ | 0..* | Reference(Task) | Composite task
status | ?!Σ | 1..1 | code | (QI) draft​ | requested​ | received​ | accepted​ | ready | in-progress​ | on-hold​ | completed Binding: Positive Task Status (required)
statusReason | Σ | 0..1 | CodeableConcept | Reason for current status Binding Description: (example): Codes to identify the reason for current status. These will typically be specific to a particular workflow.
businessStatus | Σ | 0..1 | CodeableConcept | E.g. "Specimen collected", "IV prepped" Binding Description: (example): The domain-specific business-contextual sub-state of the task. For example: "Blood drawn", "IV inserted", "Awaiting physician signature", etc.
intent | Σ | 1..1 | code | (QI) unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance Binding: TaskIntent (required): Distinguishes whether the task is a proposal, plan or full order.
priority |  | 1..1 | code | (QI) routine | urgent | asap | stat Binding: RequestPriority (required): The task's priority.
code | Σ C | 1..1 | CodeableConcept | (QI) Task Type Binding: TaskCode (preferred): Codes to identify what the task involves. These will typically be specific to a particular workflow
id |  | 0..1 | string | Unique id for inter-element referencing
Slices for extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
extension:codeOptions | C | 0..1 | canonical(ValueSet) | (QI) Url of a value set of candidate tasks URL: http://hl7.org/fhir/StructureDefinition/codeOptions
coding | Σ | 0..* | Coding | Code defined by a terminology system
text | Σ | 0..1 | string | Plain text representation of the concept
description | Σ | 0..1 | string | Human-readable explanation of task
focus | Σ | 0..1 | Reference(Resource) | (QI) What task is acting on
for | Σ | 0..1 | Reference(QICore Patient) | (QI) Beneficiary of the Task
encounter | Σ | 0..1 | Reference(QICore Encounter) | (QI) Healthcare event during which this task originated
executionPeriod | Σ | 1..1 | Period | (QI) Start and end time of execution
authoredOn | C | 0..1 | dateTime | Task Creation Date
lastModified | Σ C | 0..1 | dateTime | Task Last Modified Date
requester | Σ | 0..1 | Reference(Device | Organization | Patient | Practitioner | PractitionerRole | RelatedPerson) | Who is asking for task to be done
performerType |  | 0..* | CodeableConcept | Requested performer Binding: ProcedurePerformerRoleCodes (preferred): The type(s) of task performers allowed.
owner | Σ | 0..1 | Reference(Practitioner | PractitionerRole | Organization | CareTeam | HealthcareService | Patient | Device | RelatedPerson) | Responsible individual
location | Σ | 0..1 | Reference(Location) | Where task occurs
reasonCode |  | 0..1 | CodeableConcept | Why task is needed Binding Description: (example): Indicates why the task is needed. E.g. Suspended because patient admitted to hospital.
reasonReference |  | 0..1 | Reference(Resource) | Why task is needed
insurance |  | 0..* | Reference(Coverage | ClaimResponse) | Associated insurance coverage
note |  | 0..* | Annotation | Comments made about the task
relevantHistory |  | 0..* | Reference(Provenance) | Key events in history of the Task
restriction |  | 0..1 | BackboneElement | Constraints on fulfillment tasks
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
repetitions |  | 0..1 | positiveInt | How many times to repeat
period |  | 0..1 | Period | When fulfillment sought
recipient |  | 0..* | Reference(Patient | Practitioner | PractitionerRole | RelatedPerson | Group | Organization) | For whom is fulfillment sought?
input |  | 0..* | BackboneElement | Information used to perform task
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
type |  | 1..1 | CodeableConcept | Label for the input Binding Description: (example): 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.
value[x] |  | 1..1 |  | Content to use in performing the task
valueBase64Binary |  |  | base64Binary |
valueBoolean |  |  | boolean |
valueCanonical |  |  | canonical(Any) |
valueCode |  |  | code |
valueDate |  |  | date |
valueDateTime |  |  | dateTime |
valueDecimal |  |  | decimal |
valueId |  |  | id |
valueInstant |  |  | instant |
valueInteger |  |  | integer |
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(Any) |
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 |  | 0..* | BackboneElement | Information produced as part of task
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
type |  | 1..1 | CodeableConcept | Label for output Binding Description: (example): 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.
value[x] |  | 1..1 |  | Result of output
valueBase64Binary |  |  | base64Binary |
valueBoolean |  |  | boolean |
valueCanonical |  |  | canonical(Any) |
valueCode |  |  | code |
valueDate |  |  | date |
valueDateTime |  |  | dateTime |
valueDecimal |  |  | decimal |
valueId |  |  | id |
valueInstant |  |  | instant |
valueInteger |  |  | integer |
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(Any) |
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 |
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Task.language | Base | preferred | Common Languages | 📍4.0.1 | FHIR Std.
Task.status | Base | required | Positive Task Status | 📦8.0.0-ballot | This IG
Task.statusReason | Base | example |  | Not State | Unknown
Task.businessStatus | Base | example |  | Not State | Unknown
Task.intent | Base | required | TaskIntent | 📍4.0.1 | FHIR Std.
Task.priority | Base | required | Request priority | 📍4.0.1 | FHIR Std.
Task.code | Base | preferred | Task Codes | 📦4.0.1 | FHIR Std.
Task.performerType | Base | preferred | Procedure Performer Role Codes | 📍4.0.1 | FHIR Std.
Task.reasonCode | Base | example |  | Not State | Unknown
Task.input.type | Base | example |  | Not State | Unknown
Task.output.type | Base | example |  | Not State | Unknown

#### Constraints

Id | Grade | Path(s) | Description | Expression
dom-2 | error | Task | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | Task | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | Task | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | Task | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | Task | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
inv-1 | error | Task | Last modified date must be greater than or equal to authored-on date. | `lastModified.exists().not() or authoredOn.exists().not() or lastModified >= authoredOn`
tsk-1 | error | Task | to indicate what, either at least one coding in the code or a codeOptions extension shall be provided | `code.extension('http://hl7.org/fhir/StructureDefinition/codeOptions').exists() xor code.coding.exists()`

Summary

Mandatory: 1 element

Maturity: 4

Other representations of profile: CSV, Excel, Schematron