Task

A task to be performed.

http://hl7.org/fhir/R4/task.html

To read more about tasks in Canvas see this article.

post
/Task

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

extension
array[json]

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.
Click to view child attributes
url
string required

Reference that defines the content of this object.

Value Options Supported:
  • http://schemas.canvasmedical.com/fhir/extensions/task-group (This url will have an associated valueReference for the FHIR Group that this task is assigned to.)
valueReference
json

A reference to a FHIR Group resource that represents the canvas team assigned to the task.

Click to view child attributes
reference
string required

The reference string of the group in the format of "Group/13f3941f-0b51-4409-9a2f-e2f0353b324e.

status
string required

The current status of the task.

Value Options Supported:
  • requested (In canvas this maps to a status of open.)
  • completed
  • cancelled (In canvas this maps to a status of closed.)
description
string required

Human-readable explanation of task.

for
json

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.

Click to view child attributes
reference
string required

The reference string of the patient in the format of "Patient/cfd91cd3bd9046db81199aa8ee4afd7f.

authoredOn
datetime

Task Creation Date. If omitted from the message, it will default to the current timestamp at the time of ingestion.

requester
json required

Who is asking for task to be done. This must be a Practitioner reference.

Click to view child attributes
reference
string required

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

owner
json

Responsible individual. If supplied, this must be a Practitioner reference. In canvas this practitioner will become the staff member assignee.

Click to view child attributes
reference
string required

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

intent
enum [unknown] required

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.

restriction
json

Constraints on fulfillment tasks. In Canvas, this field is used to represent the due date for a task.

Click to view child attributes
period
json

When fulfillment sought.

Click to view child attributes
end
datetime

Due date for the task to be performed by.

note
array[json]

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
Click to view child attributes
text
string required

The text of the task comment.

time
datetime

The timestamp the comment was left on the task. If omitted, this will default to current timestamp at data ingestion.

authorReference
json required

A reference to the Canvas Practitioner who authored the task comment.

Click to view child attributes
reference
string required

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

input
array[json]

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.

Click to view child attributes
type
json required

Label for the input.

Click to view child attributes
text
string required
Value Options Supported:
  • label
valueString
string required

Name of the label. If the label doesn’t exist in Canvas already, it will be created.

Responses

201 Created
The server has successfully processed the request; the new resource has been created and is now ready for interaction.

Canvas returns the created resource's id as a UUID within the location header and a null response body.

Errors

400 Bad Request
The request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
405 Method Not Allowed
The request performs an operation that is either not supported or allowed.
422 Unprocessable Entity
The request cannot be processed due to semantic issues or conflicts with the database state.
get
/Task/{id}

Task read

Read a Task resource.

Path Parameters

id required
string
The unique identifier for the Task

Response Payload Attributes

id
string

The identifier of the task.

extension
array[json]

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.
Click to view child attributes
url
string

Reference that defines the content of this object.

Value Options Supported:
  • http://schemas.canvasmedical.com/fhir/extensions/task-permalink (This url will have an associated valueString with a url that will directly link to the task in the Canvas UI.)
  • http://schemas.canvasmedical.com/fhir/extensions/task-group (This url will have an associated valueReference for the FHIR Group that this task is assigned to.)
valueString
string

Supplied in the extensions associated to the permalink. This string will represent a URL to the task in the Canvas UI.

valueReference
json

A reference to a FHIR Group resource that represents the canvas team assigned to the task.

Click to view child attributes
reference
string

The reference string of the group in the format of "Group/13f3941f-0b51-4409-9a2f-e2f0353b324e.

type
string

Type the reference refers to (e.g. “Group”).

display
string

Display name of the FHIR Group.

status
string

The current status of the task.

Value Options Supported:
  • requested (In canvas this maps to a status of open.)
  • completed
  • cancelled (In canvas this maps to a status of closed.)
description
string

Human-readable explanation of task.

for
json

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.

Click to view child attributes
reference
string

The reference string of the patient in the format of "Patient/cfd91cd3bd9046db81199aa8ee4afd7f.

type
string

Type the reference refers to (e.g. “Patient”).

authoredOn
datetime

