How 2311060512-cloud/quanlyphongkham works
This is a Laravel microservices clinic-management system. A client enters through the API gateway, where JWT identity and role checks precede routing to the relevant service; the workflow spans account/provider management, patient registration and appointment handling, clinical services and test orders, then invoice generation and payment. Each service owns its database. The README documents billing’s cross-service data gathering and the gateway’s health checks. Sampled controller excerpts support the appointment, clinical, billing, and proxy flows; unsampled capabilities are included only where the README identifies them, with uncertain implementation links omitted.
Main entry points: CongGiaoTiepController.php Reverse proxy and health · HoaDonService.php Invoice aggregation and payment · Http/Controllers Patient and appointment API · Http/Controllers Accounts and authentication
Components 18
Gateway and portal
- JWT and role middleware
api-gateway/app/Http/Middleware - Reverse proxy and health
api-gateway/app/Http/Controllers/CongGiaoTiepController.php - Web portal
api-gateway/resources/views
Identity and providers
- Accounts and authentication
auth-service/app/Http/Controllers - Identity and provider logic
auth-service/app/Services - Identity database
auth-service/config/database.php
Patients and appointments
- Patient and appointment API
appointment-service/app/Http/Controllers - Patient and appointment logic
appointment-service/app/Services - Appointment database
appointment-service/config/database.php - Appointment notifications
appointment-service/app/Notifications/ThongBaoLichHenNotification.php
Clinical services
- Clinical services API
clinical-service/app/Http/Controllers/DichVuController.php - Service orders and results
clinical-service/app/Services/DichVuService.php - Clinical database
clinical-service/config/database.php
Billing and payment
- Invoice and payment API
billing-service/app/Http/Controllers/HoaDonController.php - Invoice aggregation and payment
billing-service/app/Services/HoaDonService.php - Billing database
billing-service/config/database.php
Other components
- Web / API client
- Clinic microservices
Connections 21
- Web / API client → JWT and role middleware: submits requests
- JWT and role middleware → Accounts and authentication: validates JWT
- JWT and role middleware → Reverse proxy and health: authorizes and forwards
- Web / API client → Web portal: uses portal
- Reverse proxy and health → Accounts and authentication: proxies identity routes
- Reverse proxy and health → Patient and appointment API: proxies appointment routes
- Reverse proxy and health → Clinical services API: proxies clinical routes
- Reverse proxy and health → Invoice and payment API: proxies billing routes
- Reverse proxy and health → Clinic microservices: checks liveness
- Accounts and authentication → Identity and provider logic: invokes
- Identity and provider logic → Identity database: reads and writes
- Patient and appointment API → Patient and appointment logic: invokes
- Patient and appointment logic → Appointment database: reads and writes
- Patient and appointment API → Appointment notifications: sends notification
- Clinical services API → Service orders and results: invokes
- Service orders and results → Clinical database: reads and writes
- Invoice and payment API → Invoice aggregation and payment: invokes
- Invoice aggregation and payment → Billing database: reads and writes
- Invoice aggregation and payment → Accounts and authentication: fetches doctor pricing
- Invoice aggregation and payment → Patient and appointment API: fetches appointment
- Invoice aggregation and payment → Clinical services API: fetches clinical charges