AccuCare is a Clinical Decision Support System (CDSS) built to assist doctors by combining a retrieval-augmented AI pipeline with structured patient record management. It grounds its responses in trusted clinical guideline documents, helping ensure that AI-assisted suggestions are traceable back to verified medical sources rather than relying on unchecked model outputs.
AccuCare lets clinicians:
- Chat with an AI assistant that answers clinical questions grounded in real guideline documents (not just model memory)
- View cited sources for every AI-generated response, so answers can be verified against the original guideline text
- Maintain structured patient records and chat history across sessions
- Generate downloadable PDF reports summarizing patient consultations
The goal is to reduce the risk of hallucinated or unverifiable medical suggestions by combining Retrieval-Augmented Generation (RAG) with strict citation verification.
| Layer | Technology |
|---|---|
| Backend API | FastAPI |
| Frontend | Streamlit |
| RAG Pipeline | LangChain |
| Vector Store | ChromaDB |
| Database | SQLite (via SQLAlchemy ORM) |
| PDF Generation | ReportLab |
┌─────────────┐ ┌──────────────┐ ┌───────────────────┐
│ Streamlit │ <--> │ FastAPI │ <--> │ SQLite (via │
│ Frontend │ │ Backend │ │ SQLAlchemy) │
└─────────────┘ └──────┬───────┘ │ Patient / Report / │
│ │ ChatHistory models │
▼ └───────────────────┘
┌─────────────────┐
│ LangChain RAG │
│ Pipeline │
└────────┬────────┘
▼
┌─────────────────┐
│ ChromaDB │
│ (Vector Store — │
│ guideline docs) │
└─────────────────┘
- A doctor asks a clinical question via the Streamlit chat interface.
- FastAPI routes the query to the LangChain RAG pipeline.
- The pipeline retrieves relevant chunks from trusted clinical guideline documents (embedded and stored in ChromaDB).
- The retrieved context + query are passed to the LLM to generate a grounded response.
- Responses are cross-checked against source documents (citation verification) before being returned.
- Patient details, chat history, and generated reports are persisted via SQLAlchemy/SQLite.
- Reports can be exported as PDF via ReportLab.
- 🔍 Retrieval-Augmented Generation — answers are grounded in actual clinical guideline documents, not just the LLM's internal knowledge
- ✅ Citation verification — traces AI responses back to their source documents for transparency and trust
- 🗂️ Patient record management — structured storage of patient details, session history, and generated reports
- 💬 Persistent chat history — conversations are saved and retrievable across sessions
- 📄 PDF report generation — export patient consultation summaries as professional PDF reports
- 🖥️ Simple, clean UI — built with Streamlit for quick clinician-facing interaction
accucare/
├── backend/
│ ├── app.py # FastAPI app entrypoint
│ ├── models.py # SQLAlchemy models (Patient, Report, ChatHistory)
│ ├── database.py # DB connection/session setup
│ ├── rag/
│ │ ├── ingest.py # Script to embed guideline PDFs into ChromaDB
│ │ ├── retriever.py # LangChain retriever setup
│ │ └── chain.py # RAG chain + citation verification logic
│ ├── reports/
│ │ └── generate_report.py # ReportLab PDF generation
│ ├── chroma_db/ # (generated locally — not tracked in git)
│ └── data/
│ └── guidelines/ # Source clinical guideline PDFs
├── frontend/
│ └── app.py # Streamlit frontend
├── requirements.txt
├── .env.example
├── .gitignore
└── README.md
- Python 3.10+
- pip / virtualenv
git clone https://github.com/<your-username>/accucare.git
cd accucarepython -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windowspip install -r requirements.txtCopy .env.example to .env and fill in required values (e.g., API keys):
cp .env.example .envChromaDB data is not included in this repo (it's generated locally). Run the ingestion script to embed the guideline documents:
python backend/rag/ingest.pyuvicorn app:app --reload --port 8000In a separate terminal:
streamlit run streamlit_app.py- FastAPI + Streamlit base setup
- RAG pipeline with LangChain + ChromaDB
- Patient / Report / ChatHistory persistence
- PDF report generation
- Citation verification refinement
- Multi-user authentication
- Deployment (Docker + cloud hosting)
AccuCare is a research/academic project intended to demonstrate AI-assisted clinical decision support. It is not a certified medical device and should not be used for real clinical decision-making without appropriate validation, regulatory approval, and human oversight.
This project is licensed under the MIT License — see the LICENSE file for details.