How bisket77/project-clinic works
CLINICMS is a clinic-management application spanning registration and queueing, eligibility checks, screening, doctor consultation, pharmacy, billing, appointments, and administration. The primary workflow moves a patient from registration and queue through screening and consultation, then dispensing and payment. The React app presents role-based pages; the Go API routes requests to controllers backed by PostgreSQL, with WebSockets supporting documented real-time updates. README capabilities guide the broader map; sampled source confirms routing, clinical prescription handling, dispensing, billing, and frontend entry-point behavior, but not every subsystem’s internal wiring.
Main entry points: routes.go HTTP routes · App.tsx React application · api.ts API client · db.go PostgreSQL database
Components 26
Frontend experience
- React application
react-frontend/src/App.tsx - Patient registration
react-frontend/src/pages/Registration/RegistrationPage.tsx - Eligibility checks
react-frontend/src/pages/Eligibility/EligibilityPage.tsx - Queue dashboard
react-frontend/src/pages/Queue/QueuePage.tsx - Vitals screening
react-frontend/src/pages/Vitals/VitalsPage.tsx - Screening history
react-frontend/src/pages/ScreeningHistory/ScreeningHistoryPage.tsx - Doctor workspace
react-frontend/src/pages/doctor/DoctorExaminationPage.tsx - Pharmacy workspace
react-frontend/src/pages/pharmacy/MedicinePage.tsx - Billing workspace
react-frontend/src/pages/billing/BillingDashboardPage.tsx - Officer workspace
react-frontend/src/pages/officer/DocumentManagementPage.tsx - Frontend realtime context
react-frontend/src/context/WebSocketContext.tsx
API and access
- API client
react-frontend/src/services/api.ts - HTTP routes
golang-backend/internal/routes/routes.go - Auth and roles
golang-backend/internal/middleware/auth.go
Patient care
- Patient and queue API
golang-backend/internal/controllers/patient_controller.go - Eligibility API
golang-backend/internal/controllers/eligibility_controller.go - Vitals and triage API
golang-backend/internal/controllers/vitals_controller.go - Examination API
golang-backend/internal/controllers/examination_controller.go
Clinic operations
- Dispensing API
golang-backend/internal/controllers/dispensing_controller.go - Billing and payment API
golang-backend/internal/controllers/billing_controller.go - Appointment API
golang-backend/internal/controllers/appointment_controller.go - Document management API
golang-backend/internal/controllers/dms_controller.go - Admin access API
golang-backend/internal/controllers/admin_controller.go
Persistence and realtime
- PostgreSQL database
golang-backend/internal/config/db.go - WebSocket hub
golang-backend/internal/ws/hub.go
Other components
- Clinic staff
Connections 42
- Clinic staff → React application: uses
- React application → Patient registration: renders
- React application → Eligibility checks: renders
- React application → Queue dashboard: renders
- React application → Vitals screening: renders
- React application → Screening history: renders
- React application → Doctor workspace: renders
- React application → Pharmacy workspace: renders
- React application → Billing workspace: renders
- React application → Officer workspace: renders
- Patient registration → API client: requests
- Eligibility checks → API client: requests
- Queue dashboard → API client: requests
- Vitals screening → API client: requests
- Screening history → API client: requests
- Doctor workspace → API client: requests
- Pharmacy workspace → API client: requests
- Billing workspace → API client: requests
- Officer workspace → API client: requests
- API client → HTTP routes: calls
- HTTP routes → Auth and roles: guards
- HTTP routes → Patient and queue API: dispatches
- HTTP routes → Eligibility API: dispatches
- HTTP routes → Vitals and triage API: dispatches
- HTTP routes → Examination API: dispatches
- HTTP routes → Dispensing API: dispatches
- HTTP routes → Billing and payment API: dispatches
- HTTP routes → Appointment API: dispatches
- HTTP routes → Document management API: dispatches
- HTTP routes → Admin access API: dispatches
- Patient and queue API → PostgreSQL database: reads and writes
- Eligibility API → PostgreSQL database: reads and writes
- Vitals and triage API → PostgreSQL database: reads and writes
- Examination API → PostgreSQL database: reads and writes
- Examination API → Dispensing API: queues prescriptions
- Dispensing API → PostgreSQL database: records dispensing
- Dispensing API → Billing and payment API: creates billing queue
- Billing and payment API → PostgreSQL database: records payments
- Appointment API → PostgreSQL database: reads and writes
- Document management API → PostgreSQL database: reads and writes
- Admin access API → PostgreSQL database: reads and writes
- Frontend realtime context → WebSocket hub: connects