MedicationRequest

An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called “MedicationRequest” rather than “MedicationPrescription” or “MedicationOrder” to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.

http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-medicationrequest.html

FHIR MedicationRequest maps to the Prescribe, Refill, Adjust Prescription, Deny Refill or Approve Refill commands in Canvas.

get
/MedicationRequest/{id}

MedicationRequest read

Read a MedicationRequest resource.

Path Parameters

id required
string
The unique identifier for the MedicationRequest

Response Payload Attributes

resourceType
string

The FHIR Resource name.

id
string

The identifier of the MedicationRequest.

status
enum [ active | entered-in-error | cancelled ]

A code specifying the current state of the order.

intent
enum [ order | filler-order ]

Whether the request is a proposal, plan, or an original order.

A Medication Request that corresponds to a refill in the patient’s chart will have an intent of filler-order while all other Medication Requests will be order.

reportedBoolean
boolean

Indicates if this record was captured as a secondary ‘reported’ record rather than as an original primary source-of-truth record.

Currently this will always be False from Canvas.

medicationCodeableConcept
json

Identifies the medication being requested. This is simply an attribute carrying a code that identifies the medication from a known list of medications.

Click to view child attributes
coding
array[json]

Identifies where the definition of the code comes from.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://www.nlm.nih.gov/research/umls/rxnorm
  • http://www.fdbhealth.com/
code
string

The code of the medication.

display
string

The display name of the coding.

subject
json

Who or group medication request is for.

Click to view child attributes
reference
string

The reference string of the subject in the format of "Patient/a39cafb9d1b445be95a2e2548e12a787".

type
string

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

encounter
json

Encounter created as part of encounter/admission/stay.

Click to view child attributes
reference
string

The reference string of the encounter in the format of "Encounter/f7663d7b-13bd-4236-843e-086306aea125".

type
string

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

authoredOn
datetime

When request was initially authored. In Canvas this corresponds to the time the command was created.

requester
json

Who/What requested the Request.

Click to view child attributes
reference
string

The reference string of the subject in the format of "Practitioner/ed1e304acdb847148338c6b0596d93fd".

type
string

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

performer [deprecated]
json

Intended performer of administration

This attribute is deprecated and will be removed in a future release. It currently (and incorrectly) contains information about the dispenser of the medication. Canvas recommends disregarding this attribute. Information about the dispenser can be obtained from the performer attribute under dispenseRequest.

reasonCode
array[json]

Reason or indication for ordering or not ordering the medication.

In Canvas this represents the indications on a Prescribe/Refill Command.

Click to view child attributes
coding
array[json]

Identifies where the definition of the code comes from.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://hl7.org/fhir/sid/icd-10-cm
code
string

The code of the indication.

display
string

The display name of the coding.

note
array[json]

Information about the prescription.

Click to view child attributes
text
string

The annotation - text content.

dosageInstruction
array[json]

How the medication should be taken.

Click to view child attributes
text
string

Free text dosage instructions. In Canvas this text comes from the SIG or DIRECTIONS field on the associated command.

doseAndRate
array[json]

Amount of medication administered.

Click to view child attributes
doseQuantity
json

Amount of medication per dose.

Click to view child attributes
unit
string

Unit representation.

dispenseRequest
json

Medication supply authorization.

Click to view child attributes
numberOfRepeatsAllowed
integer

Number of refills authorized.

quantity
json

Amount of medication to supply per dispense.

Click to view child attributes
value
decimal

Numerical value.

expectedSupplyDuration
json

Number of days supply per dispense.

Click to view child attributes
value
integer

Numerical value.

unit
string

Unit representation.

Value Options Supported:
  • days
performer
json

Intended dispenser. In Canvas this represents the pharmacy the medication request was sent to.

Click to view child attributes
display
string

Text alternative for the resource.

This display name concatenates the following information about the pharmacy: Name, NCPDP ID, Address, Phone, and Fax

substitution
json

Any restrictions on medication substitution.

Click to view child attributes
allowedBoolean
boolean

Whether substitution is allowed or not.

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.

Query Parameters

_id
string

The identifier of the MedicationRequest.

intent
string

Search Medication Requests by specific intents.

Search Values Supported:
  • order
  • filler-order
patient
string

The patient reference associated to the Medication Request in the format Patient/a39cafb9d1b445be95a2e2548e12a787.

requester
string

The Practitioner reference associated to the MedicationRequest.requester attribute in the format Practitioner/6c20b7152cf7421791c5ab4113060b3f.

status
string

Search Medication Requests by a specific status.

