Tasks
Available since CorEMR 5.4.2.
Actions
Action | REST Verb | 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 | Y | Unique task record identifier. | |
external_id | String(17) | Y | Unique patient identifier. | |
description | String | Y | ||
category_id | Integer | Y | ||
category_name | String | Y | ||
priority | Integer | Y | ||
scheduled_date | Datetime | Y | ||
requested | Bool | |||
status | Integer | Y | ||
created_date | Datetime | Y | ||
created_user_id | Integer | Y | ||
completed_date | Datetime | NULL unless completed. | ||
completed_user_id | Integer | Y | 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. |
Statuses
ID | 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.