Skip to main content

CensusList

ComplexInpatient flow<co-census-list>

CensusList is the unit or service list of current inpatients with bed, level of care, length of stay against the expected stay, last vitals with flags, isolation and expected discharge.

import { CensusList } from 'health-components';

Examples​

Showcase​

Storybook

Critical Vitals​

Storybook

Loading​

Storybook

No Matches​

Storybook

Usage​

<CensusList rows={census} subtitle="Hospital Medicine, Team B" />

When to use​

  • Hospitalist and charge nurse lists, handoff, discharge huddles.

When not to use​

  • Bed-by-bed layout: BedBoard.

Variants and states​

VariantWhat it is
filtersAll, Discharge today, Isolation, Critical vitals, Observation, each with a count.
LOS over expectedFlagged H with the GMLOS below.
critical vitalsH! or L! in red.
pending levelArrow to the requested level.
loadingSkeleton rows.
emptyNo results with how to clear.

Clinical values​

Every number goes through the clinical value rules: tabular digits, unit always shown, fixed precision per measure (temperature 0.1 °C, potassium 0.1 mmol/L, creatinine 0.01 mg/dL, heart rate whole bpm), the reference range in the tooltip and H, L, H! or L! flags. Doses drop trailing zeros and keep a leading zero (0.5 mg, 5 mg).

Accessibility​

  • Built on DataTable: sortable headers with aria-sort.
  • Flags are read out ("Heart rate 132 bpm, Critical high").

Do and don't​

  • Do: Pass the lab or unit range when it differs from the defaults.
  • Don't: Show vitals older than the shift without the time.

Props​

PropTypeDefaultDescription
rows *CensusRow[]—Array of { bed, name, mrn, age, sex, dx, level, pendingTo, los, gmlos, vitals: [{ measure, value }], isolation, organism, attending, edd, dischargeToday }; required
defaultFilterCensusFilter'all''all' | 'dc' | 'iso' | 'flag' | 'obs': starting filter (uncontrolled)
filterCensusFilteruncontrolledFilter (controlled)
onFilterChange(filter: CensusFilter) => voidnoneCalled with the new filter
loadingbooleanfalseShows skeleton rows
pageSizenumber10Rows per page
titlestring'Census'Card title
subtitlestringnoneLine under the title
rangeContextRangeContextId'inpatient' when no global context is setWhich shared reference range flags use; the lab range on a result still wins

Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, onChange, onInput, plus className and event handlers on the root element.

Angular, Vue and HTML​

Register the elements once (Angular guide), then use <co-census-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-census-list default-filter="…" filter="…" [rows]="rows" (co-filter-change)="onFilterChange($event.detail)"></co-census-list>
KindNameDescription
property / JSON attributerowsArray of { bed, name, mrn, age, sex, dx, level, pendingTo, los, gmlos, vitals: [{ measure, value }], isolation, organism, attending, edd, dischargeToday }; required
attributedefault-filter / defaultFilter'all' | 'dc' | 'iso' | 'flag' | 'obs': starting filter (uncontrolled); default 'all'
attributefilterFilter (controlled); default uncontrolled
attributeloadingShows skeleton rows; default false
attributepage-size / pageSizeRows per page; default 10
attributetitleCard title; default 'Census'
attributesubtitleLine under the title; default none
attributerange-context / rangeContextWhich shared reference range flags use; the lab range on a result still wins; default 'inpatient' when no global context is set
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-filter-changeCalled with the new filter; default none (React: onFilterChange)
eventco-change (React: onChange)
eventco-input (React: onInput)