MedicationStatement
Work with FHIR R4 4.0.1 MedicationStatement resources.
Choose an operation for this resource:
- Search MedicationStatement
- Read MedicationStatement
- Read MedicationStatement Version
- Create MedicationStatement
- Update MedicationStatement
- Delete MedicationStatement
- Hard Delete MedicationStatement
- Purge Deleted MedicationStatement
The diagram summarizes MedicationStatement requests and responses. See Supported FHIR REST Interactions for the shared interaction model.
FHIR R4 definition: https://hl7.org/fhir/R4/medicationstatement.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.
| MedicationStatement 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.
| MedicationStatement detail | Requirement or behavior |
|---|---|
| Required content | Supply status, subject, and exactly one of medicationCodeableConcept or medicationReference. |
| Status | Valid R4 status values are active, completed, entered-in-error, intended, stopped, on-hold, unknown, and not-taken. |
| 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 at most one of effectiveDateTime and effectivePeriod. |
| Token filters | Optional identifiers, reasons, supporting references, notes, dosage, narrative, and extensions are preserved. |
| Contained resources | Contained Medication and MedicationStatement 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": "MedicationStatement",
"status": "active",
"medicationCodeableConcept": {
"coding": [{"system": "http://www.nlm.nih.gov/research/umls/rxnorm", "code": "860975"}]
},
"subject": {"reference": "Patient/{patient-id}"},
"effectivePeriod": {"start": "2026-01-01", "end": "2026-12-31"}
}
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.
| MedicationStatement 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 | Encounter/context, clinician/organization, detailed dosage searches, new chains, reverse chains, composites, and full-text search are not supported. |
| Limitations | R6 support and US Core certification are not supported. |
| 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/medication-statement-status; use a code, system|code, or system|. An explicit no-system token such as |active 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. |
| effective | DateTime or Period overlap 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/MedicationStatement?patient=Patient/{patient-id}&status=active&code=860975&effective=ge2026-01-01&effective=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.