InboxList
ComplexClinical
<co-inbox-list>InboxList is the clinical inbox: a critical-value alert, type tabs with counts, and a selectable worklist with sign, review and assign.
import { InboxList } from 'health-components';
Examples
Showcase
Filtered
Empty
Usage
<InboxList items={inbox} categories={[{ id: "Lab Results", count: 3 }, { id: "Co-sign", count: 2, alert: true }]}
critical={{ title: "1 critical value waiting", body: "Ralph Edwards, potassium 6.1 mmol/L" }} canSign={role === "provider"} />
When to use
- Provider and nurse inbox; task queues with the same shape.
When not to use
- Patient messaging: ChatThread.
Variants and states
| Variant | What it is |
|---|---|
| critical | Red alert with Acknowledge and Call Patient. |
| role lock | Nurse can review and route; signing needs a provider (canSign false plus lockText). |
| filtered | Tab per type. |
Accessibility
- Priority shows a word and, for Critical, an icon.
Do and don't
- Do: Pin critical values above everything.
- Don't: Let Sign Selected act on items the role cannot sign.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items * | InboxListItem[] | — | Array<{id, type, patient, item, received, priority, status}>. Required |
categories | InboxListCategory[] | [] | Array<{id, count, alert?}>: one pill tab each after "All" |
critical | InboxListCritical | none | {title, body}: critical-value alert pinned on top |
canSign | boolean | true | Whether the role can sign; false disables Sign Selected |
lockText | ReactNode | none | Lock banner explaining what the role cannot do |
pageSize | number | 5 | Rows per page |
category | string | uncontrolled | Selected type tab (controlled) |
defaultCategory | string | 'All' | Initially selected type tab |
onCategoryChange | (category: string) => void | none | Called with the new type tab |
onAcknowledge | () => void | none | "Acknowledge and Call Patient" on the critical alert |
onOpenChart | () => void | none | "Open Chart" on the critical alert |
onSign | (ids: DataTableRowId[]) => void | none | "Sign Selected" bulk action, with the selected ids |
onMarkReviewed | (ids: DataTableRowId[]) => void | none | "Mark Reviewed" bulk action |
onAssign | (ids: DataTableRowId[]) => void | none | "Assign to..." bulk action |
onRowAction | (action: 'open' | 'route' | 'pend', item: InboxListItem) => void | none | Row menu choice: 'open' | 'route' | 'pend' |
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-inbox-list>. 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-inbox-list can-sign page-size="…" [items]="items" (co-category-change)="onCategoryChange($event.detail)"></co-inbox-list>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | items | Array<{id, type, patient, item, received, priority, status}>. Required |
| property / JSON attribute | categories | Array<{id, count, alert?}>: one pill tab each after "All"; default [] |
| property / JSON attribute | critical | {title, body}: critical-value alert pinned on top; default none |
| attribute | can-sign / canSign | Whether the role can sign; false disables Sign Selected; default true |
| attribute | page-size / pageSize | Rows per page; default 5 |
| attribute | category | Selected type tab (controlled); default uncontrolled |
| attribute | default-category / defaultCategory | Initially selected type tab; default 'All' |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-category-change | Called with the new type tab; default none (React: onCategoryChange) |
| event | co-acknowledge | "Acknowledge and Call Patient" on the critical alert; default none (React: onAcknowledge) |
| event | co-open-chart | "Open Chart" on the critical alert; default none (React: onOpenChart) |
| event | co-sign | "Sign Selected" bulk action, with the selected ids; default none (React: onSign) |
| event | co-mark-reviewed | "Mark Reviewed" bulk action; default none (React: onMarkReviewed) |
| event | co-assign | "Assign to..." bulk action; default none (React: onAssign) |
| event | co-row-action | Row menu choice: 'open' | 'route' | 'pend'; default none (React: onRowAction) |
| slot | lock-text | Lock banner explaining what the role cannot do; default none Plain text also works as the `lock-text` attribute. |