How dudd203204/pj-01-clinic-management-fe works
This is a React frontend for managing a private medical clinic. Staff sign in, then use role-protected screens to register patients, manage examination queues, record consultations and prescriptions, handle billing, and review reports; administrators maintain accounts, permissions, and clinic rules. The README also identifies medicine-lot inventory and stock warnings as product capabilities. The graph follows documented routes and sampled calls; unsampled feature internals and backend persistence are not inferred.
Main entry points: fetchDataAction Data fetch actions · authHelper.js Route protection · App.js App router · index.js Examination queue
Components 22
Access and navigation
- App router
src/App.js - Authentication
src/pages/Login/index.js - Route protection
src/helpers/authHelper.js
Clinic operations
- Patient registration
src/pages/TiepDon - Examination queue
src/pages/KhamBenh/index.js - Consultation records
src/popups/CTKhamBenh/subTabs/TTK/index.js - Prescriptions
src/popups/CTKhamBenh/subTabs/DT/index.js - Clinical services
src/pages/KhamBenh/CanLamSang/index.js - Patient lookup
src/pages/KhachHang/index.js - Billing
src/popups/ThanhToan/index.js - Medicine inventory
src/pages/Thuoc/index.js - Clinic reports
src/pages/Dashboard
Administration
- Account management
src/pages/Admin/tabpages/DSTaiKhoan/index.js - Role permissions
src/pages/Admin/tabpages/PhanQuyen/index.js - Clinic rules
src/pages/Admin/tabpages/QuyDinh
Application data
- Redux state
src/redux/store.js - Data fetch actions
src/redux/action/fetchDataAction - Authentication state
src/redux/slice/other/authSlices.js - HTTP client
src/setup/axios.js
Other components
- Clinic staff
- Clinic backend
- Socket service
Connections 33
- Clinic staff → App router: uses
src/App.js - App router → Authentication: routes publicly
- App router → Route protection: protects private routes
src/App.js - Route protection → Patient registration: permits access
- Route protection → Examination queue: permits access
- Route protection → Patient lookup: permits access
- Route protection → Medicine inventory: permits access
- Route protection → Clinic reports: permits access
- Route protection → Account management: permits access
- Route protection → Role permissions: permits access
- Route protection → Clinic rules: permits access
- Authentication → Redux state: updates identity
- Authentication → HTTP client: submits credentials
- App router → Authentication state: loads account
src/App.js - App router → Socket service: subscribes events
src/App.js - Patient registration → Data fetch actions: requests registration data
- Examination queue → Data fetch actions: loads queue
src/pages/KhamBenh/index.js - Examination queue → Consultation records: opens selected record
- Examination queue → Prescriptions: opens selected record
- Examination queue → Clinical services: opens selected record
- Patient lookup → Data fetch actions: loads patient records
- Billing → Data fetch actions: loads invoices
- Medicine inventory → Data fetch actions: loads stock data
src/pages/Thuoc/index.js - Clinic reports → Data fetch actions: loads statistics
src/pages/Dashboard/DichVu/index.js - Account management → Data fetch actions: loads accounts
- Role permissions → Data fetch actions: loads roles
- Clinic rules → Data fetch actions: loads clinic settings
- Data fetch actions → HTTP client: sends requests
src/redux/action/fetchDataAction/fetchDSDKAction.js - HTTP client → Clinic backend: calls API
src/setup/axios.js - Data fetch actions → Redux state: fills Redux state
src/redux/store.js - Socket service → App router: notifies changes
src/App.js - App router → Data fetch actions: dispatches refresh
src/App.js - Data fetch actions → Clinic backend: retrieves clinic data