How acprarthana/human_immunovirus-detection works
This is a hospital clinical workspace for longitudinal HIV patient records and research risk estimates. Doctors sign in, register and verify pseudonymous patients, enter clinical data, request an estimate, and review patient records, reports, and notifications. The backend exposes authentication, patient and clinical-record APIs, document handling, model information, and prediction workflows; predictions derive features from visits, invoke Python inference, and persist results. The frontend and several route implementations were not excerpted, so their unshown relationships are omitted; documented paths and sampled calls anchor the edges shown.
Main entry points: auth.js Token authentication · predictions.js Prediction workflow · WorkspaceDashboard.tsx Workspace dashboard · patients.js Patient records
Components 22
Clinical workspace
- Sign in
frontend/app/login/page.tsx - Workspace dashboard
frontend/app/dashboard/WorkspaceDashboard.tsx - Clinical entry
frontend/app/clinical/page.tsx - Patient profile
frontend/app/patients/[patientId]/page.tsx - Clinical report
frontend/app/report/page.tsx
Backend API
- Authentication routes
backend/src/routes/auth.js - Token authentication
backend/src/middleware/auth.js - Doctor services
backend/src/routes/doctors.js - Patient records
backend/src/routes/patients.js - Clinical visits
backend/src/routes/visits.js - Document handling
backend/src/routes/documents.js - Notifications
backend/src/routes/notifications.js - Model information
backend/src/routes/models.js - Prediction workflow
backend/src/routes/predictions.js
Risk modeling
- Visit feature builder
backend/src/services/featureService.js - Inference bridge
backend/src/services/mlService.js - Single prediction
ml/predict_single.py - Risk explanation
ml/explain.py - Trained model
ml/artifacts/best_model.pkl
Persistence
- Supabase client
backend/src/supabase.js - Supabase database
Other components
- Hospital doctor
Connections 33
- Hospital doctor → Sign in: signs in
- Hospital doctor → Workspace dashboard: manages records
- Workspace dashboard → Authentication routes: requests profile
frontend/app/dashboard/WorkspaceDashboard.tsx - Workspace dashboard → Patient records: lists and adds
frontend/app/dashboard/WorkspaceDashboard.tsx - Workspace dashboard → Doctor services: loads stats
frontend/app/dashboard/WorkspaceDashboard.tsx - Workspace dashboard → Prediction workflow: requests estimate
frontend/app/dashboard/WorkspaceDashboard.tsx - Workspace dashboard → Notifications: updates alerts
frontend/app/dashboard/WorkspaceDashboard.tsx - Authentication routes → Supabase client: queries accounts
backend/src/routes/auth.js - Authentication routes → Token authentication: protects profile
backend/src/routes/auth.js - Token authentication → Supabase client: loads doctor
backend/src/middleware/auth.js - Doctor services → Token authentication: authenticates requests
backend/src/routes/doctors.js - Patient records → Token authentication: authenticates requests
backend/src/routes/patients.js - Clinical visits → Token authentication: authenticates requests
backend/src/routes/visits.js - Document handling → Token authentication: authenticates requests
backend/src/routes/documents.js - Notifications → Token authentication: authenticates requests
backend/src/routes/notifications.js - Model information → Token authentication: authenticates requests
backend/src/routes/models.js - Prediction workflow → Token authentication: authenticates requests
backend/src/routes/predictions.js - Patient records → Supabase client: reads and writes
backend/src/routes/patients.js - Prediction workflow → Supabase client: loads and saves
backend/src/routes/predictions.js - Authentication routes → Supabase database: queries accounts
backend/src/routes/auth.js - Patient records → Supabase database: stores patient data
backend/src/routes/patients.js - Prediction workflow → Supabase database: stores estimates
backend/src/routes/predictions.js - Supabase client → Supabase database: creates client
backend/src/supabase.js - Prediction workflow → Visit feature builder: builds visit features
backend/src/routes/predictions.js - Prediction workflow → Inference bridge: runs inference
backend/src/routes/predictions.js - Inference bridge → Single prediction: executes script
backend/src/services/mlService.js - Single prediction → Risk explanation: uses explanations
ml/predict_single.py - Inference bridge → Trained model: checks availability
backend/src/services/mlService.js - Clinical entry → Clinical visits: submits clinical data
- Patient profile → Patient records: views patient
- Patient profile → Clinical visits: views visits
- Patient profile → Prediction workflow: reviews estimates
- Clinical report → Document handling: uploads reports