Logo Lanfrica

the-jay-code/chew-clinical-assistant

Domain:

healthcarenatural language processing

Record type:

software
Creator:
the
Host:
A RAG-based clinical reference assistant for Community Health Extension Workers (CHEWs) in Nigeria, featuring custom layout-aware PDF extraction. # CHEW Clinical Reference Assistant A Retrieval-Augmented Generation (RAG) assistant designed to support Community Health Extension Workers (CHEWs) and frontline primary healthcare providers in Nigeria. ## Overview & Clinical Background In rural and primary healthcare clinics across Nigeria, CHEWs are often the first and only line of medical care. When handling complex or emergency cases under pressure, searching through the massive 372-page **National Standing Orders** manual to find correct triage steps, dosages, and danger signs is slow and prone to human oversight. The **CHEW Clinical Reference Assistant** bridges this gap. It acts as an intelligent digital index that allows frontline workers to type natural-language symptoms and instantly retrieve official, verified clinical protocols. ### Key Benefits for Healthcare Providers: * **Speed in Emergencies:** Instantly surfaces critical pathways (like newborn resuscitation or severe bleeding protocols) without manual page-flipping. * **Zero AI Hallucination:** The system is strictly grounded in official guidelines; it does not guess or invent medical advice. * **Verifiable Accountability:** Every response includes direct section citations so clinicians can cross-check guidelines instantly against official text. ## Architecture * **Data Pipeline:** Custom layout-aware PDF extraction using `pdfplumber`. Solves structural issues where text and tables are split across pages by organizing chunks by their actual vertical position. * **Embeddings & Search:** `all-MiniLM-L6-v2` via `sentence-transformers` for generating vector embeddings, and `faiss-cpu` for extremely fast similarity search. * **Backend:** A lightweight `FastAPI` server. * **Frontend:** A custom HTML/JS interface styled around real-world clinical triage systems (snaps to a deep burgundy emergency layout for severe conditions). * **Generation:** Powered by Groq/Llama models using strict grounding rules to prevent hallucinated medical advice. ## Local …