PrescriptionForm is a structured data-entry widget for creating and editing medication prescriptions. Clinicians can search for medications by RxNorm code, fill in dosage instructions, set refill quantities, toggle generic substitution, and add pharmacist notes — all from within your React application. Every submission is routed through a backend proxy that you control, keeping your API key off the browser.
Props
URL of your backend proxy endpoint. The widget sends GET requests to load an existing prescription for editing and POST requests to create a new one. Supply a prescription-specific path (e.g.
/api/clinik/prescriptions/rx-id) to load an existing record.CSS class name applied to the widget’s root element for layout and theming control.
Callback invoked when a fetch or submission request to your proxy fails. Use this to surface error messages to the clinician.
Proxy setup
Your proxy endpoint needs to handle POST requests to create prescriptions. Add a GET handler if you want to support loading an existing prescription for editing:Usage
Features
- Medication search with RxNorm code lookup
- Structured dosage input: dose amount, frequency, and route of administration
- Refill and supply fields: quantity and days supply
- Substitution toggle: allow or disallow generic substitution
- Pharmacist notes: free-text instructions for the dispensing pharmacist
The form submits a FHIR
MedicationRequest resource. All fields map to standard FHIR elements, so data is immediately interoperable with other systems that consume ClinikAPI data.