Skip to content

Tasks (v2)

Minimum CorEMR Version: 6.2.0

This webservice allows clients to manage patient information inside the CorEMR system. It can be used to retrieve and edit patient tasks, as well as all of their applicable fields and data.

Task Endpoints

Action REST Verb Route Description
Read GET /ws/tasks/ Gets list of all tasks currently in the system.
Read GET /ws/patients/{external_id}/tasks/ Get all tasks on the specific patient with the given external_id
Read GET /ws/patients/{external_id}/tasks/{task_id} Get a specific task with the given id on the patient with the given external_id
Create POST /ws/patients/{external_id}/tasks/ Create a new task on the patient with the given external_id.
Update POST /ws/patients/{external_id}/tasks/{task_id} Update an existing patient task.

GET Return Fields

/ws/tasks/
Return Field Datatype 6.4 Filter Note
id Integer Unique task identifier.
external_id String Unique patient identifier correlating to the patient this task is assigned to.
description String Description of the task.
category_name String Category of task.
task_category_id Integer ✅ Category number of task.
priority Integer ✅ Priority category number of task.
task_category_id Integer Category number of task.
scheduled_date DateTime ✅ Date the task should be completed as a string, formatted as YYYY-MM-DD 00:00:00.000
status Integer ✅ Status number of task.
created_date DateTime ✅ Creation date of task as a string, formatted as YYYY-MM-DD 00:00:00.000
created_user String User's name who created the task
category_user_id Integer ✅ User's ID number who created the task

POST Fields

Field Datatype Required 6.4 Default Notes
facility Integer R Patient's facility Facility number where the patient task needs to happen.
booking_no String R Booking number of the patient the task is being placed on.
description String R String description of the task.
date_start DateTime R Date the task begins. Formatted in ISO8601 format.
date_end DateTime R Date the task ends. Formatted in ISO8601 format.
facility_created Integer R Facility or patient's facility Facility number where the patient alert is being created.
priority Integer R 3 Priority of completion of the task, with 1 being highest priority.
all_day Boolean R FALSE Flag indicating whether the task lasts all day, 1 for all day, 0 for set time.
locked Boolean R FALSE Flag indicating whether the task is locked, 1 for yes, 0 for no.
facility_completed Integer O Facility number where the patient task is completed.
order_id Integer O ID number of the order the task came from.
category_id Integer O The category number correlating to the task type. (See /ws/records/tasks/)
provider_id Integer O ID number of the provider of the patient.
related_record_name String O Name of record to be referred to in relation to the task.
related_type Integer O The category number correlating to the related type.
source_related_id Integer O Internal field, do not alter unless understood.
result Integer O Status number indicating the result of the task (See table below).
related_id Integer O ID number of related record.
note String O Note to be attached to the task.
generator_id Integer O ID number of the generator that created the task.
date_removed DateTime O Date the task was removed from the patient. Formatted in ISO8601 format.
treatement_id Integer O ID number of the treatment that the task refers to.

Result Codes

Code Name
1 Complete Task was completed as requested.
2 Refused Patient refused to allow the user to accomplish the task.
3 Absent Patient was absent.
4 Rescheduled Task was rescheduled to a different date.
5 Not Completed Task was not completed.
6 Canceled Task was cancelled/deleted in system.