How pravin2909/clinical-decision-support-system works
This is a clinical decision-support application: users submit symptoms, images, or audio through a web interface and receive a generated report; clinicians can also ask research-oriented questions. The backend orchestrates image routing and classification or text/audio processing, then returns reports, with optional account and consultation-history features. The graph reflects the documented endpoints and sampled calls; several UI, research, and model details are represented at subsystem level because their implementations were not excerpted.
Main entry points: main.py FastAPI endpoints · pipeline.py Analysis pipeline · db.py Database sessions · DashboardLayout.tsx Dashboard
Components 23
Web application
- App routing
frontend/src/App.tsx - Landing page
frontend/src/pages/LandingPage.tsx - Dashboard
frontend/src/pages/DashboardLayout.tsx - Diagnosis and chat
frontend/src/pages/ChatPage.tsx - Overview
frontend/src/pages/OverviewPage.tsx - Settings
frontend/src/pages/SettingsPage.tsx - API client
frontend/src/lib/api.ts - Report formatting
frontend/src/lib/format.ts
API and orchestration
- FastAPI endpoints
backend/main.py - Runtime configuration
backend/app/config.py
Clinical analysis
- Analysis pipeline
backend/app/pipeline.py - Model loading
backend/app/model_loader.py - Report generation
backend/app/reasoning.py - Speech processing
backend/app/speech.py - Clinical research
backend/app/research.py - OpenAI-compatible LLM
Accounts and history
- Authentication
backend/app/auth.py - User management
backend/app/users.py - Consultation history
backend/app/history.py - Database sessions
backend/app/db.py - Identity and records
backend/app/models_db.py - PostgreSQL
Other components
- User or clinician
Connections 29
- User or clinician → App routing: opens
frontend/src/App.tsx - App routing → Landing page: routes to
frontend/src/App.tsx - App routing → Dashboard: routes to
frontend/src/App.tsx - Dashboard → Overview: shows
frontend/src/App.tsx - Dashboard → Diagnosis and chat: routes to
frontend/src/App.tsx - Dashboard → Settings: routes to
frontend/src/App.tsx - Diagnosis and chat → API client: calls
frontend/src/pages/ChatPage.tsx - Diagnosis and chat → Report formatting: formats reports
frontend/src/pages/ChatPage.tsx - API client → FastAPI endpoints: requests
- FastAPI endpoints → Analysis pipeline: dispatches analysis
backend/main.py - FastAPI endpoints → Clinical research: dispatches research
backend/main.py - FastAPI endpoints → Consultation history: saves consultations
backend/main.py - FastAPI endpoints → User management: manages accounts
backend/main.py - FastAPI endpoints → Authentication: checks access
backend/main.py - Analysis pipeline → Model loading: uses models
backend/app/pipeline.py - Analysis pipeline → Report generation: generates report
backend/app/pipeline.py - Analysis pipeline → Speech processing: processes audio
backend/app/pipeline.py - Report generation → OpenAI-compatible LLM: generates text
- Authentication → Database sessions: loads users
backend/app/auth.py - Authentication → Identity and records: queries users
backend/app/auth.py - User management → Authentication: uses authentication
backend/app/users.py - User management → Database sessions: uses sessions
backend/app/users.py - User management → Identity and records: manages records
backend/app/users.py - Consultation history → Database sessions: uses sessions
backend/app/history.py - Consultation history → Identity and records: stores consultations
backend/app/history.py - Database sessions → PostgreSQL: reads and writes
backend/app/db.py - Database sessions → Identity and records: initializes tables
backend/app/db.py - Analysis pipeline → Runtime configuration: reads settings
backend/app/pipeline.py - FastAPI endpoints → Runtime configuration: loads settings
backend/main.py