MedicationRequest
Work with FHIR R4 4.0.1 MedicationRequest resources.
Choose an operation for this resource:
- Search MedicationRequest
- Read MedicationRequest
- Read MedicationRequest Version
- Create MedicationRequest
- Update MedicationRequest
- Delete MedicationRequest
- Hard Delete MedicationRequest
- Purge Deleted MedicationRequest
The diagram summarizes MedicationRequest requests and responses. See Supported FHIR REST Interactions for the shared interaction model.
FHIR R4 definition: https://hl7.org/fhir/R4/medicationrequest.html. See interaction response codes and common error responses.
Interactions and permissions
- Resource lifecycle: create, read, versioned read, update, soft deletion and version preconditions.
- PUT-as-create and restoration: creation/restoration, server-managed metadata, response headers and return preferences.
- Interaction responses: success
statuscodes. - OperationOutcome errors: common errors and response bodies.
- Batch requests: independent entry processing.
| MedicationRequest capability | Support or requirement |
|---|---|
| Conditional create | Not supported. |
| Conditional update | Not supported. |
| Transaction bundles | Not supported. |
- Authentication and Scopes: bearer tokens, scope configuration and constrained access. Required resource scopes are listed on each operation page.
- Data Deletion and Purge Operations: permanent-deletion eligibility and additional permissions.
- Hard Delete and Purge Deleted: resource endpoints and required scopes; see also shared purge guidance.
Resource content
For shared validation-error responses, see OperationOutcome errors.
| MedicationRequest detail | Requirement or behavior |
|---|---|
| Required content | Supply status, intent, subject, and exactly one of medicationCodeableConcept or medicationReference. |
| Status | Valid R4 status values are active, on-hold, cancelled, completed, entered-in-error, stopped, draft, and unknown. |
| Patient references | The subject references a Patient or Group. |
| Patient references | Patient searches recognize external FHIR Patient URLs without requiring Reference.type. |
| Patient references | For opaque external URLs or identifier-only Patient subjects, supply Reference.type=Patient to identify the target type. |
| Resource rule | DDFS does not retrieve remote resources to determine their type. |
| References | A medicationReference targets Medication. |
| Required content | Supply a valid intent: proposal, plan, order, original-order, reflex-order, filler-order, instance-order, or option. |
| Choice elements | If substitution is supplied, include exactly one allowedBoolean or allowedCodeableConcept. |
| References | reportedBoolean and reportedReference are mutually exclusive. |
| Token filters | Optional identifiers, reasons, supporting references, notes, dosage instructions, dispense details, substitution, narrative, and extensions are preserved. |
| Contained resources | Contained Medication and MedicationRequest resources and their fragment IDs are preserved with the enclosing resource, including historical versions. |
| Contained resources | Local references must resolve within the enclosing resource and satisfy the same R4 target-type restrictions as other references. |
{
"resourceType": "MedicationRequest",
"status": "active",
"intent": "order",
"medicationCodeableConcept": {
"coding": [{"system": "http://www.nlm.nih.gov/research/umls/rxnorm", "code": "860975"}]
},
"subject": {"reference": "Patient/{patient-id}"},
"authoredOn": "2026-01-01"
}
Search
- Search operation: endpoints, complete parameter table, supported forms and examples.
- Common Search Controls: shared controls and server-provided paging links.
- Value Types and Syntax and Comparators, Modifiers, and Chains: shared syntax. Use only the forms supported by this resource.
| MedicationRequest detail | Requirement or behavior |
|---|---|
| Write provenance | Results use a searchset Bundle and support the existing count, total, pagination, sorting, tag, profile, and Provenance reverse-include controls. |
| Limitations | Category, priority, encounter, clinician, and dosage-date searches, additional chains, reverse chains, composites, and full-text search are unsupported. |
| Resource rule | MedicationRequest is available in R4 4.0.1. |
| Limitations | R6 MedicationRequest and US Core certification are unsupported. |
| Resource constraints | Constrained scopes use the same filters. |
| Resource constraints | For example, system/MedicationRequest.rs?patient=Patient/{patient-id}&intent=order permits reads and searches only for matching orders. |
| Resource constraints | Supported constraints include _id, _lastUpdated, identifier, patient, status, intent, code, medication, and authoredon, with the listed modifiers and date bounds. |
| Resource rule | Unsupported or malformed constraints fail closed. |
| Parameter | Meaning |
|---|---|
_id | Logical resource ID, using the current service ID contract. |
_lastUpdated | Last modification time; up to two repeated date bounds. |
identifier | Top-level identifiers, using one unmodified token: value, system|value, |value, or system|. |
patient | Patient subject reference, including the :identifier modifier; Group subjects are not patient matches. |
status | One unmodified R4 status token. The implicit system is http://hl7.org/fhir/CodeSystem/medicationrequest-status; use a code, system|code, or system|. An explicit no-system token such as |active does not match. |
intent | One unmodified R4 intent token. The implicit system is http://hl7.org/fhir/CodeSystem/medicationrequest-intent; use a code, system|code, or system|. An explicit no-system token such as |order does not match. |
code | One unmodified token in the inline medicationCodeableConcept. This does not look up a referenced Medication's code. |
medication | Medication reference, including the :identifier modifier. |
authoredon | MedicationRequest.authoredOn dateTime using eq, ne, gt, lt, ge, le, sa, eb, or ap. Up to two repeated AND values; comma alternatives are unsupported. |
GET /api/fhir/r4/MedicationRequest?patient=Patient/{patient-id}&status=active&code=860975&authoredon=ge2026-01-01&authoredon=lt2027-01-01
Permanent deletion
- Authentication and Scopes: bearer tokens, scope configuration and constrained access. Required resource scopes are listed on each operation page.
- Data Deletion and Purge Operations: permanent-deletion eligibility and additional permissions.
- Hard Delete and Purge Deleted: resource endpoints and required scopes; see also shared purge guidance.