PharmacyVerificationQueue
<co-pharmacy-verification-queue>PharmacyVerificationQueue is the pharmacist queue: orders on the left, the selected order on the right with weight, renal function, potassium, a weight-based dose check and interaction alerts, then Verify, Clarify or Reject.
import { PharmacyVerificationQueue } from 'health-components';
Examples
Showcase
Dose Above Hard Limit
All Orders
Empty
Usage
<PharmacyVerificationQueue orders={orders} oldest="42 min" />
When to use
- Inpatient and infusion pharmacist verification; specialty pharmacy review.
When not to use
- Outpatient refill requests: InboxItem. Prescribing: SigBuilder.
Variants and states
| Variant | What it is |
|---|---|
| pending | Amber; Verify, Clarify, Reject. |
| dose in range | Green dose check. |
| dose above usual | Amber dose check; Verify allowed. |
| dose above hard limit | Red; Verify blocked. |
| no weight | Amber "No weight" tag; no dose check. |
| clarify / verified / rejected | Status tag and result note. |
| empty | Queue is clear. |
Clinical values
Every number renders through CareOS.ClinicalValue and CareOS.fmt (the clinical-values builder), matched by LOINC; measures that table lacks (NT-proBNP, lactate, vancomycin trough, CrCl, PHQ-9, per-kg doses) use a local table with the same rules: tabular figures, the unit always shown, fixed decimals per measure (potassium 1, sodium 0, creatinine 2), the reference range in the title or beside it, and H, L, HH or LL flags in words for screen readers. The flag says where the number sits against the adult reference range in the rules table; it does not say the number was measured correctly.
Accessibility
- The list is a listbox with selected state.
- Dose check values read as words with their flag.
Do and don't
- Do: Show the per-kg dose next to the ordered dose.
- Don't: Let a dose over the hard limit be verified without a new order.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
orders | PharmacyOrder[] | none | Initial orders; the queue keeps its own copy as statuses change |
selected | string | uncontrolled | Selected order id (controlled) |
defaultSelected | string | the first order | Initially selected order id |
onSelectedChange | (id: string) => void | none | Called with the selected order id |
filter | PharmacyQueueFilter | uncontrolled | Status filter (controlled): 'pending' | 'clarify' | 'all' |
defaultFilter | PharmacyQueueFilter | 'pending' | Initial status filter |
onFilterChange | (filter: PharmacyQueueFilter) => void | none | Called when the filter changes |
onStatusChange | (id: string, status: PharmacyOrderStatus, order: PharmacyOrder) => void | none | Called when the pharmacist verifies, asks to clarify or rejects an order |
user | string | none | Pharmacist name, recorded as `by` on orders they act on |
oldest | string | 'now' | Age of the oldest pending order ('42 min') |
rangeContext | RangeContextId | the global context, else 'outpatient' | Which shared reference range flags use; the lab range on a result still wins |
Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, plus className and event handlers on the root element.
Angular, Vue and HTML
Register the elements once (Angular guide), then use <co-pharmacy-verification-queue>. 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.
<co-pharmacy-verification-queue selected="…" default-selected="…" [orders]="orders" (co-selected-change)="onSelectedChange($event.detail)"></co-pharmacy-verification-queue>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | orders | Initial orders; the queue keeps its own copy as statuses change; default none |
| attribute | selected | Selected order id (controlled); default uncontrolled |
| attribute | default-selected / defaultSelected | Initially selected order id; default the first order |
| attribute | filter | Status filter (controlled): 'pending' | 'clarify' | 'all'; default uncontrolled |
| attribute | default-filter / defaultFilter | Initial status filter; default 'pending' |
| attribute | user | Pharmacist name, recorded as `by` on orders they act on; default none |
| attribute | oldest | Age of the oldest pending order ('42 min'); default 'now' |
| attribute | range-context / rangeContext | Which shared reference range flags use; the lab range on a result still wins; default the global context, else 'outpatient' |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-selected-change | Called with the selected order id; default none (React: onSelectedChange) |
| event | co-filter-change | Called when the filter changes; default none (React: onFilterChange) |
| event | co-status-change | Called when the pharmacist verifies, asks to clarify or rejects an order; default none (React: onStatusChange) |