Skip to main content

PrescriptionWidget

A quick-entry widget for creating medication records. For full prescription creation with dosage, priority, and category, use PrescriptionForm.

Usage

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

<PrescriptionWidget
  proxyUrl="/api/clinik"
  patientId="pt_abc123"
  theme="light"
/>

Props

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

Features

  • Quick medication name entry
  • Creates a Medication resource with active status
  • Supports free-text medication names and RxNorm codes
  • Manufacturer and form fields available via the SDK

PrescriptionWidget vs PrescriptionForm

WidgetUse Case
PrescriptionWidgetQuick medication catalog entry (Medication resource)
PrescriptionFormFull prescription with dosage, priority, category, refills (MedicationRequest resource)

Proxy Action

The widget sends medications.create with:
{
  "action": "medications.create",
  "data": {
    "code": "Amoxicillin 500mg",
    "status": "active"
  }
}
The enriched Medication resource also supports manufacturer, amount, ingredient, and batch fields through the SDK.