How huzaifa-bubere/medisense-ai works
MediSense AI combines a role-based hospital portal, a Node/Express clinical workflow API, and a FastAPI inference service. Patients can request appointments, monitor care, and conduct a Hindi/English/Hinglish voice consultation; the assistant produces a structured assessment that clinicians can review as a report. The README also documents deterministic safety checks, urgent alerts, and clinical ML tools. Edges are limited to README-described workflows and relationships visible in the supplied excerpts or SOURCE INDEX; unsampled implementation details are not inferred.
Main entry points: App.tsx Portal routing · ai-doctor.service.ts Consultation safety · database.ts Database client · main.py Inference API
Components 26
Hospital portal
- Portal routing
frontend/src/App.tsx - Patient portal
frontend/src/pages/PatientPortalPage.tsx - Appointments UI
frontend/src/pages/AppointmentsPage.tsx - Patient detail
frontend/src/pages/PatientDetailPage.tsx - ML predictions UI
frontend/src/pages/MLPredictionsPage.tsx
Clinical workflows
- Appointment requests
backend/src/modules/appointments/appointmentRequest.service.ts - Patient records
backend/src/modules/patients/patient.service.ts - Consultations
backend/src/modules/consultations/consultation.service.ts - Clinical reports
backend/src/modules/reports/report.service.ts - Clinical alerts
backend/src/modules/alerts/alert.service.ts
AI consultation
- AI Doctor page
frontend/src/pages/AiDoctorPage.tsx - AI Doctor endpoints
backend/src/modules/ai-doctor/ai-doctor.controller.ts - Consultation safety
backend/src/modules/ai-doctor/ai-doctor.service.ts - Voice agent
Clinical intelligence
- Inference API
ml-service/app/main.py - Bayesian risk
ml-service/app/api/routes/bayesian_engine.py - Knowledge retrieval
ml-service/app/rag/retriever.py - Clinical models
ml-service/app/api/routes/medisense_predict.py
Platform services
- API application
backend/src/app.ts - Authentication
backend/src/modules/auth/auth.service.ts - Request authorization
backend/src/middleware/auth.middleware.ts - Database client
backend/src/config/database.ts - PostgreSQL
- Live events
backend/src/config/socket.ts
Other components
- Patient
- Clinician
Connections 33
- Patient → Portal routing: uses portal
README.md - Portal routing → Patient portal: routes to
frontend/src/App.tsx - Portal routing → Appointments UI: routes to
frontend/src/App.tsx - Portal routing → Patient detail: routes to
frontend/src/App.tsx - Portal routing → ML predictions UI: routes to
frontend/src/App.tsx - Patient → Appointments UI: requests visit
README.md - Appointments UI → Appointment requests: submits request
- Appointment requests → Live events: emits request
backend/src/modules/appointments/appointmentRequest.service.ts - Patient → AI Doctor page: starts consultation
README.md - Portal routing → AI Doctor page: routes to
frontend/src/App.tsx - AI Doctor page → AI Doctor endpoints: calls endpoints
backend/src/modules/ai-doctor/ai-doctor.controller.ts - AI Doctor endpoints → Consultation safety: delegates to
backend/src/modules/ai-doctor/ai-doctor.controller.ts - Consultation safety → Voice agent: starts voice call
README.md - Voice agent → Consultation safety: sends transcript
- Consultation safety → Knowledge retrieval: retrieves context
README.md - Consultation safety → Clinical models: uses clinical AI
- Consultation safety → Clinical alerts: raises urgent alert
README.md - Consultation safety → Clinical reports: produces assessment
README.md - Clinical reports → Clinician: delivers report
README.md - Clinician → Patient detail: reviews care
README.md - Portal routing → API application: uses API
- API application → Authentication: mounts auth routes
backend/src/app.ts - Authentication → Database client: reads and writes
backend/src/modules/auth/auth.service.ts - Request authorization → Database client: checks user
backend/src/middleware/auth.middleware.ts - API application → Database client: connects database
backend/src/app.ts - Database client → PostgreSQL: connects
backend/src/config/database.ts - ML predictions UI → Inference API: requests predictions
- Inference API → Bayesian risk: registers route
ml-service/app/main.py - Inference API → Clinical models: registers routes
ml-service/app/main.py - Inference API → Knowledge retrieval: warms retrieval
ml-service/app/main.py - Patient records → Database client: persists records
- Consultations → Database client: persists encounters
- Clinical alerts → Live events: pushes alerts