wardkit
React components that take HL7® FHIR® R4 resources as props and render them by the clinical rules they cite.
Not a medical device and not for clinical use. These components are reference implementations for developers. Clinical rules are cited so you can check them, not so you can rely on them.
What they look like
HUBER, Margarete Anna
- Date of birth
- Born 14 Mar 1955 (71 years)
- Gender (administrative)
- Female
- Identifier
- W4B-000317System: https://github.com/Henrycarto/wardkit/fixtures/sid/mrn
No known allergies
Recorded explicitly in the patient's record.
NEWS2
SpO₂ scale 1
Score 17High clinical risk
Score of 3 in a single parameter: Respiration rate, SpO₂, Consciousness.
Emergency response: immediate assessment by a team with critical care skills, usually transfer to a higher level of care.
Continuous monitoring of vital signs.
| Parameter | Value used | Points |
|---|---|---|
| Respiration rate | 28 /min at 01:00 | 3 (red) |
| SpO₂ | 91 % at 01:00 | 3 (red) |
| Air or oxygen | Oxygen at 01:00 | 2 |
| Systolic BP | 94 mmHg at 01:00 | 2 |
| Pulse | 124 /min at 01:00 | 2 |
| Consciousness | Confused (scored as new confusion) at 01:00 | 3 (red) |
| Temperature | 39.4 °C at 01:00 | 2 |
Margarete Huber is fictional: Ward 4B bed 3 in the ward monitor, at 01:00 on the night she deteriorates.
Components
- LabResultAn entered-in-error result is never shown as valid, and a missing value shows its reason, never a blank or a zero.
- VitalsTrendA missing reading breaks the line into a visible gap; nothing is interpolated across it.
- News2PanelNEWS2 is scored only from a complete, current set; otherwise it says which parameter is missing. Never from a guessed value.
- AllergyBanner"No known allergies" only when a resource records it; an empty list shows "No allergy information recorded", which looks different.
- PatientBannerUses the official name, shows the identifier system, and handles a missing birth date and a deceased patient without breaking.
Install
Each component installs on its own through the shadcn CLI, into a project with Tailwind and the shadcn cn helper.
npx shadcn@latest add https://raw.githubusercontent.com/Henrycarto/wardkit/main/public/r/news2-panel.jsonThe files land in components/wardkit/ and lib/wardkit/. A component adds lucide-react and cn (installed by shadcn's utils item, which provides cn()), and @types/fhir as a dev dependency. React is expected to be there already.