Dr. Elroi — an AI-native, offline-first EMR/EHR with a local clinical LLM (MedGemma), for GP offices and clinics. Built by the Africa Digital Health Academy.
# Dr. Elroi 🩺🤖
### 🌐 Live showcase → **dr-elroi-demo.vercel.app**
**An AI-native, offline-first EMR/EHR for primary care.** Dr. Elroi reimagines the electronic medical
record around a clinical AI that is *built in* — not bolted on — and runs **entirely on local hardware**,
so it works in a GP office, a rural clinic, or a busy medical plaza even with no internet, and patient
data never leaves the building.
Built by the **Africa Digital Health Academy** for the realities of African primary care, and designed
to generalise to any small practice that wants a modern, AI-assisted record.
> **Vision:** the EMR where the AI is the assistant *inside* the chart — it listens, drafts, summarises,
> and surfaces what matters for *this* patient, while the clinician stays in control of every decision.
---
## Why it's different
- 🧠 **A clinical LLM, on-device.** MedGemma runs locally
via Ollama — no cloud, no per-token bill, no data egress.
- 🎙️ **AI Scribe.** Dictate a visit; Dr. Elroi drafts structured FHIR resources for the clinician to
review and approve before anything is saved.
- 💬 **Ask about a patient.** Pull up a record and ask in plain language — summaries, history, medication
and allergy checks — grounded only in that patient's data.
- 🗣️ **Voice.** Optional local text-to-speech (Kokoro) reads answers aloud.
- 🔐 **Role-based + patient portal.** Admin / developer / doctor roles, per-doctor patient scoping, and a
patient login to view their own record, message their GP, and request refills.
- 📴 **Offline-first by design.** PostgreSQL, cache, AI, and EMR all run on one machine.
Dr. Elroi builds on the excellent open-source Medplum FHIR platform and adds
the AI connector, the clinician/patient experience, and the local-first packaging.
## Architecture (all local)
| Component | Port | Role |
|-----------|------|------|
| PostgreSQL | 5432 | EMR database |
| Memurai / Redis | 6379 | Cache / job queue |
| Ollama + MedGemma | 11434 | Local medical LLM |
| Kokoro | 81 …