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
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
| Variant | What it is |
|---|---|
| sets | Tabs with counts. |
| defaults | Items 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
| Prop | Type | Default | Description |
|---|---|---|---|
sets * | OrderSet[] | — | Array<{name, items: Array<{name, type, detail?, default?}>}>. Required |
subtitle | string | none | Line under the title (patient and service) |
current | number | undefined (uncontrolled) | Index of the shown set (controlled) |
defaultCurrent | number | 0 | Index of the set shown first (uncontrolled) |
onCurrentChange | (index: number) => void | none | Called with the index of the newly shown set |
onSign | (items: OrderSetItem[], set: OrderSet) => void | none | Called 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>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | sets | Array<{name, items: Array<{name, type, detail?, default?}>}>. Required |
| attribute | subtitle | Line under the title (patient and service); default none |
| attribute | current | Index of the shown set (controlled); default undefined (uncontrolled) |
| attribute | default-current / defaultCurrent | Index of the set shown first (uncontrolled); default 0 |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-current-change | Called with the index of the newly shown set; default none (React: onCurrentChange) |
| event | co-sign | Called by Sign Orders with the ticked items of the shown set; default none (React: onSign) |