How prakharcodes-dev/healthcare-chatbot works
MedVitals AI is a Flask healthcare assistant whose main workflow takes reported symptoms, identifies possible conditions, and returns structured, safety-conscious guidance; users can also log vitals and review trends. The product also includes a searchable condition library, medication reminders, and localized safety guidance. The graph combines sampled implementation evidence with README-documented capabilities; routes and much of the frontend were not sampled, so some documented connections are shown without source-level detail.
Main entry points: routes.py Flask API routes · main.js Chat and workspace · symptom_assessment.py Symptom assessment · __init__.py Application setup
Components 24
User experience
- Chat and workspace
frontend/static/js/main.js - Medical knowledge library
data/diseases.json - Language and safety guide
frontend/static/js/languages-extra.js - Medication reminders
frontend/static/js/main.js
Symptom assessment
- Symptom report parsing
backend/core/symptom_report.py - Symptom normalization
backend/utils.py - Condition matching
backend/matcher.py - Symptom assessment
backend/services/symptom_assessment.py - Structured response
backend/services/chat_response.py
Health tracking
- Measurement and safety checks
backend/utils.py - Vital status rules
backend/core/health_metrics.py - Vital logs and trends
backend/repositories/health_repository.py - Reminder scheduling
backend/notifications.py
Application and data
- Flask API routes
backend/routes.py - Application setup
backend/__init__.py - Application configuration
backend/config.py - Database and scheduler
backend/extensions.py - Domain records
backend/models.py - Chat and search storage
backend/repositories/chat_repository.py - Health log storage
backend/repositories/health_repository.py - Notification storage
backend/repositories/notification_repository.py - Chat history
backend/history.py - Service registry
backend/services/registry.py
Other components
- User
Connections 29
- User → Chat and workspace: reports symptoms
README.md - Chat and workspace → Flask API routes: submits requests
README.md - Flask API routes → Symptom report parsing: parses reports
- Symptom report parsing → Symptom normalization: normalizes phrases
backend/core/symptom_report.py - Symptom assessment → Symptom report parsing: uses parser
backend/services/symptom_assessment.py - Symptom assessment → Condition matching: requests matches
- Flask API routes → Symptom assessment: dispatches assessment
- Condition matching → Medical knowledge library: matches profiles
- Symptom assessment → Structured response: builds response
- Structured response → Vital status rules: uses vital status
backend/services/chat_response.py - Structured response → Chat and workspace: returns guidance
README.md - Chat and workspace → Medical knowledge library: searches profiles
README.md - User → Vital logs and trends: records vitals
README.md - Flask API routes → Measurement and safety checks: checks symptoms
- Flask API routes → Vital status rules: evaluates readings
- Flask API routes → Vital logs and trends: stores and reads logs
- Vital logs and trends → Domain records: persists health logs
backend/repositories/health_repository.py - User → Medication reminders: schedules reminders
README.md - Medication reminders → Flask API routes: manages reminders
README.md - Flask API routes → Reminder scheduling: dispatches reminder work
- Reminder scheduling → Notification storage: stores reminder state
- Reminder scheduling → Database and scheduler: schedules jobs
backend/notifications.py - Application setup → Application configuration: loads settings
backend/__init__.py - Application setup → Flask API routes: registers routes
backend/__init__.py - Application setup → Database and scheduler: initializes extensions
backend/__init__.py - Chat and search storage → Domain records: persists chat records
backend/repositories/chat_repository.py - Notification storage → Domain records: persists reminders
backend/repositories/notification_repository.py - Chat history → Chat and search storage: reads chat records
backend/history.py - Language and safety guide → Chat and workspace: localizes interface