Live drift-alert dashboard for community health workers (CHWs) in Southwest Nigeria.
Built on the Ontomorph digital-twin platform and its HOLON clinical knowledge API.
Most primary care in Southwest Nigeria is delivered by community health workers, not doctors. Baseline gives a CHW a live, prioritized queue of their patients' digital twins. As new health events arrive (vitals, labs), Baseline checks each one against that patient's personal baseline and against HOLON's age/sex-stratified reference ranges — flags anything drifting, and surfaces a plain-language note a non-physician can act on immediately.
The dashboard has three views:
- Patient Queue — severity-sorted list of every patient. Cards show status (critical / watch / stable), latest readings with baseline indicator tracks, and drug interaction warnings.
- Clinic Analytics — aggregate overview of the cohort with drift trend charts, patient distribution and a per-patient summary table.
- Settings & Grants — API connection status, sandbox twin registry, and environment reference.
| Feature | How Baseline uses it |
|---|---|
Digital twins (dtp.twins.connect) |
Each patient in the CHW queue is one twin. Connected via grant token. |
Health events (twin.events, twin.systems.get) |
Events (vitals, labs) are read per body system and displayed in the detail panel. |
Event streaming (twin.events.stream) |
Real-time event feed powers the "Live" indicator and demo trigger flow. |
HOLON reference ranges (dtp.holon.referenceRanges.getByLoincCode) |
Every value is classified stable/watch/critical against an age- and sex-stratified range — no hardcoded thresholds. |
HOLON drug interactions (dtp.holon.interactions.checkList) |
Patients with multiple medications are checked for interactions on each visit. |
Flag writes (twin.flag) |
When HOLON confirms a value is out of range, a flag is permanently written to the twin. |
Grant token inspection (decodeGrantToken) |
Used to decode grant JWT claims before connecting — verifies the bound twinId, permitted body systems, and expiry without a network call. |
- Patient event streams are triggered via the "Demo Controls" panel rather than live device data — no real medical device feeds data during a hackathon.
- All HOLON reference-range and drug-interaction calls (
/api/check-value,/api/check-interactions) are live API calls against the HOLON clinical knowledge API using a real key. - Twin connect and flag writes (
dtp.twins.connect,twin.flag) are real calls against the Ontomorph sandbox using the test API key and seed-demo-created twins.
A reading is classified as stable when it falls within HOLON's age- and sex-stratified reference range for that LOINC code. It becomes watch when it exceeds the range boundary, and critical when it exceeds the boundary by more than 15% — indicating significant drift from population norms and from the patient's own personal baseline. Drug interactions are surfaced separately via HOLON's pairwise interaction check across the patient's full medication list.
Baseline never holds raw patient records. Access is always mediated by a scoped grant token issued through Ontomorph's patient consent flow — covering only the body systems the patient authorised. Grant creation and revocation are patient-initiated only; Baseline cannot create or revoke grants on behalf of a patient. For sandbox testing, tokens are obtained from the Ontomorph developer dashboard's Sandbox tab.
- Node.js 18+
- An Ontomorph developer account with a test-type platform key and a HOLON key
# 1. Clone and install
git clone https://github.com/mechseiko/baseline
cd baseline
npm install
# 2. Configure keys
cp .env.example .env
# Edit .env and fill in:
# ONTOMORPH_API_KEY_TEST=your_test_key
# ONTOMORPH_HOLON_KEY=your_holon_key
# 3. Start both servers (Vite + Express)
npm run dev:all
# → Vite at http://localhost:5173
# → API at http://localhost:3001
# 4. (Live mode only) Seed a sandbox twin
curl -X POST http://localhost:3001/api/seed-demo
# Returns: { twinId: "..." }
# Note: seeding gives you a twinId — grant tokens come separately.
# 5. (Live mode only) Get a grant token
# Go to: developer.ontomorph.com → Dashboard → Sandbox tab
# Copy the token, then register it against your twinId:
curl -X PATCH http://localhost:3001/api/demo-state/<twinId>/token \
-H 'Content-Type: application/json' \
-d '{"grantToken":"<paste token here>"}'
# 6. Switch to live API
# Set VITE_USE_LIVE_API=true in .env and restart npm run dev:all