How huzaifamustafa1126/hospital-management-system works
This is a role- and permission-controlled hospital operations system. Staff authenticate, register patients once, create repeat visits, associate doctors, fees and services, then manage visit billing and print invoices or receipts; administrators also manage revenue, audit activity and operational modules. The graph separates the React experience, API/auth boundary, clinical workflows, administration and persistence. Core patient, dashboard, lab, blood-bank and notification modules are retained from the source index, but their internal calls are not inferred where excerpts do not show them.
Main entry points: App.jsx Route application · api.js HTTP client · database.js MySQL pool · ServicesPage.jsx Services management
Components 25
Staff experience
- Route application
client/src/App.jsx - Patient workflows
client/src/pages/PatientDetailPage.jsx - Dashboard
client/src/pages/DashboardPage.jsx - Laboratory management
client/src/pages/LabManagementPage.jsx - Blood bank patient
client/src/pages/BloodBankPatientPage.jsx - Services management
client/src/pages/ServicesPage.jsx - Invoice preview
client/src/pages/InvoicePreviewPage.jsx
Identity and access
- Session context
client/src/context/AuthContext.jsx - HTTP client
client/src/services/api.js - API access control
server/src/middleware/auth.middleware.js - Authentication service
server/src/services/auth.service.js
Patient care
- Patient requests
client/src/services/patient.service.js - Lab catalog requests
client/src/services/lab-catalog.service.js - Patient endpoints
server/src/controllers/patient.controller.js - Patient and visits
server/src/services/patient.service.js - Lab catalog endpoints
server/src/controllers/lab-catalog.controller.js - Lab catalog
server/src/services/lab-catalog.service.js
Hospital operations
- Billing requests
client/src/services/billing.service.js - Service requests
client/src/services/service.service.js - Visit billing
server/src/services/billing.service.js - Audit activity
server/src/services/audit.service.js
API and persistence
- Hospital REST API
server/src/app.js - MySQL pool
server/src/db/database.js - Lab catalog routes
server/src/routes/lab-catalog.routes.js
Other components
- Hospital staff
Connections 30
- Hospital staff → Route application: uses
README.md - Route application → Patient workflows: routes to
client/src/App.jsx - Route application → Dashboard: routes to
client/src/App.jsx - Route application → Laboratory management: routes to
client/src/App.jsx - Route application → Blood bank patient: routes to
client/src/App.jsx - Route application → Services management: routes to
client/src/App.jsx - Route application → Session context: protects routes
- Patient workflows → Patient requests: requests data
- Laboratory management → Lab catalog requests: requests data
- Services management → Service requests: calls service
client/src/pages/ServicesPage.jsx - Services management → HTTP client: loads departments
- Invoice preview → Billing requests: loads bill
client/src/pages/InvoicePreviewPage.jsx - Patient requests → HTTP client: uses HTTP
client/src/services/patient.service.js - Lab catalog requests → HTTP client: uses HTTP
client/src/services/lab-catalog.service.js - Billing requests → HTTP client: uses HTTP
client/src/services/billing.service.js - Service requests → HTTP client: uses HTTP
- Session context → HTTP client: sends requests
- HTTP client → Hospital REST API: calls API
- Hospital REST API → Lab catalog routes: mounts routes
server/src/app.js - Lab catalog routes → API access control: authenticates
server/src/routes/lab-catalog.routes.js - Lab catalog routes → Lab catalog endpoints: dispatches
server/src/routes/lab-catalog.routes.js - Lab catalog endpoints → Lab catalog: calls
server/src/controllers/lab-catalog.controller.js - API access control → Authentication service: loads user
server/src/middleware/auth.middleware.js - Authentication service → MySQL pool: queries
server/src/services/auth.service.js - Patient endpoints → Patient and visits: calls
server/src/controllers/patient.controller.js - Patient and visits → MySQL pool: queries
server/src/services/patient.service.js - Lab catalog → MySQL pool: queries
server/src/services/lab-catalog.service.js - Lab catalog → Audit activity: records activity
server/src/services/lab-catalog.service.js - Audit activity → MySQL pool: writes records
server/src/services/audit.service.js - Visit billing → MySQL pool: persists billing