๐งฌ Setu Health โ Multimodal Patient Timeline & Drug Interaction Graph
AI-powered medical record analyser that extracts medications from documents, visualises drug interactions as a graph, and answers clinical questions in natural language.
๐ Live Demo
๐ Click here to use Setu Health
No installation needed โ open the link, enter your Google API key, and upload your medical documents.
๐ What is Setu Health?
Setu Health is a prototype clinical intelligence tool that helps patients and healthcare professionals make sense of complex medication histories. Upload any medical document โ prescriptions, lab reports, handwritten notes, or discharge summaries โ and the app will:
- ๐ Extract all medications using Google Gemini 2.5 Flash (AI vision + structured JSON output)
- ๐ธ Map drug relationships and concurrent-use overlaps as an interactive graph
- ๐ Visualise a Gantt-style medication timeline
- ๐ฌ Answer natural language questions about your medication history
โจ Features
| Feature | Description |
|---|---|
| ๐ Multi-file Upload | PDF, JPG, PNG, WEBP โ prescriptions, notes, scans |
| ๐ค AI Extraction | Gemini 2.5 Flash extracts name, dosage, frequency, dates, condition, side effects |
| ๐ธ Drug Interaction Graph | NetworkX + Plotly interactive graph with overlap detection |
| ๐ Medication Timeline | Gantt chart showing active vs ended medications over time |
| Automatically detects and highlights concurrent medication use | |
| ๐ฌ Query Engine | Ask questions like "What side effects should I watch for this week?" |
| ๐ Secure | API key never stored โ entered per session or via environment variable |
๐ How to Use the Live App
- Open โ https://setu-health-2fkzmhofvnf24g8p83fa7t.streamlit.app/
- Get a free Google API key โ https://aistudio.google.com/app/apikey
- Paste your API key in the sidebar
- Upload your medical documents (PDF, JPG, PNG)
- Click โก Analyse Documents
- Explore the graph, timeline, and ask questions!
๐ป Run Locally
Prerequisites
- Python 3.10 or higher โ Download
- A free Google API key โ Get it here
Installation
- Clone the repository
git clone https://github.com/AishwaryaMohanty212/setu-health.git
cd setu-health- Install dependencies
pip install -r requirements.txt- Set your Google API key
# macOS / Linux
export GOOGLE_API_KEY="AIza...your_key..."
# Windows CMD
set GOOGLE_API_KEY=AIza...your_key...
# Windows PowerShell
$env:GOOGLE_API_KEY="AIza...your_key..."- Run the app
streamlit run app.py- Open your browser at
http://localhost:8501
๐ Project Structure
setu-health/
โโโ app.py # Main Streamlit application
โโโ requirements.txt # Python dependencies
โโโ run_app.py # One-click launcher
โโโ README.md # You are here
๐ง How It Works
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ
โ Upload Files โโโโโโถโ Gemini 2.5 Flash AI โโโโโโถโ Structured JSON โ
โ PDF / JPG / PNG โ โ Vision + Extraction โ โ Medication Data โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโ
โ NetworkX Graph โ
โ Medication Nodes โโ Condition Nodes โ
โ TREATS edges | CONCURRENT_USE overlap edges โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
Plotly Graph View Gantt Timeline View Query Engine
(Interactive) (Active vs Ended) (Gemini + Graph Context)
๐ฌ Example Questions You Can Ask
- "What side effects should I watch for this week?"
- "Which of my medications have potential interactions?"
- "Am I currently taking any overlapping medications?"
- "Summarise my complete medication history."
- "Which condition has the most medications prescribed?"
- "What medications ended in the last 6 months?"
๐ Tech Stack
| Tool | Purpose |
|---|---|
| Streamlit | Web UI framework |
| Google Gemini 2.5 Flash | AI document analysis & Q&A |
| NetworkX | Graph data structure |
| Plotly | Interactive graph & timeline visualisation |
| Pandas | Data handling |
Setu Health is a prototype for educational and research purposes only. It is not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider for medical decisions.
๐ค Contributing
Contributions are welcome!
- Open an Issue for bugs or feature requests
- Submit a pull Request with improvements
๐ License
This project is licensed under the MIT License โ free to use, modify, and distribute.
๐ฉโ๐ป Author
Aishwarya Mohanty
- GitHub: @AishwaryaMohanty212
- Live App: setu-health.streamlit.app
Built with โค๏ธ for better healthcare accessibility