MedicationStatement
A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient’s memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains.
https://hl7.org/fhir/R4/medicationstatement.html
MedicationStatement resources can be created in several ways. Canvas Prescribe commands create MedicationRequest resources, but these Prescribe
commands are also represented as MedicationStatement resources. MedicationStatement resources that were created with a Prescribe
command will contain a reference to the related MedicationRequest resource in the derivedFrom
attribute.
MedicationStatement resources can also be created with the Medication Statement
command. See our Zendesk article for more information.
Attributes
The identifier of the MedicationStatement
A code representing the patient or other source’s judgment about the state of the medication used that this statement is about
Supported codes for create interactions are: active, entered-in-error, stopped
What medication was taken
Who is/was taking the medication
Encounter / Episode associated with MedicationStatement
The context
attribute is accepted by create and update interactions, but is not returned by read or search interactions.
Canvas does not currently support concurrent creation of resources on the same encounter. Please avoid issuing concurrent requests that reference the same encounter to this endpoint, or to any other endpoints that reference encounters. It is OK to issue concurrent requests to these endpoints as long as the requests reference different encounters.
The interval when the medication is/was/will be taken
When the statement was asserted
Additional supporting information
Details of how medication is/was taken or should be taken
The text
attribute for the Dosage object contains the SIG.
MedicationStatement create
Create a MedicationStatement resource.
If context
is provided, the MedicationStatement will be added to the existing encounter (note). If it is not provided, a new data import note will be created.
Create requests support either medicationReference
or medicationCodeableConcept
in the request body; Canvas recommends using medicationReference
. Medication identifiers for medicationReference
can be obtained from the Medication search endpoint.
Attributes
The identifier of the MedicationStatement
A code representing the patient or other source’s judgment about the state of the medication used that this statement is about
Supported codes for create interactions are: active, entered-in-error, stopped
What medication was taken
Who is/was taking the medication
Encounter / Episode associated with MedicationStatement
The context
attribute is accepted by create and update interactions, but is not returned by read or search interactions.
Canvas does not currently support concurrent creation of resources on the same encounter. Please avoid issuing concurrent requests that reference the same encounter to this endpoint, or to any other endpoints that reference encounters. It is OK to issue concurrent requests to these endpoints as long as the requests reference different encounters.
The interval when the medication is/was/will be taken
When the statement was asserted
Additional supporting information
Details of how medication is/was taken or should be taken
The text
attribute for the Dosage object contains the SIG.
Responses
Errors
MedicationStatement read
Read an MedicationStatement resource.
Read responses will always contain a medicationCodeableConcept
regardless of what was used to create the MedicationStatement.
Path Parameters
Responses
Errors
MedicationStatement update
Update an MedicationStatement resource.
The only type of MedicationStatement update interaction that is supported by Canvas is to mark an existing MedicationStatement as entered-in-error. No changes to other fields will be processed.
Attributes
The identifier of the MedicationStatement
A code representing the patient or other source’s judgment about the state of the medication used that this statement is about
Supported codes for create interactions are: active, entered-in-error, stopped
What medication was taken
Who is/was taking the medication
Encounter / Episode associated with MedicationStatement
The context
attribute is accepted by create and update interactions, but is not returned by read or search interactions.
Canvas does not currently support concurrent creation of resources on the same encounter. Please avoid issuing concurrent requests that reference the same encounter to this endpoint, or to any other endpoints that reference encounters. It is OK to issue concurrent requests to these endpoints as long as the requests reference different encounters.
The interval when the medication is/was/will be taken
When the statement was asserted
Additional supporting information
Details of how medication is/was taken or should be taken
The text
attribute for the Dosage object contains the SIG.
Responses
Errors
MedicationStatement search
Search for MedicationStatement resources.
Search bundle entries will always contain values for medicationCodeableConcept
regardless of what was used to create the MedicationStatement.
Query Parameters
The identifier of the MedicationStatement
Returns statements for a specific patient
Responses
Errors
curl --request POST \ --url 'https://fumage-example.canvasmedical.com/MedicationStatement' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "resourceType": "MedicationStatement", "status": "active", "medicationReference": { "reference": "Medication/fdb-449732", "display": "Tylenol PM Extra Strength 25 mg-500 mg tablet" }, "subject": { "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0" }, "context": { "reference": "Encounter/eae3c8a5-a129-4960-9715-fc26da30eccc" }, "effectivePeriod": { "start": "2023-06-15T15:00:00-04:00", "end": "2023-06-25T15:00:00-04:00" }, "dosage": [ { "text": "1-2 tablets once daily at bedtime as needed for restless legs" } ] }'
import requests url = "https://fumage-example.canvasmedical.com/MedicationStatement" headers = { "accept": "application/json", "Authorization": "Bearer <token>", "content-type": "application/json" } payload = { "resourceType": "MedicationStatement", "status": "active", "medicationReference": { "reference": "Medication/fdb-449732", "display": "Tylenol PM Extra Strength 25 mg-500 mg tablet" }, "subject": { "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0" }, "context": { "reference": "Encounter/eae3c8a5-a129-4960-9715-fc26da30eccc" }, "effectivePeriod": { "start": "2023-06-15T15:00:00-04:00", "end": "2023-06-25T15:00:00-04:00" }, "dosage": [ { "text": "1-2 tablets once daily at bedtime as needed for restless legs" } ] } 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/MedicationStatement/<id>' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json'
import requests url = "https://fumage-example.canvasmedical.com/MedicationStatement/<id>" headers = { "accept": "application/json", "Authorization": "Bearer <token>" } response = requests.get(url, headers=headers) print(response.text)
{ "resourceType": "MedicationStatement", "status": "active", "medicationReference": { "reference": "Medication/fdb-449732", "display": "Tylenol PM Extra Strength 25 mg-500 mg tablet" }, "subject": { "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0" }, "context": { "reference": "Encounter/eae3c8a5-a129-4960-9715-fc26da30eccc" }, "effectivePeriod": { "start": "2023-06-15T15:00:00-04:00", "end": "2023-06-25T15:00:00-04:00" }, "dosage": [ { "text": "1-2 tablets once daily at bedtime as needed for restless legs" } ] }
{ "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 MedicationStatement resource 'a47c7b0e-bbb4-42cd-bc4a-df259d148ea1'" } } ] }
curl --request PUT \ --url 'https://fumage-example.canvasmedical.com/MedicationStatement/<id>' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "resourceType": "MedicationStatement", "status": "entered-in-error", "medicationReference": { "reference": "Medication/fdb-449732", "display": "Tylenol PM Extra Strength 25 mg-500 mg tablet" }, "subject": { "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0" }, "context": { "reference": "Encounter/eae3c8a5-a129-4960-9715-fc26da30eccc" }, "effectivePeriod": { "start": "2023-06-15T15:00:00-04:00", "end": "2023-06-25T15:00:00-04:00" }, "dosage": [ { "text": "1-2 tablets once daily at bedtime as needed for restless legs" } ] }'
import requests url = "https://fumage-example.canvasmedical.com/MedicationStatement/<id>" headers = { "accept": "application/json", "Authorization": "Bearer <token>", "content-type": "application/json" } payload = { "resourceType": "MedicationStatement", "status": "entered-in-error", "medicationReference": { "reference": "Medication/fdb-449732", "display": "Tylenol PM Extra Strength 25 mg-500 mg tablet" }, "subject": { "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0" }, "context": { "reference": "Encounter/eae3c8a5-a129-4960-9715-fc26da30eccc" }, "effectivePeriod": { "start": "2023-06-15T15:00:00-04:00", "end": "2023-06-25T15:00:00-04:00" }, "dosage": [ { "text": "1-2 tablets once daily at bedtime as needed for restless legs" } ] } 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 MedicationStatement 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/MedicationStatement?patient=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json'
import requests url = "https://fumage-example.canvasmedical.com/MedicationStatement?patient=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0" 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": "/MedicationStatement?patient=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0&_count=10&_offset=0" }, { "relation": "first", "url": "/MedicationStatement?patient=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0&_count=10&_offset=0" }, { "relation": "last", "url": "/MedicationStatement?patient=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0&_count=10&_offset=0" } ], "entry": [ { "resource": { "resourceType": "MedicationStatement", "status": "active", "medicationReference": { "reference": "Medication/fdb-449732", "display": "Tylenol PM Extra Strength 25 mg-500 mg tablet" }, "subject": { "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0" }, "context": { "reference": "Encounter/eae3c8a5-a129-4960-9715-fc26da30eccc" }, "effectivePeriod": { "start": "2023-06-15T15:00:00-04:00", "end": "2023-06-25T15:00:00-04:00" }, "dosage": [ { "text": "1-2 tablets once daily at bedtime as needed for restless legs" } ] } } ] }
{ "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" } } ] }