Tasks

Available since CorEMR 5.4.2.

Actions

ActionREST VerbDescription
ReadGET
/ws/tasks/
Gets list of active tasks currently in system. Filters can be applied, as explained below.
ReadGET
/ws/patients/{external_id}/tasks/
Gets list of active tasks on existing patient. Filters can be applied, as explained below.
AddPOST
/ws/patients/{external_id}/tasks/
Creates a new task on existing patient.
ReadGET
/ws/patients/{external_id}/tasks/{task_id}
Gets an existing task on existing patient.
UpdatePUT
/ws/patients/{external_id}/tasks/{task_id}
Updates an existing task on existing patient.

Fields

FieldDatatypeAddReadNotes
idIntegerYUnique task record identifier.
external_idString(17)YUnique patient identifier.
descriptionStringY
category_idIntegerY
category_nameStringY
priorityIntegerY
scheduled_dateDatetimeY
requestedBool
statusIntegerY
created_dateDatetimeY
created_user_idIntegerY
completed_dateDatetimeNULL unless completed.
completed_user_idIntegerYNULL unless completed.

Filters

FilterDescription
categoriesComma seperated list of category IDs.
sinceDate or Datetime to indicate a point to read modified tasks from. Capped at one month in the past.
include_completedIncludes tasks completed in the last 4 hours.

Statuses

ID Name Description
0CancelledTask was cancelled/deleted in system.
1OpenTask still needs to be completed.
2CompletedTask was completed as requested.
3RescheduledTask was rescheduled to a different date.
4RefusedPatient 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.