Overview

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.

Each MedicationRequest has next elements:

  • a status
  • an intent code
  • a medication*
  • a patient
  • a prescriber

Each MedicationRequest supports next elements:

  • the category (e.g. Discharge Medication)
  • the reported flag or reference signaling that information is from a secondary source such as a patient
  • the encounters
  • a date for when written
  • the prescription Sig

Profile specific implementation guidance:

  • See the Medication List section for guidance on accessing a patient medications including over the counter (OTC) medication and other substances taken for medical and recreational use.
  • *The MedicationRequest resources can represent a medication using either a code, or reference a Medication resource.
    • When referencing a Medication resource, the resource may be contained or an external resource.
    • The server systems are not required to support both a code and a reference, but SHALL support at least one of these methods.
    • If an external reference to Medication is used, the server SHALL support the _include parameter for searching this element.
    • The client application SHALL support all methods.
  • The MedicationRequest resource can represent that information is from a secondary source using either a boolean flag or a reference using MedicationRequest.reportedReference.
    • Although both are marked as must support, the server system is not required to support both a boolean and a reference, but SHALL support at least one of these elements.
    • The client application SHALL support both elements.
  • Source EHR identifiers SHOULD be included to support deduplication across MedicationRequest resources. Exposing the EHR identifiers helps client applications identify duplicates.
  • Servers SHALL follow the guidance in the Medication List page and return all active Medications as MedicationRequest. It is always best practice to confirm this list with the Patient or Caregiver.

This resource conforms to USCDI V2 profile for MedicationRequest - refer to US Core MedicationRequest Profile. MedicationRequest response will be provided in JSON (refers to Capability Statement) format as per FHIR standard R4 version.

USCore Data ElementFHIR Resource Field
statusmedicationRequest.status
intent codemedicationRequest.intent
medicationmedicationRequest.medication
patientmedicationRequest.subject
date when writtenmedicationRequest.authoredOn
prescribermedicationRequest.requester

Must support elements, mandatory and optional search parameters

MedicationRequest must support these elements:

  • status
  • intent
  • subject
  • Slices for category
    • category:us-core
  • reported[x]
    • reportedBoolean
    • reportedReference
  • medication[x]
  • subject
  • encounter

The following search parameters and search parameter combinations SHALL be supported:
SHALL support searching using the combination of the patient and intent search parameters:

  • including support for OR search on intent (e.g.intent={system|}[code],{system|}[code],...)

GET [base url]/MedicationRequest?patient={Type/}[id]&intent=order,plan&encounter={Type/}[encounter_id]

SHALL support searching using the combination of the patient and intent and status search parameters:

  • including support for OR search on intent (e.g.intent={system|}[code],{system|}[code],...)
  • including support for OR search on status (e.g.status={system|}[code],{system|}[code],...)

GET [base url]/MedicationRequest?patient={Type/}[id]&intent=order,plan&status={system|}[code]

The following search parameter combinations SHOULD be supported (optional):

SHOULD support searching using the combination of the patient and intent and encounter search parameters:
including support for OR search on intent (e.g.intent={system|}[code],{system|}[code],...)

GET [base url]/MedicationRequest?patient={Type/}[id]&intent=order,plan&encounter={Type/}[encounter_id]

SHOULD support searching using the combination of the patient and intent and authoredon search parameters:

  • including support for OR search on intent (e.g.intent={system|}[code],{system|}[code],...)
  • including support for these authoredon comparators: gt,lt,ge,le
  • including optional support for AND search on authoredon (e.g.authoredon=[date]&authoredon=[date]&...)

GET [base url]/MedicationRequest?patient={Type/}[id]&intent=order,plan&authoredon={gt|lt|ge|le}[date]&authoredon={gt|lt|ge|le}[date]

The response to any search operation is always a list of resources in a Bundle or an Operation Outcome.

MedicationRequest By Patient Id

Search for MedicationRequest by patient.

METHOD GET

[base url]/MedicationRequest?patient={Type/}[id]

PARAMS
[base url] - FHIR base url
[id] - Id for the Patient

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/MedicationRequest?patient=Patient/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

MedicationRequest By Id

Get MedicationRequest by ID.

METHOD GET

[base url]/MedicationRequest/{id}

or

[base url]/MedicationRequest?_id={id}

PARAMS
[base url] - FHIR base url
{id} - Id for MedicationRequest resource

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/MedicationRequest/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

MedicationRequest by patient and intent search parameters

Get MedicationRequests using the combination of the patient and intent search parameters

METHOD GET

GET [base url]/MedicationRequest?patient={Type/}[id]&intent=order,plan&status={system|}[code]

PARAMS
[base url] - FHIR base url
{Type/} - Type for the Reference. Example: Patient
[id] - patient id
{system|} - terminology system used to identify medication request status
[code] - status of the medication request

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/MedicationRequest?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&intent=order,plan&status=active' \
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'

MedicationRequest by patient and intent and encounter search parameters:

Get MedicationRequests using the combination of the patient and intent and encounter search parameters

METHOD GET

GET [base url]/MedicationRequest?patient=Patient/[id]&intent=order,plan&encounter=Encounter/{encounter_id}

PARAMS
[base url] - FHIR base url
[id] - patient id
{encounter_id} - encounter id

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/MedicationRequest?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&target-date=ge2015-01-14&target-date=le2019-01-14 \
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'

MedicationRequest by patient and intent and authoredon search parameters

Get MedicationRequests using the combination of the patient and intent and authoredon search parameters
METHOD GET

GET [base url]/MedicationRequest?patient=Patient/[id]&intent=order,plan&authoredon={gt|lt|ge|le}[date]

PARAMS
[base url] - FHIR base url
{Type/} - Type for the Reference. Example: Patient
[id] - patient id
[date] -date when medication request was authored on

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/MedicationRequest?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&patient=1137192&intent=order,plan&authoredon=ge2019-01-01T00:00:00Z \
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'