Skip to main content

PharmacyVerificationQueue

ComplexChart panels<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​

Storybook

Dose Above Hard Limit​

Storybook

All Orders​

Storybook

Empty​

Storybook

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​

VariantWhat it is
pendingAmber; Verify, Clarify, Reject.
dose in rangeGreen dose check.
dose above usualAmber dose check; Verify allowed.
dose above hard limitRed; Verify blocked.
no weightAmber "No weight" tag; no dose check.
clarify / verified / rejectedStatus tag and result note.
emptyQueue 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​

PropTypeDefaultDescription
ordersPharmacyOrder[]noneInitial orders; the queue keeps its own copy as statuses change
selectedstringuncontrolledSelected order id (controlled)
defaultSelectedstringthe first orderInitially selected order id
onSelectedChange(id: string) => voidnoneCalled with the selected order id
filterPharmacyQueueFilteruncontrolledStatus filter (controlled): 'pending' | 'clarify' | 'all'
defaultFilterPharmacyQueueFilter'pending'Initial status filter
onFilterChange(filter: PharmacyQueueFilter) => voidnoneCalled when the filter changes
onStatusChange(id: string, status: PharmacyOrderStatus, order: PharmacyOrder) => voidnoneCalled when the pharmacist verifies, asks to clarify or rejects an order
userstringnonePharmacist name, recorded as `by` on orders they act on
oldeststring'now'Age of the oldest pending order ('42 min')
rangeContextRangeContextIdthe 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.

Angular template
<co-pharmacy-verification-queue selected="…" default-selected="…" [orders]="orders" (co-selected-change)="onSelectedChange($event.detail)"></co-pharmacy-verification-queue>
KindNameDescription
property / JSON attributeordersInitial orders; the queue keeps its own copy as statuses change; default none
attributeselectedSelected order id (controlled); default uncontrolled
attributedefault-selected / defaultSelectedInitially selected order id; default the first order
attributefilterStatus filter (controlled): 'pending' | 'clarify' | 'all'; default uncontrolled
attributedefault-filter / defaultFilterInitial status filter; default 'pending'
attributeuserPharmacist name, recorded as `by` on orders they act on; default none
attributeoldestAge of the oldest pending order ('42 min'); default 'now'
attributerange-context / rangeContextWhich shared reference range flags use; the lab range on a result still wins; default the global context, else 'outpatient'
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-selected-changeCalled with the selected order id; default none (React: onSelectedChange)
eventco-filter-changeCalled when the filter changes; default none (React: onFilterChange)
eventco-status-changeCalled when the pharmacist verifies, asks to clarify or rejects an order; default none (React: onStatusChange)