Search Values Supported:
  • active
  • entered-in-error
  • 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

resourceType
string

The FHIR Resource name.

id
string

The identifier of the MedicationRequest.

status
enum [ active | entered-in-error | cancelled ]

A code specifying the current state of the order.

intent
enum [ order | filler-order ]

Whether the request is a proposal, plan, or an original order.

A Medication Request that corresponds to a refill in the patient’s chart will have an intent of filler-order while all other Medication Requests will be order.

reportedBoolean
boolean

Indicates if this record was captured as a secondary ‘reported’ record rather than as an original primary source-of-truth record.

Currently this will always be False from Canvas.

medicationCodeableConcept
json

Identifies the medication being requested. This is simply an attribute carrying a code that identifies the medication from a known list of medications.

Click to view child attributes
coding
array[json]

Identifies where the definition of the code comes from.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://www.nlm.nih.gov/research/umls/rxnorm
  • http://www.fdbhealth.com/
code
string

The code of the medication.

display
string

The display name of the coding.

subject
json

Who or group medication request is for.

Click to view child attributes
reference
string

The reference string of the subject in the format of "Patient/a39cafb9d1b445be95a2e2548e12a787".

type
string

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

encounter
json

Encounter created as part of encounter/admission/stay.

Click to view child attributes
reference
string

The reference string of the encounter in the format of "Encounter/f7663d7b-13bd-4236-843e-086306aea125".

type
string

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

authoredOn
datetime

When request was initially authored. In Canvas this corresponds to the time the command was created.

requester
json

Who/What requested the Request.

Click to view child attributes
reference
string

The reference string of the subject in the format of "Practitioner/ed1e304acdb847148338c6b0596d93fd".

type
string

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

performer [deprecated]
json

Intended performer of administration

This attribute is deprecated and will be removed in a future release. It currently (and incorrectly) contains information about the dispenser of the medication. Canvas recommends disregarding this attribute. Information about the dispenser can be obtained from the performer attribute under dispenseRequest.

reasonCode
array[json]

Reason or indication for ordering or not ordering the medication.

In Canvas this represents the indications on a Prescribe/Refill Command.

Click to view child attributes
coding
array[json]

Identifies where the definition of the code comes from.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://hl7.org/fhir/sid/icd-10-cm
code
string

The code of the indication.

display
string

The display name of the coding.

note
array[json]

Information about the prescription.

Click to view child attributes
text
string

The annotation - text content.

dosageInstruction
array[json]

How the medication should be taken.

Click to view child attributes
text
string

Free text dosage instructions. In Canvas this text comes from the SIG or DIRECTIONS field on the associated command.

doseAndRate
array[json]

Amount of medication administered.

Click to view child attributes
doseQuantity
json

Amount of medication per dose.

Click to view child attributes
unit
string

Unit representation.

dispenseRequest
json

Medication supply authorization.

Click to view child attributes
numberOfRepeatsAllowed
integer

Number of refills authorized.

quantity
json

Amount of medication to supply per dispense.

Click to view child attributes
value
decimal

Numerical value.

expectedSupplyDuration
json

Number of days supply per dispense.

Click to view child attributes
value
integer

Numerical value.

unit
string

Unit representation.

Value Options Supported:
  • days
performer
json

Intended dispenser. In Canvas this represents the pharmacy the medication request was sent to.

Click to view child attributes
display
string

Text alternative for the resource.

This display name concatenates the following information about the pharmacy: Name, NCPDP ID, Address, Phone, and Fax

substitution
json

Any restrictions on medication substitution.

Click to view child attributes
allowedBoolean
boolean

