offline-first android mobile app for Ghana's Community Health Officers (CHOs)
# TriageMate
**On-device clinical triage assistant for Ghana Community Health Officers (CHOs).**
TriageMate is an Android app that helps CHOs at CHPS compounds rapidly assess and refer sick children under 5 and pregnant mothers — fully offline, with all clinical reasoning running on-device via Google's Gemma 4 E2B through LiteRT-LM.
The app is built around an **agentic multi-tool loop**: Gemma plans which clinical tools to call (`assessSymptoms`, `requestVitalSigns`, `checkDrugInteraction`, `classifyTriage`, `generateReferralNote`) and the Kotlin layer enforces a WHO-aligned safety guardrail on top of the model's output.
---
## What's in the box
- **Core capabilities**
- Agentic multi-tool triage loop with vitals pause/resume
- Voice input in Twi (Akan) translated on-device by Gemma's audio encoder
- Multimodal photo capture for visual signs (jaundice, rashes, swelling)
- Compound setup, PIN-gated supervisor dashboard, and offline sync
- Hard-coded clinical safety guardrail (WHO IMCI danger signs override the model)
- "Learn about this case" educator card and TTS readback of the triage outcome
- **Two clinical pathways** — `CHILD_U5` (under-fives, IMCI) and `ANTENATAL` (Ghana Health Service ANC)
- **Fully offline inference** — internet is only used for first-run model download and (optional) supervisor sync upload
---
## Architecture at a glance
```mermaid
flowchart TB
subgraph UI["Presentation — Jetpack Compose"]
Home[Home / Pathway Picker]
Assess[Assessment Input]
Vitals[Vitals Sheet]
Photo[Photo Capture]
Voice[Voice Input Card]
Result[Result Screen + Learn Card + TTS]
Sup[Supervisor Dashboard / Case Log]
Setup[Compound Setup Flow]
end
subgraph VM["ViewModels — StateFlow"]
AssessVM[AssessmentViewModel]
ResultVM[ResultViewModel]
SupVM[SupervisorViewModel]
SetupVM[ModelSetupViewModel]
end
subgraph Domain["Domain — Repositories & Safety"]
InfRepo[InferenceRepository]
Guard[SafetyGuardrail WHO danger-sign override]
TriageRepo[TriageHistoryRepository]
ModelR …