Task
A task to be performed.
http://hl7.org/fhir/R4/task.html
To read more about tasks in Canvas see this article.
Endpoints
Task create
Create a task.
Tasks created through this FHIR Endpoint will display in the patient chart via the tasks icon. Open tasks will also display in the Task Panel.
Attributes
Additional content defined by implementations
- Canvas supports assigning a task to a group/team. This optional field requires a reference to the team from the FHIR Group endpoint. In the Canvas UI, this will display under the field team in the task card.
Reference that defines the content of this object.
A reference to a FHIR Group resource that represents the canvas team assigned to the task.
The reference string of the group in the format of "Group/13f3941f-0b51-4409-9a2f-e2f0353b324e
.
The current status of the task.
Human-readable explanation of task.
Beneficiary of the Task. This must be a Patient reference. If this attribute is supplied, the task will be visible on the patient’s chart.
The reference string of the patient in the format of "Patient/cfd91cd3bd9046db81199aa8ee4afd7f
.
Task Creation Date. If omitted from the message, it will default to the current timestamp at the time of ingestion.
Who is asking for task to be done. This must be a Practitioner reference.
The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e
.
Responsible individual. If supplied, this must be a Practitioner reference. In canvas this practitioner will become the staff member assignee.
The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e
.
Distinguishes whether the task is a proposal, plan or full order. Canvas does not have a mapping for this field, so it should always be set to unknown.
Constraints on fulfillment tasks. In Canvas, this field is used to represent the due date for a task.
When fulfillment sought.
Due date for the task to be performed by.
Comments made about the task.
For each comment, the following values can be specified:
- The comment’s text
- Timestamp the comment was left. If omitted, this will default to current timestamp at data ingestion.
- Reference to the practitioner that left the specific comment
The text of the task comment.
The timestamp the comment was left on the task. If omitted, this will default to current timestamp at data ingestion.
A reference to the Canvas Practitioner who authored the task comment.
The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e
.
Information used to perform the task. In Canvas this translates to added labels on a Task.
If the label doesn’t exist in Canvas already, it will be created.
Label for the input.
Name of the label. If the label doesn’t exist in Canvas already, it will be created.
Responses
Canvas returns the created resource's id as a UUID within the
location
header and a null
response body.Errors
Task read
Read a Task resource.
Path Parameters
Response Payload Attributes
The identifier of the task.
Additional content defined by implementations
- Canvas supports assigning a task to a group/team. This optional field requires a reference to the team from the FHIR Group endpoint. In the Canvas UI, this will display under the field team in the task card.
- When reading our a FHIR Task objects, a permalink URL to the task may be supplied. This link will take you directly to the task in the Canvas UI.
Reference that defines the content of this object.
Supplied in the extensions associated to the permalink. This string will represent a URL to the task in the Canvas UI.
A reference to a FHIR Group resource that represents the canvas team assigned to the task.
The reference string of the group in the format of "Group/13f3941f-0b51-4409-9a2f-e2f0353b324e
.
Type the reference refers to (e.g. “Group”).
Display name of the FHIR Group.
The current status of the task.
Human-readable explanation of task.
Beneficiary of the Task. This must be a Patient reference. If this attribute is supplied, the task will be visible on the patient’s chart.
The reference string of the patient in the format of "Patient/cfd91cd3bd9046db81199aa8ee4afd7f
.
Type the reference refers to (e.g. “Patient”).
Task Creation Date. If omitted from the message, it will default to the current timestamp at the time of ingestion.
Who is asking for task to be done. This must be a Practitioner reference.
The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e
.
Type the reference refers to (e.g. “Practitioner”).
Responsible individual. If supplied, this must be a Practitioner reference. In canvas this practitioner will become the staff member assignee.
The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e
.
Type the reference refers to (e.g. “Practitioner”).
Distinguishes whether the task is a proposal, plan or full order. Canvas does not have a mapping for this field, so it should always be set to unknown.
Constraints on fulfillment tasks. In Canvas, this field is used to represent the due date for a task.
When fulfillment sought.
Due date for the task to be performed by.
Comments made about the task.
The text of the task comment.
The timestamp the comment was left on the task. If omitted, this will default to current timestamp at data ingestion.
A reference to the Canvas Practitioner who authored the task comment.
The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e
.
Type the reference refers to (e.g. “Practitioner”).
Information used to perform the task. In Canvas this translates to added labels on a Task.
Label for the input.
Name of the label. If the label doesn’t exist in Canvas already, it will be created.
Responses
Errors
Task update
Update a task.
Any note
comments included in the update message body will not be checked if they already exist in Canvas. Canvas will always assume each Note is an addition to the Task Comments.
Omitting the group extension
and authoredOn
fields in an update body does not delete the contents of that field. They will remain set to the last value they were assigned.
Omitting the description
, owner
, restriction
and input
attributes will delete the contents of the field in the Canvas database. In order to have a Task keep the values in these fields after an update, they must be included.
Attributes
The identifier of the task.
Additional content defined by implementations
- Canvas supports assigning a task to a group/team. This optional field requires a reference to the team from the FHIR Group endpoint. In the Canvas UI, this will display under the field team in the task card.
Reference that defines the content of this object.
A reference to a FHIR Group resource that represents the canvas team assigned to the task.
The reference string of the group in the format of "Group/13f3941f-0b51-4409-9a2f-e2f0353b324e
.
The current status of the task.
Human-readable explanation of task.
Beneficiary of the Task. This must be a Patient reference. If this attribute is supplied, the task will be visible on the patient’s chart.
The reference string of the patient in the format of "Patient/cfd91cd3bd9046db81199aa8ee4afd7f
.
Task Creation Date. If omitted from the message, it will default to the current timestamp at the time of ingestion.
Who is asking for task to be done. This must be a Practitioner reference.
The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e
.
Responsible individual. If supplied, this must be a Practitioner reference. In canvas this practitioner will become the staff member assignee.
The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e
.
Distinguishes whether the task is a proposal, plan or full order. Canvas does not have a mapping for this field, so it should always be set to unknown.
Constraints on fulfillment tasks. In Canvas, this field is used to represent the due date for a task.
When fulfillment sought.
Due date for the task to be performed by.
Comments made about the task.
For each comment, the following values can be specified:
- The comment’s text
- Timestamp the comment was left. If omitted, this will default to current timestamp at data ingestion.
- Reference to the practitioner that left the specific comment
The text of the task comment.
The timestamp the comment was left on the task. If omitted, this will default to current timestamp at data ingestion.
A reference to the Canvas Practitioner who authored the task comment.
The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e
.
Information used to perform the task. In Canvas this translates to added labels on a Task.
If the label doesn’t exist in Canvas already, it will be created.
Label for the input.
Name of the label. If the label doesn’t exist in Canvas already, it will be created.
Responses
Canvas returns a
null
response body.Errors
Task search
Search for a task
Query Parameters
Search by a task id.
Triggers sorting of the results by a specific criteria.
Search by description.
Search for a task with an associated label
Search by task owner in the format Practitioner/3a9cafb9d1b445be95a2e2548e12a787
.
Search by patient in the format Patient/a39cafb9d1b445be95a2e2548e12a787
.
Search by task requester in the format Practitioner/3a9cafb9d1b445be95a2e2548e12a787
.
Search by task status
Response Payload Attributes
The FHIR Resource name.
This element and value designate that the bundle is a search response. Search result bundles will always have the Bundle.type of searchset .
The number of resources that match the search parameter.
Attributes relevant to pagination, see our Pagination page for more detail.
The relation of the page search
The search url for the specific relation
The results bundle that lists out each object returned in the search
The attributes specific to the resource type, see the Attributes section below
Attributes
The identifier of the task.
Additional content defined by implementations
- Canvas supports assigning a task to a group/team. This optional field requires a reference to the team from the FHIR Group endpoint. In the Canvas UI, this will display under the field team in the task card.
- When reading our a FHIR Task objects, a permalink URL to the task may be supplied. This link will take you directly to the task in the Canvas UI.
Reference that defines the content of this object.
Supplied in the extensions associated to the permalink. This string will represent a URL to the task in the Canvas UI.
A reference to a FHIR Group resource that represents the canvas team assigned to the task.
The reference string of the group in the format of "Group/13f3941f-0b51-4409-9a2f-e2f0353b324e
.
Type the reference refers to (e.g. “Group”).
Display name of the FHIR Group.
The current status of the task.
Human-readable explanation of task.
Beneficiary of the Task. This must be a Patient reference. If this attribute is supplied, the task will be visible on the patient’s chart.
The reference string of the patient in the format of "Patient/cfd91cd3bd9046db81199aa8ee4afd7f
.
Type the reference refers to (e.g. “Patient”).
Task Creation Date. If omitted from the message, it will default to the current timestamp at the time of ingestion.
Who is asking for task to be done. This must be a Practitioner reference.
The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e
.
Type the reference refers to (e.g. “Practitioner”).
Responsible individual. If supplied, this must be a Practitioner reference. In canvas this practitioner will become the staff member assignee.
The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e
.
Type the reference refers to (e.g. “Practitioner”).
Distinguishes whether the task is a proposal, plan or full order. Canvas does not have a mapping for this field, so it should always be set to unknown.
Constraints on fulfillment tasks. In Canvas, this field is used to represent the due date for a task.
When fulfillment sought.
Due date for the task to be performed by.
Comments made about the task.
The text of the task comment.
The timestamp the comment was left on the task. If omitted, this will default to current timestamp at data ingestion.
A reference to the Canvas Practitioner who authored the task comment.
The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e
.
Type the reference refers to (e.g. “Practitioner”).
Information used to perform the task. In Canvas this translates to added labels on a Task.
Label for the input.
Name of the label. If the label doesn’t exist in Canvas already, it will be created.
Responses
Errors
curl --request POST \ --url 'https://fumage-example.canvasmedical.com/Task' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "resourceType": "Task", "extension": [ { "url": "http://schemas.canvasmedical.com/fhir/extensions/task-group", "valueReference": { "reference": "Group/0c59ba86-dd40-4fde-8179-6e0b91dc617b" } } ], "status": "requested", "description": "Ask patient for new insurance information.", "for": { "reference": "Patient/cfd91cd3bd9046db81199aa8ee4afd7f" }, "authoredOn": "2023-09-22T14:00:00.000Z", "requester": { "reference": "Practitioner/4150cd20de8a470aa570a852859ac87e" }, "owner": { "reference": "Practitioner/a02cbf2403e140f7bc9a355c6ed420f3" }, "intent": "unknown", "restriction": { "period": { "end": "2023-09-23T14:00:00.000Z" } }, "note": [ { "text": "Please call patient to update insurance information.", "time": "2023-09-22T14:00:00.000Z", "authorReference": { "reference": "Practitioner/4150cd20de8a470aa570a852859ac87e" } } ], "input": [ { "type": { "text": "label" }, "valueString": "Urgent" } ] } '
import requests url = "https://fumage-example.canvasmedical.com/Task" payload = { "resourceType": "Task", "extension": [ { "url": "http://schemas.canvasmedical.com/fhir/extensions/task-group", "valueReference": { "reference": "Group/0c59ba86-dd40-4fde-8179-6e0b91dc617b" } } ], "status": "requested", "description": "Ask patient for new insurance information.", "for": { "reference": "Patient/cfd91cd3bd9046db81199aa8ee4afd7f" }, "authoredOn": "2023-09-22T14:00:00.000Z", "requester": { "reference": "Practitioner/4150cd20de8a470aa570a852859ac87e" }, "owner": { "reference": "Practitioner/a02cbf2403e140f7bc9a355c6ed420f3" }, "intent": "unknown", "restriction": { "period": { "end": "2023-09-23T14:00:00.000Z" } }, "note": [ { "text": "Please call patient to update insurance information.", "time": "2023-09-22T14:00:00.000Z", "authorReference": { "reference": "Practitioner/4150cd20de8a470aa570a852859ac87e" } } ], "input": [ { "type": { "text": "label" }, "valueString": "Urgent" } ] } headers = { "accept": "application/json", "Authorization": "Bearer <token>", "content-type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text)
null
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "invalid", "details": { "text": "Bad request" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "unknown", "details": { "text": "Authentication failed" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "details": { "text": "Authorization failed" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-supported", "details": { "text": "Operation is not supported" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "business-rule", "details": { "text": "Unprocessable entity" } } ] }
curl --request GET \ --url 'https://fumage-example.canvasmedical.com/Task/<id>' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json'
import requests url = "https://fumage-example.canvasmedical.com/Task/<id>" headers = { "accept": "application/json", "Authorization": "Bearer <token>" } response = requests.get(url, headers=headers) print(response.text)
{ "resourceType": "Task", "id": "5f72fbcc-10ac-48ff-a2d2-02b229c38ce9", "extension": [ { "url": "http://schemas.canvasmedical.com/fhir/extensions/task-group", "valueReference": { "reference": "Group/0c59ba86-dd40-4fde-8179-6e0b91dc617b", "type": "Group", "display": "Payment Collection" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/task-permalink", "valueString": "http://example.canvasmedical.com/permalinks/v1/VGFzazo4OTo3MA==" } ], "status": "completed", "description": "Ask patient for new insurance information.", "for": { "reference": "Patient/cfd91cd3bd9046db81199aa8ee4afd7f", "type": "Patient" }, "authoredOn": "2023-09-22T14:00:00+00:00", "requester": { "reference": "Practitioner/4150cd20de8a470aa570a852859ac87e", "type": "Practitioner" }, "owner": { "reference": "Practitioner/a02cbf2403e140f7bc9a355c6ed420f3", "type": "Practitioner" }, "intent": "unknown", "restriction": { "period": { "end": "2023-09-23T14:00:00+00:00" } }, "note": [ { "authorReference": { "reference": "Practitioner/4150cd20de8a470aa570a852859ac87e", "type": "Practitioner" }, "time": "2023-09-22T14:00:00+00:00", "text": "Please call patient to update insurance information." } ], "input": [ { "type": { "text": "label" }, "valueString": "Urgent" } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "unknown", "details": { "text": "Authentication failed" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "details": { "text": "Authorization failed" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-found", "details": { "text": "Unknown Task resource 'a47c7b0e-bbb4-42cd-bc4a-df259d148ea1'" } } ] }
curl --request PUT \ --url 'https://fumage-example.canvasmedical.com/Task/<id>' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "resourceType": "Task", "extension": [ { "url": "http://schemas.canvasmedical.com/fhir/extensions/task-group", "valueReference": { "reference": "Group/0c59ba86-dd40-4fde-8179-6e0b91dc617b" } } ], "status": "completed", "description": "Ask patient for new insurance information.", "for": { "reference": "Patient/cfd91cd3bd9046db81199aa8ee4afd7f" }, "authoredOn": "2023-09-22T14:00:00.000Z", "requester": { "reference": "Practitioner/4150cd20de8a470aa570a852859ac87e" }, "owner": { "reference": "Practitioner/a02cbf2403e140f7bc9a355c6ed420f3" }, "intent": "unknown", "restriction": { "period": { "end": "2023-09-23T14:00:00.000Z" } }, "note": [ { "text": "Please call patient to update insurance information.", "time": "2023-09-22T14:00:00.000Z", "authorReference": { "reference": "Practitioner/4150cd20de8a470aa570a852859ac87e" } } ], "input": [ { "type": { "text": "label" }, "valueString": "Urgent" } ] } '
import requests url = "https://fumage-example.canvasmedical.com/Task/<id>" payload = { "resourceType": "Task", "extension": [ { "url": "http://schemas.canvasmedical.com/fhir/extensions/task-group", "valueReference": { "reference": "Group/0c59ba86-dd40-4fde-8179-6e0b91dc617b" } } ], "status": "completed", "description": "Ask patient for new insurance information.", "for": { "reference": "Patient/cfd91cd3bd9046db81199aa8ee4afd7f" }, "authoredOn": "2023-09-22T14:00:00.000Z", "requester": { "reference": "Practitioner/4150cd20de8a470aa570a852859ac87e" }, "owner": { "reference": "Practitioner/a02cbf2403e140f7bc9a355c6ed420f3" }, "intent": "unknown", "restriction": { "period": { "end": "2023-09-23T14:00:00.000Z" } }, "note": [ { "text": "Please call patient to update insurance information.", "time": "2023-09-22T14:00:00.000Z", "authorReference": { "reference": "Practitioner/4150cd20de8a470aa570a852859ac87e" } } ], "input": [ { "type": { "text": "label" }, "valueString": "Urgent" } ] } headers = { "accept": "application/json", "Authorization": "Bearer <token>", "content-type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.text)
null
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "invalid", "details": { "text": "Bad request" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "unknown", "details": { "text": "Authentication failed" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "details": { "text": "Authorization failed" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-found", "details": { "text": "Unknown Task resource 'a47c7b0e-bbb4-42cd-bc4a-df259d148ea1'" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-supported", "details": { "text": "Operation is not supported" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "conflict", "details": { "text": "Resource updated since If-Unmodified-Since date" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "business-rule", "details": { "text": "Unprocessable entity" } } ] }
curl --request GET \ --url 'https://fumage-example.canvasmedical.com/Task?owner=Practitioner/a02cbf2403e140f7bc9a355c6ed420f3&label=Urgent' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json'
import requests url = "https://fumage-example.canvasmedical.com/Task?owner=Practitioner/a02cbf2403e140f7bc9a355c6ed420f3&label=Urgent" headers = { "accept": "application/json", "Authorization": "Bearer <token>" } response = requests.get(url, headers=headers) print(response.text)
{ "resourceType": "Bundle", "type": "searchset", "total": 1, "link": [ { "relation": "self", "url": "/Task?owner=Practitioner%2Fa02cbf2403e140f7bc9a355c6ed420f3&label=Urgent&_count=10&_offset=0" }, { "relation": "first", "url": "/Task?owner=Practitioner%2Fa02cbf2403e140f7bc9a355c6ed420f3&label=Urgent&_count=10&_offset=0" }, { "relation": "last", "url": "/Task?owner=Practitioner%2Fa02cbf2403e140f7bc9a355c6ed420f3&label=Urgent&_count=10&_offset=0" } ], "entry": [ { "resource": { "resourceType": "Task", "id": "5f72fbcc-10ac-48ff-a2d2-02b229c38ce9", "extension": [ { "url": "http://schemas.canvasmedical.com/fhir/extensions/task-group", "valueReference": { "reference": "Group/0c59ba86-dd40-4fde-8179-6e0b91dc617b", "type": "Group", "display": "Payment Collection" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/task-permalink", "valueString": "http://example.canvasmedical.com/permalinks/v1/VGFzazo4OTo3MA==" } ], "status": "completed", "description": "Ask patient for new insurance information.", "for": { "reference": "Patient/cfd91cd3bd9046db81199aa8ee4afd7f", "type": "Patient" }, "authoredOn": "2023-09-22T14:00:00+00:00", "requester": { "reference": "Practitioner/4150cd20de8a470aa570a852859ac87e", "type": "Practitioner" }, "owner": { "reference": "Practitioner/a02cbf2403e140f7bc9a355c6ed420f3", "type": "Practitioner" }, "intent": "unknown", "restriction": { "period": { "end": "2023-09-23T14:00:00+00:00" } }, "note": [ { "authorReference": { "reference": "Practitioner/4150cd20de8a470aa570a852859ac87e", "type": "Practitioner" }, "time": "2023-09-22T14:00:00+00:00", "text": "Please call patient to update insurance information." } ], "input": [ { "type": { "text": "label" }, "valueString": "Urgent" } ] } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "invalid", "details": { "text": "Bad request" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "unknown", "details": { "text": "Authentication failed" } } ] }
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "details": { "text": "Authorization failed" } } ] }