MedicationRow
ComplexMedications
<co-medication-row>MedicationRow is one medication: name and strength, sig, quantity, refills, prescriber, pharmacy, last fill, and the DEA schedule tag for controlled drugs (C-II to C-V).
import { MedicationRow } from 'health-components';
Examples
Variants
Discontinued
Without Actions
Usage
<ul className="co-list"><MedicationRow med={{ name: "Oxycodone 5 mg tablet", sig: "1 tablet by mouth every 6 hours as needed for pain", qty: 20, refills: 0, schedule: "C-II" }} /></ul>
When to use
- Inside MedicationList, refill queues, eRx review.
When not to use
- Order entry: DrugSearch and SigBuilder.
Variants and states
| Variant | What it is |
|---|---|
| controlled | Red shield tag C-II, C-III, C-IV or C-V. |
| PRN | Tag. |
| discontinued | Dimmed with tag. |
| source | Outside source tag, such as Surescripts history. |
Accessibility
- Schedule tag has a title with the full meaning.
Do and don't
- Do: Show the sig in plain words.
- Don't: Abbreviations like "qd" or "u".
Props
| Prop | Type | Default | Description |
|---|---|---|---|
med * | Medication | — | {name, sig, qty, refills?, prescriber?, pharmacy?, last?, schedule?, prn?, status?, source?}; required |
actions | boolean | true | Shows the Renew / Change Dose / Mark Not Taking / Discontinue menu |
onAction | (action: MedicationAction, med: Medication) => void | none | A menu action was chosen |
Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, value, plus className and event handlers on the root element.
Angular, Vue and HTML
Register the elements once (Angular guide), then use <co-medication-row>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.
Angular template
<co-medication-row actions default-checked [med]="med" (co-action)="onAction($event.detail)"></co-medication-row>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | med | {name, sig, qty, refills?, prescriber?, pharmacy?, last?, schedule?, prn?, status?, source?}; required |
| attribute | actions | Shows the Renew / Change Dose / Mark Not Taking / Discontinue menu; default true |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| property / JSON attribute | value | |
| event | co-action | A menu action was chosen; default none (React: onAction) |