How singhaakashdeep/healthcaredbmsproject works
Project Type & Purpose
• This is a full-stack, data-driven healthcare application with a Streamlit frontend, a Python-based backend (app.py), a PostgreSQL database extended with pgvector, and AI/LLM integration (Groq LLaMA 3 70B).
• Purpose: allow users to import patient and medical Q&A data, generate and store embeddings, perform vector searches, run natural-language SQL queries, and answer medical questions via RAG.
File Structure Analysis
• Top-level files:
• app.py – main Streamlit UI and request handling
• healthcareapp.env – environment variables (DB credentials, API key)
• medquad.csv (pre-loaded Q&A pairs) and patients.csv (importable patient data)
• requirements.txt, run_healthcare_app.bat
• No separate “frontend” or “backend” folders: the app.py monolith implements both UI and backend logic in layers.
• External dependencies and config files (env, requirements) hint at 3rd-party services: PostgreSQL + pgvector, Groq API, ragas.
Key Architecture from README
• Streamlit UI
• Patient Import (CSV) ──> Batch Embedding ──┐
• Q&A Import (CSV) ──────> Batch Embedding ──┘
• ↓
• PostgreSQL (pgvector) <── Vector Search ── AI Retrieval
• ↓
• AI SQL Agent ──> SQL ↔ Query Execution ↔ Data
• RAG Answering ──> Groq LLaMA 3 70B
• ↑
• Context from QA pairs
Diagramming Conventions
• Use rectangles for compute components (Streamlit, embedding pipeline, SQL agent).
• Blue: user-facing/UI
• Green: data storage/search
• Orange: AI/ML services
• Gray: pipelines/imports