How arunkumar2611/advanced-health-record-rag-with-google-adk works
Personal Health RAG is an account-scoped health-record assistant. A user registers and signs in, uploads a report, then asks questions in a conversation. The API validates and processes uploads into structured records and searchable chunks; chat runs a safety, retrieval, optional drug-reference, and answer workflow. SQLite holds account, report, memory, and conversation data, while each account has a separate FAISS index. The README documents these capabilities; edges involving unsampled implementation details are limited to documented relationships.
Main entry points: app.py FastAPI routes · graph.py Chat workflow · faiss_store.py Account FAISS index · extraction.py Report extraction
Components 20
Access and API
- Browser UI
health_rag/static/app.js - FastAPI routes
health_rag/api/app.py - Token authentication
health_rag/security/auth.py - Progress events
health_rag/observability.py - Runtime configuration
health_rag/config.py
Record ingestion
- Text loaders
health_rag/data_loading/loaders.py - Scanned PDF OCR
health_rag/data_loading/ocr.py - Report extraction
health_rag/extraction.py - Medical report schema
health_rag/schemas.py - Report chunking
health_rag/chunking/splitter.py
Patient data
- SQLite records
health_rag/persistence/database.py - Uploaded files
health_rag/api/app.py - Account FAISS index
health_rag/vector_store/faiss_store.py
Question answering
- Chat workflow
health_rag/graph.py - Grounded answer generation
health_rag/answering.py - Drug reference lookup
health_rag/external_sources/drug_reference.py
Model and references
- ADK agent
health_rag/adk_agent.py - Google Gemini
- NIH RxNorm and FDA
Other components
- Account holder
Connections 24
- Account holder → Browser UI: uses
README.md - Browser UI → FastAPI routes: sends requests
README.md - FastAPI routes → Token authentication: authenticates
health_rag/api/app.py - FastAPI routes → SQLite records: reads and writes
health_rag/api/app.py - FastAPI routes → Uploaded files: stores source
README.md - FastAPI routes → Text loaders: loads text
health_rag/api/app.py - FastAPI routes → Scanned PDF OCR: renders scans
health_rag/api/app.py - FastAPI routes → Report extraction: extracts report
health_rag/api/app.py - Report extraction → Medical report schema: validates against
health_rag/extraction.py - Report extraction → Google Gemini: extracts with
README.md - FastAPI routes → Report chunking: chunks report
health_rag/api/app.py - FastAPI routes → Account FAISS index: indexes chunks
health_rag/api/app.py - Account FAISS index → Google Gemini: embeds text
health_rag/vector_store/faiss_store.py - Account FAISS index → SQLite records: stores chunk records
health_rag/vector_store/faiss_store.py - FastAPI routes → Chat workflow: invokes workflow
health_rag/api/app.py - Chat workflow → Account FAISS index: searches chunks
health_rag/graph.py - Chat workflow → SQLite records: loads context
health_rag/graph.py - Chat workflow → Drug reference lookup: looks up drug
health_rag/graph.py - Drug reference lookup → NIH RxNorm and FDA: queries
health_rag/external_sources/drug_reference.py - Chat workflow → Grounded answer generation: generates answer
health_rag/graph.py - Grounded answer generation → ADK agent: runs
health_rag/answering.py - Grounded answer generation → Google Gemini: generates response
README.md - FastAPI routes → Progress events: emits progress
health_rag/api/app.py - Chat workflow → Progress events: emits progress
health_rag/graph.py