Task Creation Date. If omitted from the message, it will default to the current timestamp at the time of ingestion.

requester
json

Who is asking for task to be done. This must be a Practitioner reference.

Click to view child attributes
reference
string

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

type
string

Type the reference refers to (e.g. “Practitioner”).

owner
json

Responsible individual. If supplied, this must be a Practitioner reference. In canvas this practitioner will become the staff member assignee.

Click to view child attributes
reference
string

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

type
string

Type the reference refers to (e.g. “Practitioner”).

intent
enum [unknown]

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.

restriction
json

Constraints on fulfillment tasks. In Canvas, this field is used to represent the due date for a task.

Click to view child attributes
period
json

When fulfillment sought.

Click to view child attributes
end
datetime

Due date for the task to be performed by.

note
array[json]

Comments made about the task.

Click to view child attributes
text
string

The text of the task comment.

time
datetime

The timestamp the comment was left on the task. If omitted, this will default to current timestamp at data ingestion.

authorReference
json

A reference to the Canvas Practitioner who authored the task comment.

Click to view child attributes
reference
string

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

type
string

Type the reference refers to (e.g. “Practitioner”).

input
array[json]

Information used to perform the task. In Canvas this translates to added labels on a Task.

Click to view child attributes
type
json

Label for the input.

Click to view child attributes
text
string
Value Options Supported:
  • label
valueString
string

Name of the label. If the label doesn’t exist in Canvas already, it will be created.

Responses

200 OK
Request was successful.

Errors

401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
404 Not Found
The requested resource was not found.
put
/Task/{id}

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

id
string required

The identifier of the task.

extension
array[json]

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.
Click to view child attributes
url
string required

Reference that defines the content of this object.

Value Options Supported:
  • http://schemas.canvasmedical.com/fhir/extensions/task-group (This url will have an associated valueReference for the FHIR Group that this task is assigned to.)
valueReference
json

A reference to a FHIR Group resource that represents the canvas team assigned to the task.

Click to view child attributes
reference
string required

The reference string of the group in the format of "Group/13f3941f-0b51-4409-9a2f-e2f0353b324e.

status
string required

The current status of the task.

Value Options Supported:
  • requested (In canvas this maps to a status of open.)
  • completed
  • cancelled (In canvas this maps to a status of closed.)
description
string required

Human-readable explanation of task.

for
json

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.

Click to view child attributes
reference
string required

The reference string of the patient in the format of "Patient/cfd91cd3bd9046db81199aa8ee4afd7f.

authoredOn
datetime

Task Creation Date. If omitted from the message, it will default to the current timestamp at the time of ingestion.

requester
json required

Who is asking for task to be done. This must be a Practitioner reference.

Click to view child attributes
reference
string required

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

owner
json

Responsible individual. If supplied, this must be a Practitioner reference. In canvas this practitioner will become the staff member assignee.

Click to view child attributes
reference
string required

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

intent
enum [unknown] required

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.

restriction
json

Constraints on fulfillment tasks. In Canvas, this field is used to represent the due date for a task.

Click to view child attributes
period
json

When fulfillment sought.

Click to view child attributes
end
datetime

Due date for the task to be performed by.

note
array[json]

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
Click to view child attributes
text
string required

The text of the task comment.

time
datetime

The timestamp the comment was left on the task. If omitted, this will default to current timestamp at data ingestion.

authorReference
json required

A reference to the Canvas Practitioner who authored the task comment.

Click to view child attributes
reference
string required

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

input
array[json]

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.

Click to view child attributes
type
json required

Label for the input.

Click to view child attributes
text
string required
Value Options Supported:
  • label
valueString
string required

Name of the label. If the label doesn’t exist in Canvas already, it will be created.

Responses

200 OK
The server has successfully processed the request.

Canvas returns a null response body.

Errors

400 Bad Request
The request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
404 Not Found
The requested resource was not found.
405 Method Not Allowed
The request performs an operation that is either not supported or allowed.
412 Precondition Failed
The request depends on a precondition that has not been met.
422 Unprocessable Entity
The request cannot be processed due to semantic issues or conflicts with the database state.

Query Parameters

_id
string

Search by a task id.

_sort
string

Triggers sorting of the results by a specific criteria.

