> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clinikapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PrescriptionWidget

> Quick medication entry widget for creating medication records.

# PrescriptionWidget

A quick-entry widget for creating medication records. For full prescription creation with dosage, priority, and category, use [PrescriptionForm](/components/prescription-form).

## Usage

```tsx theme={null}
import { PrescriptionWidget } from '@clinikapi/react';

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

## Props

| Prop        | Type                | Required | Description       |
| ----------- | ------------------- | -------- | ----------------- |
| `proxyUrl`  | `string`            | Yes      | Backend proxy URL |
| `patientId` | `string`            | Yes      | Patient ID        |
| `theme`     | `'light' \| 'dark'` | No       | Color 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

| Widget             | Use Case                                                                                |
| ------------------ | --------------------------------------------------------------------------------------- |
| PrescriptionWidget | Quick medication catalog entry (Medication resource)                                    |
| PrescriptionForm   | Full prescription with dosage, priority, category, refills (MedicationRequest resource) |

## Proxy Action

The widget sends `medications.create` with:

```json theme={null}
{
  "action": "medications.create",
  "data": {
    "code": "Amoxicillin 500mg",
    "status": "active"
  }
}
```

The enriched Medication resource also supports `manufacturer`, `amount`, `ingredient`, and `batch` fields through the SDK.
