PrescriptionWidget is a read-oriented medication list widget that displays a patient’s current and historical prescriptions. It shows medication names, structured and text-based dosage instructions, refill counts, days supply, prescriber information, and status badges — all fetched through a backend proxy you control. Use it alongside PrescriptionForm when you need both viewing and authoring in the same application.
Props
URL of your backend proxy endpoint. The widget sends a GET request to this URL and expects a list of FHIR
MedicationRequest resources for the patient.CSS class name applied to the widget’s root element for layout and theming control.
Callback invoked when the widget fails to load prescriptions from your proxy. Use this to display an error state or trigger a retry.
Proxy setup
Your proxy endpoint should return the patient’s prescriptions sorted by date, most recent first:Usage
Features
- Active/inactive filtering: toggle between current and historical prescriptions
- Medication name and code: displays the medication name alongside its RxNorm or NDC code
- Dosage instructions: renders both structured dosage data and free-text sig instructions
- Refill count and supply duration: shows refills remaining and days supply per fill
- Prescriber information: displays the ordering clinician’s name and role
- Status badges: color-coded badges for
active,on-hold,completed, andcancelledstatuses
Prescriptions are stored as FHIR
MedicationRequest resources. If you also use PrescriptionForm, new prescriptions created through the form appear in PrescriptionWidget as soon as your proxy returns the updated list.