Skip to main content

LabResultTable

ComplexClinical<co-lab-result-table>

LabResultTable shows a lab panel with value, H, L and critical flags, reference range, units, trend and collection time, plus sign and route.

import { LabResultTable } from 'health-components';

Examples​

All Normal​

Storybook

Review Only​

Storybook

Usage​

<LabResultTable title="Basic metabolic panel" rows={bmp} critical="Potassium 6.1 mmol/L" onSign={sign} />

When to use​

  • Reviewing and signing lab results.

When not to use​

  • Ordering labs: OrderSetPicker.

Variants and states​

VariantWhat it is
normal"Normal" in muted text.
H / LBadge.
HH / LLRow shaded red, alert icon, Critical value alert on top.
signSign and Notify Patient.

Accessibility​

  • Flags in words; table semantics.

Do and don't​

  • Do: Show the lab's own reference range.
  • Don't: Round values the lab sent.

Props​

PropTypeDefaultDescription
rows *LabResultRow[]—Array<{test, loinc?, value, flag?, range, units, trend?, collected}>; required
titlestring"Lab Results"Card title and table caption
subtitleReactNodenoneLine under the title (lab, collection time, ordering provider)
criticalReactNodenoneCritical value message, shown in a red alert above the table
onSign() => voidnoneShows Sign and Notify Patient and Route to Nurse; called on Sign
onRoute() => voidnoneRoute to Nurse clicked (shown with onSign)
actionsReactNodenoneCard header actions

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-lab-result-table>. 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-lab-result-table title="…" default-checked [rows]="rows" (co-sign)="onSign($event.detail)"></co-lab-result-table>
KindNameDescription
property / JSON attributerowsArray<{test, loinc?, value, flag?, range, units, trend?, collected}>; required
attributetitleCard title and table caption; default "Lab Results"
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-signShows Sign and Notify Patient and Route to Nurse; called on Sign; default none (React: onSign)
eventco-routeRoute to Nurse clicked (shown with onSign); default none (React: onRoute)
eventco-change (React: onChange)
eventco-input (React: onInput)
slotsubtitleLine under the title (lab, collection time, ordering provider); default none Plain text also works as the `subtitle` attribute.
slotcriticalCritical value message, shown in a red alert above the table; default none Plain text also works as the `critical` attribute.
slotactionsCard header actions; default none Plain text also works as the `actions` attribute.