How sor-channorakpitou/medflow works
MedFlow coordinates a hospital visit from reception and appointment booking through triage, clinical consultation, medication fulfillment, billing, and completion. Staff use role-specific dashboards; the backend exposes the workflow through Express routes, controllers, and services, with Prisma-backed state and Socket.IO updates. The README documents additional pipeline and reporting capabilities beyond the sampled source, so those branches are represented at their documented subsystem paths; links are limited where implementation wiring was not sampled.
Main entry points: controllers Request controllers · prisma.ts Prisma client · App.jsx Role-based app · services API services
Components 25
Staff dashboards
- Role-based app
Frontend/medflow-web/src/App.jsx - Reception desk
Frontend/medflow-web/src/pages/ReceptionistDash.jsx - Nurse dashboard
Frontend/medflow-web/src/pages/NurseDash.jsx - Doctor dashboard
Frontend/medflow-web/src/pages/DoctorDash.jsx - Pharmacy dashboard
Frontend/medflow-web/src/pages/PharmacistDash.jsx - Admin analytics
Frontend/medflow-web/src/pages/AdminDash.jsx - API services
Frontend/medflow-web/src/services
Backend API
- HTTP API
Backend/src/app.ts - Authentication
Backend/src/services/authService.ts - Auth endpoints
Backend/src/routes/authRoute.ts - Request controllers
Backend/src/controllers - Prisma client
Backend/src/lib/prisma.ts
Clinical workflow
- Registration and appointments
Backend/src/services - Triage and urgency
Backend/src/services/triageService.ts - Consultation and records
Backend/src/services/consultationService.ts - Queue workflow
Backend/src/services/queueService.ts
Fulfillment and administration
- Prescriptions
Backend/src/services/prescriptionService.ts - Medication inventory
Backend/src/services/medicationService.ts - Invoices and billing
Backend/src/services/billingService.ts - Staff and reporting
Backend/src/services/adminService.ts
Live updates
- Socket.IO server
Backend/src/server.ts - Socket context
Frontend/medflow-web/src/context/SocketContext.jsx
Other components
- Hospital staff
- PostgreSQL
- Cloudinary
Connections 39
- Hospital staff → Role-based app: uses
- Role-based app → Reception desk: routes to
- Role-based app → Nurse dashboard: routes to
- Role-based app → Doctor dashboard: routes to
- Role-based app → Pharmacy dashboard: routes to
- Role-based app → Admin analytics: routes to
- Reception desk → API services: requests
- Nurse dashboard → API services: requests
- Doctor dashboard → API services: requests
- Pharmacy dashboard → API services: requests
- Admin analytics → API services: requests
- API services → HTTP API: HTTP requests
- HTTP API → Auth endpoints: mounts
- Auth endpoints → Authentication: dispatches
- HTTP API → Request controllers: dispatches
- Request controllers → Registration and appointments: delegates
- Request controllers → Triage and urgency: delegates
- Request controllers → Consultation and records: delegates
- Request controllers → Prescriptions: delegates
- Request controllers → Medication inventory: delegates
- Request controllers → Invoices and billing: delegates
- Request controllers → Staff and reporting: delegates
- Request controllers → Queue workflow: delegates
- Authentication → Prisma client: reads and writes
- Consultation and records → Prisma client: persists records
- Triage and urgency → Prisma client: persists triage
- Prescriptions → Prisma client: updates prescriptions
- Medication inventory → Prisma client: reads inventory
- Invoices and billing → Prisma client: persists invoices
- Staff and reporting → Prisma client: queries data
- Queue workflow → Prisma client: updates queue
- Prisma client → PostgreSQL: queries
- Request controllers → Socket.IO server: emits events
- Socket.IO server → Socket context: broadcasts events
- Socket context → Reception desk: updates live
- Socket context → Nurse dashboard: updates live
- Socket context → Doctor dashboard: updates live
- Socket context → Pharmacy dashboard: updates live
- Request controllers → Cloudinary: uploads images