Skip to content
wardkitGitHub

Not a medical device and not for clinical use. All patients and data on this site are fictional.

LabResult

One lab result from an Observation: value and unit, reference range, interpretation flag and status.

Rule it enforces: An entered-in-error result is never shown as valid, and a missing value shows its reason, never a blank or a zero.

Install

npx shadcn@latest add https://raw.githubusercontent.com/Henrycarto/wardkit/main/public/r/lab-result.json

Usage

import { LabResult } from '@/components/wardkit/lab-result';

<LabResult observation={observation} timeZone="Europe/Vienna" />

Examples

Interpretation flags

One per code. Each flag is text with an icon; colour is never the only signal.

Potassium

21 Oct 2026, 00:40

Critically high

6.9 mmol/L

Reference range:
3.5 to 5.1 mmol/L (Adult)

Glucose

21 Oct 2026, 00:40

Critically low

2.1 mmol/L

Reference range:
3.9 to 7.8 mmol/L (Random, adult)

CRP

21 Oct 2026, 00:40

High

148 mg/L

Reference range:
5 mg/L or less (Adult)

Sodium

21 Oct 2026, 00:40

Low

129 mmol/L

Reference range:
135 to 145 mmol/L (Adult)

Urine nitrite

21 Oct 2026, 00:40

Abnormal

Positive

Reference range:
Negative

White cells

21 Oct 2026, 00:40

Normal

7.2 10^9/L

Reference range:
4 to 11 10^9/L (Adult)

Status

Lactate

21 Oct 2026, 00:40

Preliminary, may changeHigh

3.1 mmol/L

Reference range:
0.5 to 2 mmol/L (Adult)

Creatinine

21 Oct 2026, 00:40

Amended: changed after first reportHigh

118 µmol/L

Reference range:
45 to 90 µmol/L (Adult female)

Potassium

21 Oct 2026, 00:40

Corrected: changed after first reportNormal

4.4 mmol/L

Reference range:
3.5 to 5.1 mmol/L (Adult)

CRP

21 Oct 2026, 00:40

Entered in error

This record was entered in error. It is not a valid result and no value is shown.

Values in components: blood pressure panel

LOINC 85354-9 has no top-level value; each component is shown with its own value, flag and range. Right: the diastolic was not measured.

Blood pressure

21 Oct 2026, 01:00

  • Systolic blood pressureLow

    94 mmHg

    Reference range:
    100 to 140 mmHg (Adult, at rest)
  • Diastolic blood pressureNormal

    58 mmHg

    Reference range:
    50 to 90 mmHg (Adult, at rest)

Blood pressure

21 Oct 2026, 01:00

  • Systolic blood pressureNormal

    128 mmHg

    Reference range:
    100 to 140 mmHg (Adult, at rest)
  • Diastolic blood pressure

    No value: Not Performed. Cuff deflated before the diastolic was read

    No reference range given.

No value, and a value below a limit

dataAbsentReason shows the reason. A comparator is kept.

Potassium

21 Oct 2026, 00:40

No value: Error. Sample haemolysed, potassium not reported. Repeat sample requested.

Reference range:
3.5 to 5.1 mmol/L (Adult)

CRP

21 Oct 2026, 00:40

Normal

<5 mg/L

Reference range:
5 mg/L or less (Adult)

Props

PropTypeDescription
observationObservationA FHIR R4 Observation with one result. Required.
timeZone?stringIANA time zone for displayed times, e.g. "Europe/Vienna". Defaults to the runtime zone; pass it when rendering on a server.
className?stringExtra classes for the outer element.

Clinical rules and sources

  1. The flag comes only from Observation.interpretation (H, L, HH, LL, A, N). It is never worked out from the reference range. Each flag has text and an icon, not only a colour.Source: HL7 v3 ObservationInterpretation
  2. preliminary is marked as preliminary; amended and corrected are marked as changed after the first report.Source: FHIR R4: ObservationStatus
  3. entered-in-error shows that the record is not valid and shows no value and no flag. registered shows as pending, cancelled as cancelled.Source: FHIR R4: ObservationStatus
  4. When dataAbsentReason is set, the reason is shown in place of a value.Source: FHIR R4: DataAbsentReason; FHIR R4: Observation invariant obs-6
  5. A Quantity comparator is kept: "<5 mg/L" is never shown as "5 mg/L".Source: FHIR R4: Quantity.comparator
  6. Every referenceRange is shown with its type, appliesTo and age when present.Source: FHIR R4: Observation.referenceRange
  7. When there is no top-level value but there are components (for example a blood pressure panel, LOINC 85354-9), each component is shown with its code, value, unit, reference range and interpretation, by the same rules as the main value, including dataAbsentReason. Components have no status of their own in FHIR R4: an entered-in-error panel shows none of its components.Source: FHIR R4: Observation.component; FHIR R4: Blood pressure profile