Skip to content

Tasks (v1)

Minimum CorEMR Version: 5.4.2

Actions

Action REST Verb Route Description
Read GET /ws/tasks/ Gets list of active tasks currently in system. Filters can be applied, as explained below.
Read GET /ws/patients/{external_id}/tasks/ Gets list of active tasks on existing patient. Filters can be applied, as explained below.
Add POST /ws/patients/{external_id}/tasks/ Creates a new task on existing patient.
Read GET /ws/patients/{external_id}/tasks/{task_id} Gets an existing task on existing patient.
Update PUT /ws/patients/{external_id}/tasks/{task_id} Updates an existing task on existing patient.

Fields

Field Datatype Add Read Notes
id Integer * Unique task record identifier.
external_id String(17) * Unique patient identifier.
description String R
category_id Integer R
category_name String *
priority Integer R
scheduled_date Datetime R
requested Bool
status Integer * Status number indicating the result of the task (See table below).
created_date Datetime *
created_user String * Available only in 5.5.11 or higher.
created_user_id Integer *
completed_date Datetime NULL unless completed.
completed_user String * Available only in 5.5.11 or higher. NULL unless completed.
completed_user_id Integer * NULL unless completed.

Filters

Filter Description
categories Comma seperated list of category IDs.
since Date or Datetime to indicate a point to read modified tasks from. Capped at one month in the past.
include_completed Includes tasks completed in the last 4 hours.

Status Codes

Code Name Description
0 Cancelled Task was cancelled/deleted in system.
1 Open Task still needs to be completed.
2 Completed Task was completed as requested.
3 Rescheduled Task was rescheduled to a different date.
4 Refused Patient refused to allow the user to accomplish the task.

Rescheduling

Updating an existing task with a new scheduled_date will trigger that task to be rescheduled. Rescheduling a task will create a new task with a new ID. This new task will be returned when rescheduling.

Completing

Updating an existing task with a completed_date will trigger the task to be completed.

Cancelling

Updating an existing task with a NULL scheduled_date will permanently cancel the task. It will no longer be retrievable in this service.