Consent
A record of a healthcare consumer’s choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.
https://hl7.org/fhir/R4/consent.html
For more information on consents in canvas, see this article.
Endpoints
Consent create
Before creating a consent via the API, Patient Consent Codings must be configured in Canvas.
Updating existing patient consent objects
A patient consent is uniquely distinguished by its patient and consent coding
This Create endpoint also acts as an Update endpoint. If the patient already has an existing patient consent with the same consent coding, the endpoint updates that consent in place and the id returned in the response will not be changed.
Attributes
The FHIR Resource name.
Indicates the current state of this consent.
For create interactions, this field is required by FHIR but ignored by Canvas, so {} is an accepted value.
Plain text representation of the concept
A system/code
or a system/display
is required to be able to identify the consent category being created/updated.
Identifies where the definition of the code comes from.
The system url of the coding.
The code of the medication.
The display name of the coding.
Who the consent applies to
The reference string of the subject in the format of "Patient/a39cafb9d1b445be95a2e2548e12a787"
.
Type the reference refers to (e.g. “Patient”).
The source on which this consent statement is based.
The source on which this consent is based.
For create interactions, sourceAttachment.title
, sourceAttachment.contentType
, and sourceAttachment.data
are required.
Label to display in place of the data.
Mime type of the content, with charset etc.
Data inline, base64ed.
Constraints to the base Consent.
Canvas uses period.start
and period.end
to define the start and end dates of the consent.
For create interactions, period.start
is required with a YYYY-MM-DD format.
A period.end
with a past date will mark the consent as Expired in the UI.
Timeframe for this rule
Starting time with inclusive boundary
End time with inclusive boundary, if not ongoing.
Responses
Canvas returns the created resource's id as a UUID within the
location
header and a null
response body.Errors
Consent read
Read a Consent resource
Path Parameters
Response Payload Attributes
The FHIR Resource name.
The identifier of the Consent.
Indicates the current state of this consent.
Type of consent being presented (e.g. ADR, Privacy, Treatment, Research).
Plain text representation of the concept
A classification of the type of consents found in the statement.
The category.coding needs to match a patient consent coding record defined in the Canvas Admin Settings page.
Identifies where the definition of the code comes from.
The system url of the coding.
The code of the medication.
The display name of the coding.
Who the consent applies to
The reference string of the subject in the format of "Patient/a39cafb9d1b445be95a2e2548e12a787"
.
Type the reference refers to (e.g. “Patient”).
When this Consent was issued / created / indexed.
This value will be the Consent’s datetime of ingestion in Canvas.
The source on which this consent statement is based.
Canvas returns the sourceAttachment.url
for the document associated with the consent that has the latest period.start date.
Note: There is a temporary extension that will contain the presigned URL for the Attachment; this will be provided while we migrate to static URLs that will require bearer authentication to retrieve attachment files. Use this extension for backward-compatible URLs until the migration is completed.
Uri where the data can be found.
Constraints to the base Consent.
Canvas uses period.start
and period.end
to define the start and end dates of the consent.
Timeframe for this rule
Starting time with inclusive boundary
End time with inclusive boundary, if not ongoing.
Responses
Errors
Consent search
Search for Consent resources
Query Parameters
The Canvas-issued unique identifier of the Consent.
Who the consent applies to in the format Patient/a39cafb9d1b445be95a2e2548e12a787
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 FHIR Resource name.
The identifier of the Consent.
Indicates the current state of this consent.
Type of consent being presented (e.g. ADR, Privacy, Treatment, Research).
Plain text representation of the concept
A classification of the type of consents found in the statement.
The category.coding needs to match a patient consent coding record defined in the Canvas Admin Settings page.
Identifies where the definition of the code comes from.
The system url of the coding.
The code of the medication.
The display name of the coding.
Who the consent applies to
The reference string of the subject in the format of "Patient/a39cafb9d1b445be95a2e2548e12a787"
.
Type the reference refers to (e.g. “Patient”).
When this Consent was issued / created / indexed.
This value will be the Consent’s datetime of ingestion in Canvas.
The source on which this consent statement is based.
Canvas returns the sourceAttachment.url
for the document associated with the consent that has the latest period.start date.
Note: There is a temporary extension that will contain the presigned URL for the Attachment; this will be provided while we migrate to static URLs that will require bearer authentication to retrieve attachment files. Use this extension for backward-compatible URLs until the migration is completed.
Uri where the data can be found.
Constraints to the base Consent.
Canvas uses period.start
and period.end
to define the start and end dates of the consent.
Timeframe for this rule
Starting time with inclusive boundary
End time with inclusive boundary, if not ongoing.
Responses
Errors
curl --request POST \ --url 'https://fumage-example.canvasmedical.com/Consent' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "resourceType": "Consent", "status": "active", "scope": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/consentscope", "code": "patient-privacy" } ] }, "category": [ { "coding": [ { "system": "ConsentCoding_System_ConfigureInAdmin", "code": "ConsentCoding_Code_ConfigureInAdmin", "display": "ConsentCoding_Display_ConfigureInAdmin" } ] } ], "patient": { "reference": "Patient/5350cd20de8a470aa570a852859ac87e" }, "sourceAttachment": { "contentType": "application/pdf", "data": "JVBERi0xLjYKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nCXKuwqEQAxG4T5P8dcLxiS6MyMMUwha2AkBi8VuL52gja+/gpzia46w4qQdAmGxhKDKXVTE7vb40PLAdh9Xx496p2fghGgtB/gb9ahQg39fWbSElMWKZmlKZVnasvpEg9NMM/7+cxdrCmVuZHN0cmVhbQplbmRvYmoKCjMgMCBvYmoKMTA2CmVuZG9iagoKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyL0ZsYXRlRGVjb2RlL0xlbmd0aDEgODE4ND4+CnN0cmVhbQp4nOU5fXATV36/tyvZ8geW7NjCILCe2NhgbEv+AMKXsbAt2cYGy19EMgRrLa0tBVtSJdkEcpn42iZhRCgcuSYlYSbpTC+T3KTDOk5b5yYNzl3T9nq9S9I0c5NLaJi5u2lnCgPNJWnncuD+3tuVMYSQaaf/deW3+/v+fk9aSCenFCiEGRDBHZqUE6VGgwAA/whASkLTadrcW7YD4UsAwj+NJcYnn/2rg58BGF4DyH1tfOLo2Or+l9MAhREA8d2IIodPNW6rAbBsRRtbIkjovnE0F/EE4vdGJtMPXSSLJYh/F/HSiXhIpuIoQfwlxAsn5YcSDsN29G9B+0Bj8qTyX+d+FEb8nwEKUol4Cn2J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ODM3LTA3JzAwJyk+PgplbmRvYmoKCnhyZWYKMCAxNAowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDU3MTUgMDAwMDAgbiAKMDAwMDAwMDAxOSAwMDAwMCBuIAowMDAwMDAwMTk2IDAwMDAwIG4gCjAwMDAwMDU4NTggMDAwMDAgbiAKMDAwMDAwMDIxNiAwMDAwMCBuIAowMDAwMDA0OTI4IDAwMDAwIG4gCjAwMDAwMDQ5NDkgMDAwMDAgbiAKMDAwMDAwNTE0NCAwMDAwMCBuIAowMDAwMDA1NDUzIDAwMDAwIG4gCjAwMDAwMDU2MjggMDAwMDAgbiAKMDAwMDAwNTY2MCAwMDAwMCBuIAowMDAwMDA1OTU3IDAwMDAwIG4gCjAwMDAwMDYwNTQgMDAwMDAgbiAKdHJhaWxlcgo8PC9TaXplIDE0L1Jvb3QgMTIgMCBSCi9JbmZvIDEzIDAgUgovSUQgWyA8ODREQjY2QjEwREU5OTRGNzA1ODlCQTNCRjUzODE4RDg+Cjw4NERCNjZCMTBERTk5NEY3MDU4OUJBM0JGNTM4MThEOD4gXQovRG9jQ2hlY2tzdW0gLzg3MTVEQTJGQzEyOEM2RUY4NzlFREY4RUZGMjRBQTc0Cj4+CnN0YXJ0eHJlZgo2MjI5CiUlRU9GCg==", "title": "UploadTest.pdf" }, "provision": { "period": { "start": "2022-05-15", "end": "2022-10-10" } } } '
import requests url = "https://fumage-example.canvasmedical.com/Consent" payload = { "resourceType": "Consent", "status": "active", "scope": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/consentscope", "code": "patient-privacy" } ] }, "category": [ { "coding": [ { "system": "ConsentCoding_System_ConfigureInAdmin", "code": "ConsentCoding_Code_ConfigureInAdmin", "display": "ConsentCoding_Display_ConfigureInAdmin" } ] } ], "patient": { "reference": "Patient/5350cd20de8a470aa570a852859ac87e", "type": "Patient" }, "sourceAttachment": { "contentType": "application/pdf", "data": "JVBERi0xLjYKJcOkw7zDtsOfCjIgMCBvYmoKPDwv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1OTU3IDAwMDAwIG4gCjAwMDAwMDYwNTQgMDAwMDAgbiAKdHJhaWxlcgo8PC9TaXplIDE0L1Jvb3QgMTIgMCBSCi9JbmZvIDEzIDAgUgovSUQgWyA8ODREQjY2QjEwREU5OTRGNzA1ODlCQTNCRjUzODE4RDg+Cjw4NERCNjZCMTBERTk5NEY3MDU4OUJBM0JGNTM4MThEOD4gXQovRG9jQ2hlY2tzdW0gLzg3MTVEQTJGQzEyOEM2RUY4NzlFREY4RUZGMjRBQTc0Cj4+CnN0YXJ0eHJlZgo2MjI5CiUlRU9GCg==", "title": "UploadTest.pdf" }, "provision": { "period": { "start": "2022-05-15", "end": "2022-10-10" } } } 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/Consent/<id>' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json'
import requests url = "https://fumage-example.canvasmedical.com/Consent/<id>" headers = { "accept": "application/json", "Authorization": "Bearer <token>" } response = requests.get(url, headers=headers) print(response.text)
{ "resourceType": "Consent", "id": "a9d3c0d9-e87a-4737-b909-ac81ee62f9a0", "status": "inactive", "scope": { "text": "Unknown" }, "category": [ { "coding": [ { "system": "internal", "display": "Restraints" } ] } ], "patient": { "reference": "Patient/2c4b29a411b043bfb1c34c8c3683c7ca", "type": "Patient" }, "dateTime": "2022-04-13T14:43:32.317476+00:00", "sourceAttachment": { "extension": [ { "url": "http://schemas.canvasmedical.com/fhir/extensions/deprecated-url", "valueUri": "https://canvas-client-media.s3.amazonaws.com/local/UploadTest_RNYbNvp.pdf?AWSAccessKeyId=AKIAQB7SIDR7C2IYANB6&Signature=L%2FPPGh1A9AlUrHFRsiDiqaDYQYE%3D&Expires=1714137914" } ], "url": "https://canvas-client-media.s3.amazonaws.com/training/20220330_211811_60.pdf?AWSAccessKeyId=AKIAQB7SIDR7EI2V32FZ&Signature=h68Xavx0JLoA7zUhBA4bnSeVCvQ%3D&Expires=1693416882" }, "provision": { "period": { "start": "2022-04-13", "end": "2022-12-31" } } }
{ "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 Consent resource '7d1ce256fcd7408193b0459650937a07'" } } ] }
curl --request GET \ --url 'https://fumage-example.canvasmedical.com/Consent?patient=Patient/2c4b29a411b043bfb1c34c8c3683c7ca' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json'
import requests url = "https://fumage-example.canvasmedical.com/Consent?patient=Patient/2c4b29a411b043bfb1c34c8c3683c7ca" headers = { "accept": "application/json", "Authorization": "Bearer <token>" } response = requests.get(url, headers=headers) print(response.text)
{ "resourceType": "Bundle", "type": "searchset", "total": 486, "link": [ { "relation": "self", "url": "/Consent?_count=2&_offset=0" }, { "relation": "first", "url": "/Consent?_count=2&_offset=0" }, { "relation": "next", "url": "/Consent?_count=2&_offset=2" }, { "relation": "last", "url": "/Consent?_count=2&_offset=484" } ], "entry": [ { "resource": { "resourceType": "Consent", "id": "a9d3c0d9-e87a-4737-b909-ac81ee62f9a0", "status": "inactive", "scope": { "text": "Unknown" }, "category": [ { "coding": [ { "system": "internal", "display": "Restraints" } ] } ], "patient": { "reference": "Patient/2c4b29a411b043bfb1c34c8c3683c7ca", "type": "Patient" }, "dateTime": "2022-04-13T14:43:32.317476+00:00", "sourceAttachment": { "extension": [ { "url": "http://schemas.canvasmedical.com/fhir/extensions/deprecated-url", "valueUri": "https://canvas-client-media.s3.amazonaws.com/local/UploadTest_RNYbNvp.pdf?AWSAccessKeyId=AKIAQB7SIDR7C2IYANB6&Signature=L%2FPPGh1A9AlUrHFRsiDiqaDYQYE%3D&Expires=1714137914" } ], "url": "https://canvas-client-media.s3.amazonaws.com/training/20220330_211811_60.pdf?AWSAccessKeyId=AKIAQB7SIDR7EI2V32FZ&Signature=2xQC7mNbJ36CzRkC%2FmlqynHDW%2FU%3D&Expires=1694808853" }, "provision": { "period": { "start": "2022-04-13", "end": "2022-12-31" } } } }, { "resource": { "resourceType": "Consent", "id": "38a78199-e05f-4967-a203-aa6a1fc1b6da", "status": "active", "scope": { "text": "Unknown" }, "category": [ { "coding": [ { "system": "internal", "display": "Photo" } ] } ], "patient": { "reference": "Patient/2c4b29a411b043bfb1c34c8c3683c7ca", "type": "Patient" }, "dateTime": "2022-04-13T14:45:12.460858+00:00", "provision": { "period": { "start": "2022-04-11" } } } } ] }
{ "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" } } ] }