Skip to content

AishwaryaMohanty212/setu-health

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฌ 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.

Python Streamlit Gemini NetworkX License


๐ŸŒ 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
โš ๏ธ Overlap Flags 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

  1. Open โ†’ https://setu-health-2fkzmhofvnf24g8p83fa7t.streamlit.app/
  2. Get a free Google API key โ†’ https://aistudio.google.com/app/apikey
  3. Paste your API key in the sidebar
  4. Upload your medical documents (PDF, JPG, PNG)
  5. Click โšก Analyse Documents
  6. Explore the graph, timeline, and ask questions!

๐Ÿ’ป Run Locally

Prerequisites

Installation

  1. Clone the repository
git clone https://github.com/AishwaryaMohanty212/setu-health.git
cd setu-health
  1. Install dependencies
pip install -r requirements.txt
  1. 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..."
  1. Run the app
streamlit run app.py
  1. 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

โš ๏ธ Disclaimer

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


Built with โค๏ธ for better healthcare accessibility

About

๐Ÿงฌ AI-powered patient timeline & drug interaction graph. Upload medical records โ†’ Gemini 2.5 Flash extracts medications โ†’ interactive graph + timeline + natural language Q&A. Built with Streamlit, NetworkX & Plotly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

โšก