How kanimozhis-877/try-catch-us works
Healthcare Information Platform organizes patient profiles and medical reports, with AI-generated clinical context as a central capability. The main evidenced workflow is client request → FastAPI routes → domain services → MongoDB; report context can also be assembled for AI analysis, while QR sessions provide temporary access. The graph includes documented route families beyond the sampled handlers, but omits their internal links where source was not shown.
Main entry points: mongodb.py MongoDB · patient_routes.py Patient routes · main.py HTTP application · auth_service.py Authentication
Components 26
API and identity
- HTTP application
backend/app/main.py - Authentication routes
backend/routes/auth_routes.py - Authentication
backend/services/auth_service.py - Token signing
backend/security/jwt_handler.py - Access control
backend/app/dependencies.py
Patient records
- Patient routes
backend/routes/patient_routes.py - Patient profiles
backend/services/patient_service.py - Medical uploads
backend/routes/upload_routes.py - Medical records
backend/routes/medical_record_routes.py - Report management
backend/services/report_service.py - Lab results
backend/routes/lab_result_routes.py - Doctor directory
backend/routes/doctor_routes.py - Emergency access
backend/routes/emergency_routes.py
Clinical insights
- AI analysis routes
backend/routes/ai_routes.py - AI orchestration
backend/services/ai_service.py - Patient context
backend/ai/context_engine.py - Language model client
backend/ai/ollama_client.py - Record comparison
backend/routes/comparison_routes.py - Clinical dashboard
backend/routes/dashboard_routes.py
Data and access
- QR access routes
backend/routes/qr_routes.py - QR sessions
backend/services/qr_service.py - Language preferences
backend/services/language_service.py - MongoDB
backend/database/mongodb.py - Repository base
backend/database/repositories/base_repository.py
Other components
- API client
- Ollama endpoint
Connections 26
- API client → HTTP application: sends requests
backend/app/main.py - HTTP application → Authentication routes: registers router
backend/app/main.py - HTTP application → Patient routes: registers router
backend/app/main.py - Authentication routes → Authentication: calls
backend/routes/auth_routes.py - Authentication → MongoDB: reads and writes
backend/services/auth_service.py - Authentication → Token signing: creates token
backend/services/auth_service.py - Patient routes → Patient profiles: calls
backend/routes/patient_routes.py - Patient routes → Report management: uploads and manages reports
backend/routes/patient_routes.py - AI analysis routes → AI orchestration: calls
backend/routes/ai_routes.py - AI orchestration → Patient context: builds context
backend/services/ai_service.py - AI orchestration → Language model client: requests generation
backend/services/ai_service.py - Patient context → MongoDB: reads patient data
backend/ai/context_engine.py - Language model client → Ollama endpoint: posts prompt
- QR access routes → QR sessions: calls
backend/routes/qr_routes.py - QR sessions → MongoDB: reads and writes
backend/services/qr_service.py - Patient routes → Access control: uses auth dependency
- Access control → Token signing: verifies token
- Repository base → MongoDB: uses database
backend/database/repositories/base_repository.py - Medical uploads → MongoDB: stores upload metadata
- Medical records → MongoDB: accesses records
- Lab results → MongoDB: accesses results
- Doctor directory → MongoDB: accesses directory
- Emergency access → MongoDB: accesses emergency data
- Record comparison → MongoDB: compares records
- Clinical dashboard → MongoDB: reads summaries
backend/routes/dashboard_routes.py - Language preferences → MongoDB: stores preferences
backend/services/language_service.py