Search Values Supported:
  • _id (sort in ascending order)
  • due-date (sort in ascending order)
  • -_id (sort in descending order)
  • -due-date (sort in descending order)
description
string

Search by description.

label
string

Search for a task with an associated label

owner
string

Search by task owner in the format Practitioner/3a9cafb9d1b445be95a2e2548e12a787.

patient
string

Search by patient in the format Patient/a39cafb9d1b445be95a2e2548e12a787.

requester
string

Search by task requester in the format Practitioner/3a9cafb9d1b445be95a2e2548e12a787.

status
string

Search by task status

Search Values Supported:
  • requested
  • completed
  • cancelled

Response Payload Attributes

resourceType
string

The FHIR Resource name.

type
string

This element and value designate that the bundle is a search response. Search result bundles will always have the Bundle.type of searchset .

total
integer

The number of resources that match the search parameter.

link
array[json]

Attributes relevant to pagination, see our Pagination page for more detail.

Click to view child attributes
relation
enum [self|first|next|last]

The relation of the page search

url

The search url for the specific relation

entry
array[json]

The results bundle that lists out each object returned in the search

Click to view child attributes
resource
json

The attributes specific to the resource type, see the Attributes section below

Attributes

id
string

The identifier of the task.

extension
array[json]

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.
Click to view child attributes
url
string

Reference that defines the content of this object.

Value Options Supported:
  • http://schemas.canvasmedical.com/fhir/extensions/task-permalink (This url will have an associated valueString with a url that will directly link to the task in the Canvas UI.)
  • http://schemas.canvasmedical.com/fhir/extensions/task-group (This url will have an associated valueReference for the FHIR Group that this task is assigned to.)
valueString
string

Supplied in the extensions associated to the permalink. This string will represent a URL to the task in the Canvas UI.

valueReference
json

A reference to a FHIR Group resource that represents the canvas team assigned to the task.

Click to view child attributes
reference
string

The reference string of the group in the format of "Group/13f3941f-0b51-4409-9a2f-e2f0353b324e.

type
string

Type the reference refers to (e.g. “Group”).

display
string

Display name of the FHIR Group.

status
string

The current status of the task.

Value Options Supported:
  • requested (In canvas this maps to a status of open.)
  • completed
  • cancelled (In canvas this maps to a status of closed.)
description
string

Human-readable explanation of task.

for
json

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.

Click to view child attributes
reference
string

The reference string of the patient in the format of "Patient/cfd91cd3bd9046db81199aa8ee4afd7f.

type
string

Type the reference refers to (e.g. “Patient”).

authoredOn
datetime

Task Creation Date. If omitted from the message, it will default to the current timestamp at the time of ingestion.

requester
json

Who is asking for task to be done. This must be a Practitioner reference.

Click to view child attributes
reference
string

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

type
string

Type the reference refers to (e.g. “Practitioner”).

owner
json

Responsible individual. If supplied, this must be a Practitioner reference. In canvas this practitioner will become the staff member assignee.

Click to view child attributes
reference
string

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

type
string

Type the reference refers to (e.g. “Practitioner”).

intent
enum [unknown]

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.

restriction
json

Constraints on fulfillment tasks. In Canvas, this field is used to represent the due date for a task.

Click to view child attributes
period
json

When fulfillment sought.

Click to view child attributes
end
datetime

Due date for the task to be performed by.

note
array[json]

Comments made about the task.

Click to view child attributes
text
string

The text of the task comment.

time
datetime

The timestamp the comment was left on the task. If omitted, this will default to current timestamp at data ingestion.

authorReference
json

A reference to the Canvas Practitioner who authored the task comment.

Click to view child attributes
reference
string

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

type
string

Type the reference refers to (e.g. “Practitioner”).

input
array[json]

Information used to perform the task. In Canvas this translates to added labels on a Task.

Click to view child attributes
type
json

Label for the input.

Click to view child attributes
text
string
Value Options Supported:
  • label
valueString
string

Name of the label. If the label doesn’t exist in Canvas already, it will be created.

Responses

200 OK
Request was successful.

Errors

400 Bad Request
The request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
  • 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"
          }
        }
      ]
    }