How orfanel-0205/promain-be works
Ka Agapay is a Laravel backend for community and rural health services, serving residents and RHU staff through an API. Its core workflow covers account access and resident requests, appointment and queue handling, staff consultations and prescriptions, with telemedicine as an alternate care path. Separate capabilities include AI assistance, health analytics, notifications, and administration. The tree and source index establish these product areas; several subsystems are unsampled, so their internal links are omitted rather than inferred.
Main entry points: api.php API routes · AppointmentController.php Appointments · QueueController.php Queue management · TelemedicineController.php Telemedicine requests
Components 23
Access and profiles
- API routes
ka-agapay-backend/routes/api.php - Authentication
ka-agapay-backend/app/Http/Controllers/Api/AuthController.php - Resident profiles
ka-agapay-backend/app/Models/ResidentProfile.php
Care delivery
- Appointments
ka-agapay-backend/app/Http/Controllers/Api/AppointmentController.php - Appointment records
ka-agapay-backend/app/Models/Appointment.php - Queue management
ka-agapay-backend/app/Http/Controllers/Api/Queue/QueueController.php - Queue service
ka-agapay-backend/app/Services/Queue/QueueService.php - Queue tickets
ka-agapay-backend/app/Models/QueueTicket.php - Consultations
ka-agapay-backend/app/Models/Consultation.php - Prescriptions
ka-agapay-backend/app/Http/Controllers/Api/PrescriptionController.php
Telemedicine
- Telemedicine requests
ka-agapay-backend/app/Http/Controllers/Api/Telemedicine/TelemedicineController.php - Telemedicine service
ka-agapay-backend/app/Services/Telemedicine/TelemedicineService.php - Telemedicine request data
ka-agapay-backend/app/Models/TelemedicineRequest.php - Session records
ka-agapay-backend/app/Models/TelemedicineSession.php
Intelligence
- AI assistance
ka-agapay-backend/app/Http/Controllers/Api/Ai/AiController.php - AI triage
ka-agapay-backend/app/Services/Ai/AiTriageService.php - Health analytics
ka-agapay-backend/app/Http/Controllers/Api/Analytics/AnalyticsController.php - Outbreak detection
ka-agapay-backend/app/Services/Analytics/OutbreakDetector.php - Chat assistant
ka-agapay-backend/app/Http/Controllers/Api/ChatController.php
Operations
- Notifications
ka-agapay-backend/app/Services/Notification/NotificationService.php - Administration
ka-agapay-backend/app/Http/Controllers/Api/AdminController.php
Other components
- Resident
- RHU staff
Connections 26
- Resident → API routes: sends requests
ka-agapay-backend/routes/api.php - RHU staff → API routes: sends requests
ka-agapay-backend/routes/api.php - API routes → Authentication: routes to
ka-agapay-backend/routes/api.php - API routes → Appointments: routes to
ka-agapay-backend/routes/api.php - API routes → Queue management: routes to
ka-agapay-backend/routes/api.php - API routes → Prescriptions: routes to
ka-agapay-backend/routes/api.php - API routes → Telemedicine requests: routes to
ka-agapay-backend/routes/api.php - API routes → AI assistance: routes to
ka-agapay-backend/routes/api.php - API routes → Health analytics: routes to
ka-agapay-backend/routes/api.php - API routes → Chat assistant: routes to
ka-agapay-backend/app/Http/Controllers/Api/ChatController.php - API routes → Administration: routes to
ka-agapay-backend/routes/api.php - Appointments → Appointment records: reads and writes
ka-agapay-backend/app/Http/Controllers/Api/AppointmentController.php - Appointments → Queue service: calls
ka-agapay-backend/app/Http/Controllers/Api/AppointmentController.php - Appointments → Notifications: notifies through
ka-agapay-backend/app/Http/Controllers/Api/AppointmentController.php - Appointment records → Consultations: has one
ka-agapay-backend/app/Models/Appointment.php - Queue management → Queue service: calls
ka-agapay-backend/app/Http/Controllers/Api/Queue/QueueController.php - Queue management → Queue tickets: reads and writes
ka-agapay-backend/app/Http/Controllers/Api/Queue/QueueController.php - Queue tickets → Consultations: references
ka-agapay-backend/app/Models/QueueTicket.php - Resident profiles → Queue tickets: has many
ka-agapay-backend/app/Models/ResidentProfile.php - Telemedicine requests → Telemedicine service: calls
ka-agapay-backend/app/Http/Controllers/Api/Telemedicine/TelemedicineController.php - Telemedicine requests → Telemedicine request data: reads and writes
ka-agapay-backend/app/Http/Controllers/Api/Telemedicine/TelemedicineController.php - Telemedicine request data → Session records: has one
ka-agapay-backend/app/Models/TelemedicineRequest.php - Session records → Consultations: references
ka-agapay-backend/app/Models/TelemedicineSession.php - AI assistance → AI triage: calls
ka-agapay-backend/app/Http/Controllers/Api/Ai/AiController.php - Health analytics → Outbreak detection: uses
- Chat assistant → AI assistance: uses assistant services