Skip to main content

PrescriptionForm

A form widget for creating medication prescriptions with full FHIR MedicationRequest field support.

Usage

import { PrescriptionForm } from '@clinikapi/react';

<PrescriptionForm
  proxyUrl="/api/clinik"
  patientId="pt_abc123"
  prescriberId="prac_def456"
  theme="light"
/>

Props

PropTypeRequiredDescription
proxyUrlstringYesBackend proxy URL
patientIdstringYesPatient ID
prescriberIdstringNoPrescribing practitioner ID
theme'light' | 'dark'NoColor theme

Form Fields

FieldDescription
MedicationMedication name or RxNorm code
DosageHuman-readable dosage instructions
PriorityRoutine, urgent, asap, stat
CategoryOutpatient, inpatient, community, discharge
FrequencyOnce, twice, three, or four times daily
DurationNumber of days
QuantityNumber of units to dispense
RefillsNumber of refills (0-12)
Course of therapyContinuous, acute, seasonal
Generic substitutionAllow/disallow generic substitution
Pharmacist notesAdditional notes for the pharmacist

Proxy Action

The widget sends prescriptions.create with:
{
  "action": "prescriptions.create",
  "data": {
    "patientId": "pt_abc123",
    "prescriberId": "prac_def456",
    "medication": "Amoxicillin 500mg",
    "status": "active",
    "intent": "order",
    "priority": "routine",
    "category": "outpatient",
    "courseOfTherapy": "acute",
    "substitutionAllowed": true,
    "dosageText": "Take 1 capsule three times daily",
    "dosage": { "frequency": 3, "period": 7, "periodUnit": "d" },
    "refills": 0,
    "quantity": { "value": 21, "unit": "tablets" },
    "supplyDays": 7
  }
}