Skip to main content

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​

Storybook

Filtered​

Storybook

Empty​

Storybook

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​

VariantWhat it is
criticalRed alert with Acknowledge and Call Patient.
role lockNurse can review and route; signing needs a provider (canSign false plus lockText).
filteredTab 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​

PropTypeDefaultDescription
items *InboxListItem[]—Array<{id, type, patient, item, received, priority, status}>. Required
categoriesInboxListCategory[][]Array<{id, count, alert?}>: one pill tab each after "All"
criticalInboxListCriticalnone{title, body}: critical-value alert pinned on top
canSignbooleantrueWhether the role can sign; false disables Sign Selected
lockTextReactNodenoneLock banner explaining what the role cannot do
pageSizenumber5Rows per page
categorystringuncontrolledSelected type tab (controlled)
defaultCategorystring'All'Initially selected type tab
onCategoryChange(category: string) => voidnoneCalled with the new type tab
onAcknowledge() => voidnone"Acknowledge and Call Patient" on the critical alert
onOpenChart() => voidnone"Open Chart" on the critical alert
onSign(ids: DataTableRowId[]) => voidnone"Sign Selected" bulk action, with the selected ids
onMarkReviewed(ids: DataTableRowId[]) => voidnone"Mark Reviewed" bulk action
onAssign(ids: DataTableRowId[]) => voidnone"Assign to..." bulk action
onRowAction(action: 'open' | 'route' | 'pend', item: InboxListItem) => voidnoneRow 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>
KindNameDescription
property / JSON attributeitemsArray<{id, type, patient, item, received, priority, status}>. Required
property / JSON attributecategoriesArray<{id, count, alert?}>: one pill tab each after "All"; default []
property / JSON attributecritical{title, body}: critical-value alert pinned on top; default none
attributecan-sign / canSignWhether the role can sign; false disables Sign Selected; default true
attributepage-size / pageSizeRows per page; default 5
attributecategorySelected type tab (controlled); default uncontrolled
attributedefault-category / defaultCategoryInitially selected type tab; default 'All'
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-category-changeCalled with the new type tab; default none (React: onCategoryChange)
eventco-acknowledge"Acknowledge and Call Patient" on the critical alert; default none (React: onAcknowledge)
eventco-open-chart"Open Chart" on the critical alert; default none (React: onOpenChart)
eventco-sign"Sign Selected" bulk action, with the selected ids; default none (React: onSign)
eventco-mark-reviewed"Mark Reviewed" bulk action; default none (React: onMarkReviewed)
eventco-assign"Assign to..." bulk action; default none (React: onAssign)
eventco-row-actionRow menu choice: 'open' | 'route' | 'pend'; default none (React: onRowAction)
slotlock-textLock banner explaining what the role cannot do; default none Plain text also works as the `lock-text` attribute.