How gaggs-daggs/cmc works
This repository is a multilingual health-assistance product: users provide symptoms by chat or voice, optionally supply vitals, and receive triage-oriented guidance. Its backend also supports prescription analysis and messaging channels, with web and mobile interfaces. The README documents voice, language, vitals, diagnosis, and offline capabilities; the source index and excerpts establish only some implementation links, so other relationships are left unconnected rather than inferred.
Main entry points: ai_service_v2.py AI health assistant · prescription_routes.py Prescription routes · main.py FastAPI application · App.jsx Health web app
Components 25
User experience
- Health web app
frontend/web/src/App.jsx - Body selector
frontend/web/src/components/BodySelector.jsx - iOS app
mobile/ios/Charaka/Charaka/ContentView.swift - Prescription interface
prescription-module/frontend/src/App.jsx
Health guidance
- AI health assistant
backend/app/services/ai_service_v2.py - Differential diagnosis
backend/app/services/diagnosis_engine.py - Medical knowledge
backend/app/data/medical_database.py - Drug information
backend/app/services/medical_databases/drug_info_service.py - Speech services
backend/app/services/speech/stt_service.py - Language processing
backend/app/services/nlp/translator.py
Prescription care
- Prescription routes
backend/app/routes/prescription_routes.py - Prescription vision
backend/app/services/prescription_vision_service.py - Prescription analysis
prescription-module/backend/app/services/analysis_service.py - Prescription store
backend/app/services/prescription_store.py - Prescription Q&A
prescription-module/backend/app/routes/qa_routes.py
Sessions and channels
- FastAPI application
backend/app/main.py - Conversation routes
backend/app/routes/conversation_routes.py - Session routes
backend/app/routes/session_routes.py - Session persistence
backend/app/services/database/postgres_session_service.py - In-memory database
backend/app/utils/database.py - WhatsApp channel
backend/app/routes/whatsapp_routes.py
Sensors and external services
- Vitals routes
backend/app/routes/vitals_routes.py - Vitals simulator
iot/simulator/vitals_simulator.py - Offline storage
frontend/web/src/utils/offlineStorage.js
Other components
- Patient
Connections 25
- Patient → Health web app: uses
README.md - Patient → iOS app: uses
- Health web app → Body selector: renders
frontend/web/src/App.jsx - Health web app → FastAPI application: sends health requests
README.md - FastAPI application → Conversation routes: routes to
backend/app/main.py - FastAPI application → Session routes: routes to
backend/app/main.py - Conversation routes → AI health assistant: calls
backend/app/routes/conversation_routes.py - Conversation routes → Session routes: uses session routes
backend/app/routes/conversation_routes.py - Session routes → Session persistence: persists sessions
backend/app/routes/session_routes.py - FastAPI application → In-memory database: initializes
backend/app/main.py - WhatsApp channel → AI health assistant: processes messages
backend/app/routes/whatsapp_routes.py - AI health assistant → Differential diagnosis: uses diagnosis
backend/app/services/ai_service_v2.py - AI health assistant → Medical knowledge: reads knowledge
backend/app/services/ai_service_v2.py - AI health assistant → Drug information: queries drug data
backend/app/services/ai_service_v2.py - AI health assistant → Language processing: uses translation
backend/app/services/ai_service_v2.py - Patient → Speech services: speaks symptoms
README.md - Patient → Vitals routes: submits readings
README.md - Patient → Offline storage: uses offline mode
README.md - Patient → Prescription interface: uses
- Prescription interface → Prescription routes: uploads prescription
- Prescription routes → Prescription vision: analyzes images
backend/app/routes/prescription_routes.py - Prescription routes → Prescription analysis: requests analysis
backend/app/routes/prescription_routes.py - Prescription routes → Prescription store: stores results
backend/app/routes/prescription_routes.py - Prescription Q&A → Prescription store: reads history
prescription-module/backend/app/routes/qa_routes.py - Prescription Q&A → Prescription analysis: asks questions
prescription-module/backend/app/routes/qa_routes.py