/
Task Resource

Task Resource

Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.

 

Task is a FHIR resource that is part of the Workflow ModuleTask is used to represent an activity that is to be performed,and track the completion of said activity.

A number of different communication patterns use the Task resource, including the placing and fulfilling laboratory orders.. 

The OpenMRS data model does not contain a natural mapping of this concept support. In order to support workflows requiring Task, the OpenMRS FHIR module extends the data model with a representation of the Task resource that is stored in the fhir_task table. 

Supported Elements

  • Task.id - The logical identifier of the Task resource

  • Task.status - The current status of the Task, represented using states from this state machine. The OpenMRS implementation supports requested, accepted, rejected, and completed states. 

  • Task.intent - Represents the actionability of the Task. The current OpenMRS implementation supports only the order value for this element. 

  • Task.basedOn - A reference to the ServiceRequest resource that represents the order that caused the creation of this Task.

  • Task.encounter - The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created

  • Task.for - The entity who benefits from the performance of the service specified in the task (e.g., the patient).

  • Task.owner - Individual organization or Device currently responsible for task execution.

  • Task.input- Information needed for performing the Task.

  • Task.output - Information produced by performing the Task.

OpenMRS Data Model Support

  1. FhirTask ↔ https://www.hl7.org/fhir/task.html

  2. FhirTaskInput ↔ https://www.hl7.org/fhir/task-definitions.html#Task.input

  3. FhirTaskOutput ↔ https://www.hl7.org/fhir/task-definitions.html#Task.output

  4. FhirTaskReference ↔ https://www.hl7.org/fhir/references.html#Reference

OpenMRS ↔ FHIR Mappings

Translator: https://github.com/pmanko/openmrs-module-fhir2/blob/FM2-75-Lab-Gaps/api/src/main/java/org/openmrs/module/fhir2/api/translators/impl/TaskTranslatorImpl.java

Tests: https://github.com/pmanko/openmrs-module-fhir2/blob/FM2-75-Lab-Gaps/api/src/test/java/org/openmrs/module/fhir2/api/translators/impl/FhirTaskTranslatorImplTest.java

OpenMRS Data Model

FHIR Resource Element

OpenMRS Data Model

FHIR Resource Element

FhirTask.id

Task.id

FhirTask.status

Task.status

FhirTask.intent

Task.intent

FhirTask.basedOn

Collection<FhirReference>

Task.basedOn

List<Reference>

FhirTask.encounter

FhirReference

Task.encounter

Reference

FhirTask.for

FhirReference

Task.for

Reference

FhirTask.owner

FhirReference

Task.owner

Reference

FhirTask.input

Collection<FhirTaskInput>

Task.input

List<ParameterComponent>

FhirTask.output

Collection<FhirTaskOutput>

Task.output

List<TaskOutputComponent>

FhirTask.dateCreated

Task.authoredOn

FhirTask.dateChanged

Task.lastModified

Task.status State Machine

Supported States: REQUESTED, REJECTED, ACCEPTED, COMPLETED

 

Targeted OpenMRS Use Cases 

  1. Lab Integration Workflow

Available RESTful Endpoints

Note: placeholder "{release}" below must be replaced by the FHIR Release - currently "R3" and "R4" are implemented. See more on the  FHIR Release support  page.

Method

URL

Description

Method

URL

Description

GET

/ws/fhir2/{release}/Task/{uuid}

 

POST

/ws/fhir2/{release}/Task

 

PUT

/ws/fhir2/{release}/Task/{uuid}

 

Available Search Parameters

Parameter

Value Type

Example

Parameter

Value Type

Example

based-on

reference

 

owner

reference

 

status

token

requested

Related Github Links

Related content

Practitioner Resource
Practitioner Resource
Read with this
ServiceRequest Resource
ServiceRequest Resource
More like this
FHIR Squad Notes
FHIR Squad Notes
Read with this
DiagnosticReport Resource
DiagnosticReport Resource
More like this
Consuming FHIR Resources for OpenMRS
Consuming FHIR Resources for OpenMRS
More like this
Radiology Service
Radiology Service
More like this