Whether substitution is allowed or not.

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 GET \
         --url 'https://fumage-example.canvasmedical.com/MedicationRequest/<id>' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/MedicationRequest/<id>"
    
    headers = {
        "accept": "application/json",
        "Authorization": "Bearer <token>"
    }
    
    response = requests.get(url, headers=headers)
    
    print(response.text)
    
  • {
        "resourceType": "MedicationRequest",
        "id": "3423a69c-618d-4cbe-861a-54c60f48744e",
        "status": "active",
        "intent": "order",
        "reportedBoolean": false,
        "medicationCodeableConcept": {
            "coding": [
                {
                    "system": "http://www.fdbhealth.com/",
                    "code": "244899",
                    "display": "lisinopril 10 mg tablet"
                },
                {
                    "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                    "code": "314076",
                    "display": "lisinopril 10 mg tablet"
                }
            ]
        },
        "subject": {
            "reference": "Patient/6cb2a409334943c2b48f1686dc739f11",
            "type": "Patient"
        },
        "encounter": {
            "reference": "Encounter/bdadce18-098b-40dc-8bdd-ef8481bd999a",
            "type": "Encounter"
        },
        "authoredOn": "2023-09-21T18:19:36.106449+00:00",
        "requester": {
            "reference": "Practitioner/6c20b7152cf7421791c5ab4113060b3f",
            "type": "Practitioner"
        },
        "reasonCode": [
            {
                "coding": [
                    {
                        "system": "http://hl7.org/fhir/sid/icd-10-cm",
                        "code": "I10",
                        "display": "Essential (primary) hypertension"
                    }
                ]
            }
        ],
        "dosageInstruction": [
            {
                "text": "take 1 daily",
                "doseAndRate": [
                    {
                        "doseQuantity": {
                            "unit": "Tablet"
                        }
                    }
                ]
            }
        ],
        "dispenseRequest": {
            "numberOfRepeatsAllowed": 3,
            "quantity": {
                "value": 30.0
            },
            "expectedSupplyDuration": {
                "value": 30,
                "unit": "days"
            },
            "performer": {
                "display": "Name: CVS Health #68534|NCPDP ID: 0068534|Address: 1 Cvs Dr, Woonsocket, RI, 028956146|Phone: 4017702500|Fax: 4017704486"
            }
        },
        "substitution": {
            "allowedBoolean": true
        }
    }
    
  • {
      "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 MedicationRequest resource 'a47c7b0e-bbb4-42cd-bc4a-df259d148ea1'"
          }
        }
      ]
    }
    
  • curl --request GET \
         --url 'https://fumage-example.canvasmedical.com/MedicationRequest?patient=Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/MedicationRequest?patient=Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0"
    
    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": "/MedicationRequest?patient=Patient%2F6cb2a409334943c2b48f1686dc739f11&_count=10&_offset=0"
            },
            {
                "relation": "first",
                "url": "/MedicationRequest?patient=Patient%2F6cb2a409334943c2b48f1686dc739f11&_count=10&_offset=0"
            },
            {
                "relation": "last",
                "url": "/MedicationRequest?patient=Patient%2F6cb2a409334943c2b48f1686dc739f11&_count=10&_offset=0"
            }
        ],
        "entry": [
            {
                "resource": {
                    "resourceType": "MedicationRequest",
                    "id": "3423a69c-618d-4cbe-861a-54c60f48744e",
                    "status": "active",
                    "intent": "order",
                    "reportedBoolean": false,
                    "medicationCodeableConcept": {
                        "coding": [
                            {
                                "system": "http://www.fdbhealth.com/",
                                "code": "244899",
                                "display": "lisinopril 10 mg tablet"
                            },
                            {
                                "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                                "code": "314076",
                                "display": "lisinopril 10 mg tablet"
                            }
                        ]
                    },
                    "subject": {
                        "reference": "Patient/6cb2a409334943c2b48f1686dc739f11",
                        "type": "Patient"
                    },
                    "encounter": {
                        "reference": "Encounter/bdadce18-098b-40dc-8bdd-ef8481bd999a",
                        "type": "Encounter"
                    },
                    "authoredOn": "2023-09-21T18:19:36.106449+00:00",
                    "requester": {
                        "reference": "Practitioner/6c20b7152cf7421791c5ab4113060b3f",
                        "type": "Practitioner"
                    },
                    "reasonCode": [
                        {
                            "coding": [
                                {
                                    "system": "http://hl7.org/fhir/sid/icd-10-cm",
                                    "code": "I10",
                                    "display": "Essential (primary) hypertension"
                                }
                            ]
                        }
                    ],
                    "dosageInstruction": [
                        {
                            "text": "take 1 daily",
                            "doseAndRate": [
                                {
                                    "doseQuantity": {
                                        "unit": "Tablet"
                                    }
                                }
                            ]
                        }
                    ],
                    "dispenseRequest": {
                        "numberOfRepeatsAllowed": 3,
                        "quantity": {
                            "value": 30.0
                        },
                        "expectedSupplyDuration": {
                            "value": 30,
                            "unit": "days"
                        },
                        "performer": {
                            "display": "Name: CVS Health #68534|NCPDP ID: 0068534|Address: 1 Cvs Dr, Woonsocket, RI, 028956146|Phone: 4017702500|Fax: 4017704486"
                        }
                    },
                    "substitution": {
                        "allowedBoolean": true
                    }
                }
            }
        ]
    }
    
  • {
      "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"
          }
        }
      ]
    }