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
Review Only
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
| Variant | What it is |
|---|---|
| normal | "Normal" in muted text. |
| H / L | Badge. |
| HH / LL | Row shaded red, alert icon, Critical value alert on top. |
| sign | Sign 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
| Prop | Type | Default | Description |
|---|---|---|---|
rows * | LabResultRow[] | — | Array<{test, loinc?, value, flag?, range, units, trend?, collected}>; required |
title | string | "Lab Results" | Card title and table caption |
subtitle | ReactNode | none | Line under the title (lab, collection time, ordering provider) |
critical | ReactNode | none | Critical value message, shown in a red alert above the table |
onSign | () => void | none | Shows Sign and Notify Patient and Route to Nurse; called on Sign |
onRoute | () => void | none | Route to Nurse clicked (shown with onSign) |
actions | ReactNode | none | Card 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>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | rows | Array<{test, loinc?, value, flag?, range, units, trend?, collected}>; required |
| attribute | title | Card title and table caption; default "Lab Results" |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-sign | Shows Sign and Notify Patient and Route to Nurse; called on Sign; default none (React: onSign) |
| event | co-route | Route to Nurse clicked (shown with onSign); default none (React: onRoute) |
| event | co-change | (React: onChange) |
| event | co-input | (React: onInput) |
| slot | subtitle | Line under the title (lab, collection time, ordering provider); default none Plain text also works as the `subtitle` attribute. |
| slot | critical | Critical value message, shown in a red alert above the table; default none Plain text also works as the `critical` attribute. |
| slot | actions | Card header actions; default none Plain text also works as the `actions` attribute. |