Inspiration

Working as an Information Officer at JoiHealth Polyclinics across Lagos and Port Harcourt, I see the healthcare access gap every day. Patients travel hours to reach a clinic for questions a health worker could have answered on the spot. Community health workers in rural areas have no tool to support them when they are in the field with no internet, no signal, and no backup.

Cloud-based AI medical tools exist — but they require stable internet, API subscriptions, and smartphones. None of these are available to a community health worker in rural Kebbi or a patient in a village in Anambra. I built MediAssist to close that gap.

What it does

MediAssist is an offline AI medical assistant that runs 100% on a standard 8GB laptop with no internet, no cloud, and no GPU. It helps:

  • Community health workers triage symptoms and decide when to refer patients
  • Rural clinic staff get quick medication guidance and dosing information
  • Patients and caregivers understand danger signs and when to seek urgent care

It supports 5 languages: English, Nigerian Pidgin, Hausa, Yoruba, and Igbo — meeting rural users in the language they are most comfortable with.

Key features:

  • Symptom triage and referral guidance
  • Medication dosing and safety information
  • Maternal and child health support
  • Emergency detection — immediately flags life-threatening situations
  • Multi-turn conversation — remembers context across the conversation
  • Works with WiFi completely off

How I built it

Model: Qwen2.5 3B running via Ollama — chosen for its strong multilingual support, low RAM usage (~2GB), and reliable instruction following on CPU-only hardware.

Backend: Python Flask — lightweight, minimal overhead, easy to run from Anaconda on any laptop.

Frontend: Pure HTML, CSS, and JavaScript — zero dependencies, works in any browser, no Node.js or npm required.

Safety system prompt: A carefully engineered medical safety prompt that enforces:

  • Never diagnosing with certainty
  • Always recommending professional care for serious cases
  • Immediately flagging emergencies
  • Responding in the user's language

Stack:

  • Qwen2.5 3B via Ollama
  • Python 3.10 + Flask
  • Vanilla HTML/CSS/JS
  • psutil for real-time RAM monitoring
  • Built-in /benchmark endpoint for ADTC scoring validation

Challenges I faced

RAM constraints: On an 8GB Windows laptop with background OS processes, available RAM for the model is limited. I optimized by setting num_thread=4 to avoid thermal throttling, num_ctx=2048 to reduce memory pressure, and num_predict=400 to cap response length and improve TPS.

Multilingual responses: Getting a 3B model to reliably respond in Nigerian Pidgin, Hausa, Yoruba, and Igbo required careful system prompt engineering. Smaller models (1.5B) could not follow language instructions reliably — Qwen2.5 3B gave the best multilingual results within the RAM budget.

Medical safety: Designing a system prompt that is both safe and useful required balancing caution with helpfulness. The prompt must never diagnose with certainty but still give actionable guidance to a health worker in the field.

What I learned

  • Small language models (3B) can deliver genuinely useful medical guidance with the right system prompt engineering
  • Multilingual support on commodity hardware is achievable but requires careful model selection
  • The biggest barrier to AI adoption in rural Africa is not model quality — it is deployment complexity. MediAssist runs with a single command.

What's next

  • Fine-tune Qwen on Nigerian clinical data and NPHCDA treatment guidelines
  • Add RAG over local medical PDFs — Nigeria Standard Treatment Guidelines, WHO Primary Care manuals
  • Voice input via Whisper-tiny for health workers who prefer speaking over typing
  • Offline consultation logging for CHW activity tracking
  • Pilot deployment at JoiHealth Polyclinics community outreach programs in Lagos and Port Harcourt
  • Package as a single executable for frictionless installation across rural clinics

Built With

Share this project:

Updates

Submission history