MedicationRequest
Overview
The MedicationRequest resource represents orders or requests for medication supply and administration instructions. This resource supports both inpatient and outpatient medication workflows, including prescriptions, care plans, and treatment protocols.
Important: Always validate MedicationRequest resource support and available operations by retrieving the current CapabilityStatement from /metadata before implementing integrations.
Resource Schema
The MedicationRequest resource follows the HL7 FHIR R4 MedicationRequest specification.
Key elements include:
identifier- External identifiers for the requeststatus- Active, on-hold, cancelled, completed, entered-in-error, stopped, draft, unknownstatusReason- Reason for current statusintent- Proposal, plan, order, original-order, reflex-order, filler-order, instance-order, optioncategory- Type of medication usagepriority- Routine, urgent, asap, statdoNotPerform- True if request is prohibiting actionreportedBoolean- Reported rather than primary recordreportedReference- Person or organization that provided informationmedicationCodeableConcept- Medication to be takenmedicationReference- Medication to be takensubject- Who or group medication request is forencounter- Encounter created as part of encountersupportingInformation- Information to support orderingauthoredOn- When request was initially authoredrequester- Who/What requested the medicationperformer- Intended performer of administrationperformerType- Desired kind of performerrecorder- Person who entered the requestreasonCode- Reason or indication for ordering medicationreasonReference- Condition or observation that supports why medication was orderedinstantiatesCanonical- Instantiates FHIR protocol or definitioninstantiatesUri- Instantiates external protocol or definitionbasedOn- What request fulfillsgroupIdentifier- Composite request this is part ofcourseOfTherapyType- Overall pattern of medication administrationinsurance- Associated insurance coveragenote- Information about the prescriptiondosageInstruction- How medication should be takendispenseRequest- Medication supply authorizationsubstitution- Any restrictions on medication substitutionpriorPrescription- An order/prescription that is being replaceddetectedIssue- Clinical issue with actioneventHistory- A list of events of interest in the lifecycle
Example MedicationRequest Resource
{
"resourceType": "MedicationRequest",
"id": "12345",
"identifier": [{
"use": "official",
"system": "http://hospital.example.org/prescriptions",
"value": "RX-2024-001"
}],
"status": "active",
"intent": "order",
"category": [{
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
"code": "outpatient",
"display": "Outpatient"
}]
}],
"priority": "routine",
"medicationCodeableConcept": {
"coding": [{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "197361",
"display": "Lisinopril 10 MG Oral Tablet"
}]
},
"subject": {
"reference": "Patient/12345"
},
"encounter": {
"reference": "Encounter/67890"
},
"authoredOn": "2024-01-15T10:30:00Z",
"requester": {
"reference": "Practitioner/67890"
},
"reasonCode": [{
"coding": [{
"system": "http://snomed.info/sct",
"code": "38341003",
"display": "Hypertensive disorder"
}]
}],
"dosageInstruction": [{
"sequence": 1,
"text": "Take one tablet by mouth once daily",
"timing": {
"repeat": {
"frequency": 1,
"period": 1,
"periodUnit": "d"
}
},
"route": {
"coding": [{
"system": "http://snomed.info/sct",
"code": "26643006",
"display": "Oral route"
}]
},
"doseAndRate": [{
"type": {
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/dose-rate-type",
"code": "ordered",
"display": "Ordered"
}]
},
"doseQuantity": {
"value": 1,
"unit": "tablet",
"system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
"code": "TAB"
}
}]
}],
"dispenseRequest": {
"validityPeriod": {
"start": "2024-01-15",
"end": "2024-04-15"
},
"numberOfRepeatsAllowed": 2,
"quantity": {
"value": 30,
"unit": "tablet",
"system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
"code": "TAB"
},
"expectedSupplyDuration": {
"value": 30,
"unit": "days",
"system": "http://unitsofmeasure.org",
"code": "d"
}
}
}
Supported Profiles
This API supports the following FHIR profiles:
Operations
The General Purpose FHIR R4 MedicationRequest resource supports the following standard operations. However, support varies by the targeted CareRecord or solution.
| CareRecord / Solution | Create | Read | Update | Search |
|---|---|---|---|---|
| GEHRIMED | - | Yes | - | Yes |
| myAvatar | Yes | Yes | Yes | Yes |
| myEvolv | - | Yes | - | Yes |
| myUnity | - | Yes | - | Yes |
| Referral Manager | - | - | - | - |
Search
Not all Netsmart solutions support MedicationRequest search. See supported operations table above and consult your target solution's documentation for more information.
This resource supports a combination of standard and custom search parameters in addition to the common parameters.
Standard Parameters
| Name | Type | Description |
|---|---|---|
| patient | reference | REQUIRED Returns prescriptions for a specific patient. |
| authoredon | date | Return prescriptions written on this date |
| encounter | reference | Return prescriptions with this encounter identifier |
Custom Parameters
| Name | Type | Description |
|---|---|---|
| end | date | Deprecated. Use date parameter with le prefix instead. |
| start | date | Deprecated. Use date parameter with ge prefix instead. |
| lastUpdated | date | Return data that was updated on a specific date |
| text | string | Search text |
Search Examples
The POST method is recommended as it keeps health information out of the URL.
- Production
- Preview
curl -X POST https://fhir.netsmartcloud.com/v4/MedicationRequest/_search \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d "patient=Patient/345" \
curl -X POST https://fhirtest.netsmartcloud.com/v4/MedicationRequest/_search \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d "patient=Patient/345" \
Error Handling
For information about error responses when working with MedicationRequest resources, see Common Errors.
Common MedicationRequest-related errors include:
- Missing required patient reference
- Invalid medication codes or RxNorm codes
- Malformed dosage instructions
- Invalid requester or performer references
Integration Patterns
Medication History
Retrieve patient's medication orders:
# Get all medication requests for patient
curl -X GET "https://fhir.netsmartcloud.com/v4/MedicationRequest?patient=12345" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/fhir+json"
Clinical Decision Support
Check for drug interactions and allergies:
# Get active medication requests
curl -X GET "https://fhir.netsmartcloud.com/v4/MedicationRequest?patient=12345&status=active" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/fhir+json"
Prescription Tracking
Track prescriptions by encounter:
# Get medications prescribed during encounter
curl -X GET "https://fhir.netsmartcloud.com/v4/MedicationRequest?encounter=67890" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/fhir+json"
Provider Workflows
Track prescriptions by prescriber:
# Get medications by authored date
curl -X GET "https://fhir.netsmartcloud.com/v4/MedicationRequest?patient=12345&authoredon=ge2024-01-01" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/fhir+json"
Relationships to Other Resources
The MedicationRequest resource connects to many clinical and administrative resources:
- Patient - The individual for whom medication is prescribed
- Practitioner - Healthcare providers prescribing medications
- Encounter - Clinical encounters during which medications are prescribed
- Condition - Health conditions being treated with medications
- AllergyIntolerance - Allergies that affect medication selection
- Organization - Healthcare organizations managing prescriptions
- Coverage - Insurance coverage for medications
Support
For questions about MedicationRequest resource implementation or prescription workflows, contact Netsmart support through your designated support channels.