Skip to main content

OrderSetPicker

ComplexOrders and notes<co-order-set-picker>

OrderSetPicker shows order sets as tabs and lets the provider tick the labs, imaging, meds and referrals to sign together.

import { OrderSetPicker } from 'health-components';

Examples​

Second Set​

Storybook

Usage​

<OrderSetPicker sets={orderSets} />

When to use​

  • Common workups: diabetes follow-up, prenatal first visit, chest pain.

When not to use​

  • One-off orders: DrugSearch or lab search.

Variants and states​

VariantWhat it is
setsTabs with counts.
defaultsItems on by default can be turned off.

Accessibility​

  • Checkbox list with type tags.

Do and don't​

  • Do: Show what each item will order.
  • Don't: Sign without showing the count.

Props​

PropTypeDefaultDescription
sets *OrderSet[]—Array<{name, items: Array<{name, type, detail?, default?}>}>. Required
subtitlestringnoneLine under the title (patient and service)
currentnumberundefined (uncontrolled)Index of the shown set (controlled)
defaultCurrentnumber0Index of the set shown first (uncontrolled)
onCurrentChange(index: number) => voidnoneCalled with the index of the newly shown set
onSign(items: OrderSetItem[], set: OrderSet) => voidnoneCalled by Sign Orders with the ticked items of the shown set

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-order-set-picker>. 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-order-set-picker subtitle="…" current="…" [sets]="sets" (co-current-change)="onCurrentChange($event.detail)"></co-order-set-picker>
KindNameDescription
property / JSON attributesetsArray<{name, items: Array<{name, type, detail?, default?}>}>. Required
attributesubtitleLine under the title (patient and service); default none
attributecurrentIndex of the shown set (controlled); default undefined (uncontrolled)
attributedefault-current / defaultCurrentIndex of the set shown first (uncontrolled); default 0
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-current-changeCalled with the index of the newly shown set; default none (React: onCurrentChange)
eventco-signCalled by Sign Orders with the ticked items of the shown set; default none (React: onSign)