Data Model Libraries
    Preparing search index...

    Task Class

    A task to be performed.

    FHIR Specification

    • Short: A task to be performed
    • Definition: A task to be performed.
    • FHIR Version: 5.0.0

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Methods

    parse getIdentifier setIdentifier addIdentifier hasIdentifier getInstantiatesCanonicalElement setInstantiatesCanonicalElement hasInstantiatesCanonicalElement getInstantiatesCanonical setInstantiatesCanonical hasInstantiatesCanonical getInstantiatesUriElement setInstantiatesUriElement hasInstantiatesUriElement getInstantiatesUri setInstantiatesUri hasInstantiatesUri getBasedOn setBasedOn addBasedOn hasBasedOn getGroupIdentifier setGroupIdentifier hasGroupIdentifier getPartOf setPartOf addPartOf hasPartOf getStatusEnumType setStatusEnumType hasStatusEnumType getStatusElement setStatusElement hasStatusElement getStatus setStatus hasStatus getStatusReason setStatusReason hasStatusReason getBusinessStatus setBusinessStatus hasBusinessStatus getIntentElement setIntentElement hasIntentElement getIntent setIntent hasIntent getPriorityEnumType setPriorityEnumType hasPriorityEnumType getPriorityElement setPriorityElement hasPriorityElement getPriority setPriority hasPriority getDoNotPerformElement setDoNotPerformElement hasDoNotPerformElement getDoNotPerform setDoNotPerform hasDoNotPerform getCode setCode hasCode getDescriptionElement setDescriptionElement hasDescriptionElement getDescription setDescription hasDescription getFocus setFocus hasFocus getFor setFor hasFor getEncounter setEncounter hasEncounter getRequestedPeriod setRequestedPeriod hasRequestedPeriod getExecutionPeriod setExecutionPeriod hasExecutionPeriod getAuthoredOnElement setAuthoredOnElement hasAuthoredOnElement getAuthoredOn setAuthoredOn hasAuthoredOn getLastModifiedElement setLastModifiedElement hasLastModifiedElement getLastModified setLastModified hasLastModified getRequester setRequester hasRequester getRequestedPerformer setRequestedPerformer addRequestedPerformer hasRequestedPerformer getOwner setOwner hasOwner getPerformer setPerformer addPerformer hasPerformer getLocation setLocation hasLocation getReason setReason addReason hasReason getInsurance setInsurance addInsurance hasInsurance getNote setNote addNote hasNote getRelevantHistory setRelevantHistory addRelevantHistory hasRelevantHistory getRestriction setRestriction hasRestriction getInput setInput addInput hasInput getOutput setOutput addOutput hasOutput fhirType isEmpty isRequiredFieldsEmpty copy toJSON getText setText hasText getContained setContained addContained hasContained getExtension setExtension hasExtension getExtensionByUrl addExtension removeExtension getModifierExtension setModifierExtension hasModifierExtension getModifierExtensionByUrl addModifierExtension removeModifierExtension resourceType getIdElement setIdElement hasIdElement getId setId hasId getMeta setMeta hasMeta getImplicitRulesElement setImplicitRulesElement hasImplicitRulesElement getImplicitRules setImplicitRules hasImplicitRules getLanguageElement setLanguageElement hasLanguageElement getLanguage setLanguage hasLanguage isResource isDataType isComplexDataType isPrimitive isBooleanPrimitive isStringPrimitive isNumberPrimitive isBigIntPrimitive isDateTimePrimitive copyValues initIdentifier initBasedOn initPartOf initRequestedPerformer initPerformer initReason initInsurance initNote initRelevantHistory initInput initOutput

    Constructors

    Properties

    identifier?: Identifier[]

    Task.identifier Element

    FHIR Specification

    • Short: Task Instance Identifier
    • Definition: The business identifier for this task.
    • FHIR Type: Identifier
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: false
    instantiatesCanonical?: CanonicalType

    Task.instantiatesCanonical Element

    FHIR Specification

    • Short: Formal definition of task
    • Definition: The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.
    • Requirements: Enables a formal definition of how the task is to be performed, enabling automation.
    • FHIR Type: canonical
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    instantiatesUri?: UriType

    Task.instantiatesUri Element

    FHIR Specification

    • Short: Formal definition of task
    • Definition: The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.
    • Requirements: Enables a formal definition of how the task is to be performed (e.g. using BPMN, BPEL, XPDL or other formal notation to be associated with a task), enabling automation.
    • FHIR Type: uri
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    basedOn?: Reference[]

    Task.basedOn Element

    FHIR Specification

    • Short: Request fulfilled by this task
    • Definition: 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.
    • Comment: 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).
    • FHIR Type: Reference
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: true
    groupIdentifier?: Identifier

    Task.groupIdentifier Element

    FHIR Specification

    • Short: Requisition or grouper id
    • Definition: 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.
    • Requirements: Billing and/or reporting can be linked to whether multiple requests were created as a single unit.
    • FHIR Type: Identifier
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    partOf?: Reference[]

    Task.partOf Element

    FHIR Specification

    • Short: Composite task
    • Definition: Task that this particular task is part of.
    • Comment: This should usually be 0..1.
    • Requirements: Allows tasks to be broken down into sub-steps (and this division can occur independent of the original task).
    • FHIR Type: Reference
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: true
    taskStatusEnum: TaskStatusEnum

    FHIR CodeSystem: TaskStatus

    status: null | EnumCodeType

    Task.status Element

    FHIR Specification

    • Short: draft | requested | received | accepted | +
    • Definition: The current status of the task.
    • Requirements: These states enable coordination of task status with off-the-shelf workflow solutions that support automation of tasks.
    • FHIR Type: code
    • Cardinality: 1..1
    • isModifier: true
    • isModifierReason: This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
    • isSummary: true

    CodeSystem Enumeration: TaskStatusEnum

    statusReason?: CodeableReference

    Task.statusReason Element

    FHIR Specification

    • Short: Reason for current status
    • Definition: An explanation as to why this task is held, failed, was refused, etc.
    • Comment: This applies to the current status. Look at the history of the task to see reasons for past statuses.
    • FHIR Type: CodeableReference
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    businessStatus?: CodeableConcept

    Task.businessStatus Element

    FHIR Specification

    • Short: E.g. "Specimen collected", "IV prepped"
    • Definition: Contains business-specific nuances of the business state.
    • Requirements: There's often a need to track substates of a task - this is often variable by specific workflow implementation.
    • FHIR Type: CodeableConcept
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    intent: null | CodeType

    Task.intent Element

    FHIR Specification

    • Short: unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
    • Definition: 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, etc.
    • Comment: This element is immutable. Proposed tasks, planned tasks, etc. must be distinct instances. In most cases, Tasks will have an intent of "order".
    • FHIR Type: code
    • Cardinality: 1..1
    • isModifier: false
    • isSummary: true
    requestPriorityEnum: RequestPriorityEnum

    FHIR CodeSystem: RequestPriority

    priority?: EnumCodeType

    Task.priority Element

    FHIR Specification

    • Short: routine | urgent | asap | stat
    • Definition: Indicates how quickly the Task should be addressed with respect to other requests.
    • Requirements: Used to identify the service level expected while performing a task.
    • FHIR Type: code
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false

    CodeSystem Enumeration: RequestPriorityEnum

    doNotPerform?: BooleanType

    Task.doNotPerform Element

    FHIR Specification

    • Short: True if Task is prohibiting action
    • Definition: If true indicates that the Task is asking for the specified action to not occur.
    • Comment: 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 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'). doNotPerform should ONLY be used with Tasks that are tightly bounded in time or process phase. E.g. 'Do not fulfill the midnight dose of medication X tonight due to the early morning scheduled procedure, where the nurse could reasonably check off 'Med X not given at midnight as instructed'. Similarly, a decision support proposal that a patient should not be given a standard intake questionnaire (because the patient is cognitively impaired) would be marked as 'complete' or 'rejected' when the clinician preps the CarePlan or order set after reviewing the decision support results. If there is a need to create a standing order to not do something that can't be satisfied by a single 'non-action', but rather an ongoing refusal to perform the function, MedicationRequest, ServiceRequest or some other form of authorization should be used.
    • FHIR Type: boolean
    • Cardinality: 0..1
    • isModifier: true
    • isModifierReason: If true, this element negates the Task. For example, instead of a request to perform a task, it is a request not to perform a task.
    • isSummary: true

    Task.code Element

    FHIR Specification

    • Short: Task Type
    • Definition: A name or code (or both) briefly describing what the task involves.
    • Comment: The title (eg "My Tasks", "Outstanding Tasks for Patient X") should go into the code.
    • FHIR Type: CodeableConcept
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    description?: StringType

    Task.description Element

    FHIR Specification

    • Short: Human-readable explanation of task
    • Definition: A free-text description of what is to be performed.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    focus?: Reference

    Task.focus Element

    FHIR Specification

    • Short: What task is acting on
    • Definition: The request being fulfilled or the resource being manipulated (changed, suspended, etc.) by this task.
    • Comment: If multiple resources need to be manipulated, use sub-tasks. (This ensures that status can be tracked independently for each referenced resource.).
    • Requirements: Used to identify the thing to be done.
    • FHIR Type: Reference
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    for_?: Reference

    Task.for Element

    FHIR Specification

    • Short: Beneficiary of the Task
    • Definition: The entity who benefits from the performance of the service specified in the task (e.g., the patient).
    • Requirements: 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.
    • FHIR Type: Reference
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    encounter?: Reference

    Task.encounter Element

    FHIR Specification

    • Short: Healthcare event during which this task originated
    • Definition: The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.
    • Requirements: For some tasks it may be important to know the link between the encounter the task originated within.
    • FHIR Type: Reference
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    requestedPeriod?: Period

    Task.requestedPeriod Element

    FHIR Specification

    • Short: When the task should be performed
    • Definition: Indicates the start and/or end of the period of time when completion of the task is desired to take place.
    • Comment: This is typically used when the Task is not seeking fulfillment of a focus Request, as in that case the period would be specified on the Request and/or in the Task.restriction.period. Instead, it is used for stand-alone tasks.
    • FHIR Type: Period
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    executionPeriod?: Period

    Task.executionPeriod Element

    FHIR Specification

    • Short: Start and end time of execution
    • Definition: 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).
    • FHIR Type: Period
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    authoredOn?: DateTimeType

    Task.authoredOn Element

    FHIR Specification

    • Short: Task Creation Date
    • Definition: The date and time this task was created.
    • Requirements: Most often used along with lastUpdated to track duration of task to supporting monitoring and management.
    • FHIR Type: dateTime
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    lastModified?: DateTimeType

    Task.lastModified Element

    FHIR Specification

    • Short: Task Last Modified Date
    • Definition: The date and time of last modification to this task.
    • Requirements: Used along with history to track task activity and time in a particular task state. This enables monitoring and management.
    • FHIR Type: dateTime
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    requester?: Reference

    Task.requester Element

    FHIR Specification

    requestedPerformer?: CodeableReference[]

    Task.requestedPerformer Element

    FHIR Specification

    owner?: Reference

    Task.owner Element

    FHIR Specification

    Task.performer Element

    FHIR Specification

    • Short: Who or what performed the task
    • Definition: The entity who performed the requested task.
    • FHIR Type: BackboneElement
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: true
    location?: Reference

    Task.location Element

    FHIR Specification

    • Short: Where task occurs
    • Definition: Principal physical location where this task is performed.
    • Comment: This should only be specified when the Task to be/being performed happens or is expected to happen primarily within the bounds of a single Location. Other locations (e.g. source, destination, etc.) would either be reflected on the 'basedOn' Request or be conveyed as distinct Task.input values.
    • Requirements: 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).
    • FHIR Type: Reference
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true

    Task.reason Element

    FHIR Specification

    • Short: Why task is needed
    • Definition: A description, code, or reference indicating why this task needs to be performed.
    • Comment: 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.
    • FHIR Type: CodeableReference
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: false
    insurance?: Reference[]

    Task.insurance Element

    FHIR Specification

    note?: Annotation[]

    Task.note Element

    FHIR Specification

    • Short: Comments made about the task
    • Definition: Free-text information captured about the task as it progresses.
    • FHIR Type: Annotation
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: false
    relevantHistory?: Reference[]

    Task.relevantHistory Element

    FHIR Specification

    • Short: Key events in history of the Task
    • Definition: 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.
    • Comment: 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.
    • FHIR Type: Reference
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: false

    Task.restriction Element

    FHIR Specification

    • Short: Constraints on fulfillment tasks
    • Definition: 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 actioned.
    • Comment: Task.restriction can only be present if the Task is seeking fulfillment of another Request resource, and the restriction identifies what subset of the authorization conveyed by the request is supposed to be fulfilled by this Task. A possible example could be a standing order (the request) covering a significant time period and/or individuals, while the Task seeks fulfillment for only a subset of that time-period and a single individual.
    • Requirements: Sometimes when fulfillment is sought, you don't want full fulfillment.
    • FHIR Type: BackboneElement
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false

    Task.input Element

    FHIR Specification

    • Short: Information used to perform task
    • Definition: Additional information that may be needed in the execution of the task.
    • Requirements: Resources and data used to perform the task. This data is used in the business logic of task execution, and is stored separately because it varies between workflows.
    • FHIR Type: BackboneElement
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: false

    Task.output Element

    FHIR Specification

    • Short: Information produced as part of task
    • Definition: Outputs produced by the Task.
    • Requirements: Resources and data produced during the execution the task. This data is generated by the business logic of task execution, and is stored separately because it varies between workflows.
    • FHIR Type: BackboneElement
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: false

    Methods

    • Parse the provided Task JSON to instantiate the Task data model.

      Parameters

      • sourceJson: Value

        JSON representing FHIR Task

      • OptionaloptSourceField: string

        Optional data source field (e.g. <complexTypeName>.<complexTypeFieldName>); defaults to Task

      Returns undefined | Task

      Task data model or undefined for Task

      JsonError if the provided JSON is not a valid JSON object

    • Assigns the provided Requester object value to the requester property.

      Parameters

      • value: undefined | Reference

        the requester object value

      Returns this

      this

      @ReferenceTargets('Task.requester', ['Device','Organization','Patient','Practitioner','PractitionerRole','RelatedPerson',])

      InvalidTypeError for invalid data type or reference value

    • Assigns the provided Owner object value to the owner property.

      Parameters

      • value: undefined | Reference

        the owner object value

      Returns this

      this

      @ReferenceTargets('Task.owner', ['Practitioner','PractitionerRole','Organization','CareTeam','Patient','RelatedPerson',])

      InvalidTypeError for invalid data type or reference value

    • Assigns the provided value to the text property.

      Parameters

      Returns this

      this

    • Returns boolean

      true if the text property exists and has a value; false otherwise

    • Assigns the provided Resource array value to the contained property.

      Parameters

      • value: undefined | IResource[]

        the contained array value

      Returns this

      this

    • Returns boolean

      true if the contained property exists and has a value; false otherwise

    • Assigns the provided array of Extension values to the extension property.

      Parameters

      • extension: undefined | IExtension[]

        array of Extensions

      Returns this

      this

    • Determines if the extension property exists.

      Parameters

      • Optionalurl: string

        the url that identifies a specific Extension

      Returns boolean

      true if an Extension has the provided url; false otherwise

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the extension property exists and has any values.

      AssertionError for invalid url

    • Adds the provided Extension to the extension property array.

      Parameters

      • extension: undefined | IExtension

        the Extension value to add to the extension property array

      Returns this

      this

    • Removes the Extension having the provided url from the extension property array.

      Parameters

      • url: string

        the url that identifies a specific Extension to remove

      Returns void

      AssertionError for invalid url

    • Determines if the modifierExtension property exists.

      Parameters

      • Optionalurl: string

        the url that identifies a specific Extension

      Returns boolean

      true if an Extension has the provided url

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the modifierExtension property exists and has any values.

      AssertionError for invalid url

    • Assigns the provided PrimitiveType value to the id property.

      Parameters

      • element: undefined | IdType

        the id value

      Returns this

      this

    • Returns undefined | string

      the id property value as a primitive value

    • Assigns the provided primitive value to the id property.

      Parameters

      • value: undefined | string

        the id value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

      true if the id property exists and has a value; false otherwise

    • Assigns the provided value to the meta property.

      Parameters

      • value: undefined | Meta

        the meta value

      Returns this

      this

    • Returns boolean

      true if the meta property exists and has a value; false otherwise

    • Assigns the provided primitive value to the implicitRules property.

      Parameters

      • value: undefined | string

        the implicitRules value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns undefined | string

      the language property value as a primitive value

    • Assigns the provided primitive value to the language property.

      Parameters

      • value: undefined | string

        the language value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

      true if the language property exists and has a value; false otherwise

    • Returns boolean

      true if the instance is a FHIR complex or primitive datatype; false otherwise