# nagarjuna-pradeepkumar/hospital-management-system architecture

> Architecture diagram of the GitHub repository nagarjuna-pradeepkumar/hospital-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nagarjuna-pradeepkumar/hospital-management-system
- Repository: https://github.com/nagarjuna-pradeepkumar/hospital-management-system

## Overview

This is a Vue/Express/MongoDB clinic-management application. Staff log in to role-based workspaces: reception registers and queues patients, doctors review patient records and maintain clinical history, complaints, prescriptions and lab results, while administrators manage users and attendance. The browser calls API routes, which dispatch to controllers that validate requests and read or update MongoDB models. The README documents the attendance planning/reporting and clinical capabilities; their detailed wiring is not fully shown in the sampled source, so those links are represented only where documented or evidenced.

Main entry points: [`server/router/index.js`](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/router/index.js) (API route dispatch), [`client/src/views/Doctor.vue`](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/views/Doctor.vue) (Doctor workspace), [`client/src/App.vue`](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/App.vue) (Vue app shell), [`client/src/views/Admin.vue`](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/views/Admin.vue) (Admin workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Staff workspaces"]
  node_app["Vue app shell<br/>[App.vue]"]
  node_login["Login workspace<br/>[Login.vue]"]
  node_reception["Reception desk<br/>[Reception.vue]"]
  node_patient_form["Patient registration"]
  node_patient_queue["Queue tokens<br/>[queview.vue]"]
  node_doctor["Doctor workspace<br/>[Doctor.vue]"]
  node_doctor_dash["Doctor dashboard"]
  node_doctor_queue["Doctor queue"]
  node_patient_console["Patient console"]
  node_patient_search["Patient search<br/>[searchpatient.vue]"]
  node_history_ui["Patient history<br/>[history.vue]"]
  node_complaint_ui["Complaints and tests<br/>[complaint.vue]"]
  node_admin_ui["Admin workspace<br/>[Admin.vue]"]
  node_user_admin["User management"]
  node_attendance_ui["Attendance tools<br/>[attendence.vue]"]
  node_calendar_ui["Attendance planning<br/>[workingdays.vue]"]
  node_attendance_report["Monthly reports"]
end

subgraph group_api["Application API"]
  node_http["HTTP API<br/>[axios.js]"]
  node_routes["API route dispatch<br/>[index.js]"]
  node_auth["Role checks<br/>[User_check.js]"]
end

subgraph group_clinical["Patient care"]
  node_patient_ctrl["Patient details<br/>[index.js]"]
  node_queue_ctrl["Patient queue<br/>[index.js]"]
  node_records_ctrl["History records<br/>[index.js]"]
  node_complaint_ctrl["Clinical notes and tests<br/>[index.js]"]
  node_stats_ctrl["Doctor statistics<br/>[index.js]"]
end

subgraph group_admin["Administration"]
  node_user_ctrl["User and login<br/>[index.js]"]
  node_calendar_ctrl["Calendar plans<br/>[index.js]"]
  node_attendance_ctrl["Attendance operations<br/>[index.js]"]
end

subgraph group_data["MongoDB records"]
  node_user_db[("User records<br/>[Users_schema.js]")]
  node_patient_db[("Patient records<br/>[patient_schema.js]")]
  node_queue_db[("Queue records")]
  node_record_db[("Clinical records")]
  node_attendance_db[("Attendance records")]
end

node_staff(("Clinic staff"))

node_staff -.->|"uses"| node_app
node_app -.->|"routes to"| node_login
node_app -.->|"routes to"| node_reception
node_app -.->|"routes to"| node_doctor
node_app -.->|"routes to"| node_admin_ui
node_reception -.->|"presents"| node_patient_form
node_reception -.->|"presents"| node_patient_queue
node_doctor -->|"presents"| node_doctor_dash
node_doctor -->|"presents"| node_doctor_queue
node_doctor -->|"presents"| node_patient_console
node_doctor -.->|"presents"| node_patient_search
node_doctor -.->|"presents"| node_history_ui
node_doctor -.->|"presents"| node_complaint_ui
node_admin_ui -.->|"presents"| node_user_admin
node_admin_ui -.->|"presents"| node_attendance_ui
node_admin_ui -.->|"presents"| node_calendar_ui
node_admin_ui -.->|"presents"| node_attendance_report
node_patient_search -->|"requests patients"| node_http
node_http -.->|"sends API requests"| node_routes
node_routes -->|"dispatches users"| node_user_ctrl
node_routes -->|"dispatches calendar"| node_calendar_ctrl
node_routes -->|"dispatches attendance"| node_attendance_ctrl
node_routes -->|"dispatches patients"| node_patient_ctrl
node_routes -->|"dispatches queue"| node_queue_ctrl
node_routes -->|"dispatches records"| node_records_ctrl
node_routes -->|"dispatches complaints"| node_complaint_ctrl
node_routes -->|"dispatches statistics"| node_stats_ctrl
node_user_ctrl -->|"reads and writes"| node_user_db
node_user_ctrl -->|"updates attendance"| node_attendance_db
node_calendar_ctrl -.->|"plans attendance"| node_attendance_db
node_attendance_ctrl -->|"reads and writes"| node_attendance_db
node_patient_ctrl -->|"reads and writes"| node_patient_db
node_queue_ctrl -->|"reads and writes"| node_queue_db
node_records_ctrl -->|"reads and writes"| node_record_db
node_complaint_ctrl -->|"updates clinical data"| node_record_db
node_stats_ctrl -->|"reads records"| node_record_db
node_auth -->|"checks roles"| node_user_db
node_complaint_ctrl -->|"checks doctor access"| node_auth

click node_app "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/App.vue"
click node_login "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/views/Login.vue"
click node_reception "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/views/Reception.vue"
click node_patient_form "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/reception/addeditpatientform.vue"
click node_patient_queue "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/reception/queview.vue"
click node_doctor "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/views/Doctor.vue"
click node_doctor_dash "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/doctor/doctor_dashboard.vue"
click node_doctor_queue "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/doctor/doctor_que_view.vue"
click node_patient_console "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/doctor/patient_console.vue"
click node_patient_search "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/doctor/searchpatient.vue"
click node_history_ui "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/doctor/history.vue"
click node_complaint_ui "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/doctor/complaint.vue"
click node_admin_ui "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/views/Admin.vue"
click node_user_admin "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/admin/addeditdeleteform.vue"
click node_attendance_ui "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/admin/attendence.vue"
click node_calendar_ui "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/admin/workingdays.vue"
click node_attendance_report "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/admin/calculate_attendence.vue"
click node_http "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/plugins/axios.js"
click node_routes "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/router/index.js"
click node_user_ctrl "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/users/user_details/index.js"
click node_calendar_ctrl "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/calendar/index.js"
click node_attendance_ctrl "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/users/user_attendence/index.js"
click node_patient_ctrl "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/patients/patient_details/index.js"
click node_queue_ctrl "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/patients/patient_que/index.js"
click node_records_ctrl "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/patients/patient_records/index.js"
click node_complaint_ctrl "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/patients/patient_complaint/index.js"
click node_stats_ctrl "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/doctor/doctor_statistics/index.js"
click node_auth "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/functions/User_check.js"
click node_user_db "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/models/Users_schema.js"
click node_patient_db "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/models/patient_schema.js"
click node_queue_db "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/models/patient_que_schema.js"
click node_record_db "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/models/patient-record_schema.js"
click node_attendance_db "https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/models/attendence_schema.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_login,node_reception,node_patient_form,node_patient_queue,node_doctor,node_doctor_dash,node_doctor_queue,node_patient_console,node_patient_search,node_history_ui,node_complaint_ui,node_admin_ui,node_user_admin,node_attendance_ui,node_calendar_ui,node_attendance_report toneBlue
class node_http,node_routes,node_auth toneAmber
class node_patient_ctrl,node_queue_ctrl,node_records_ctrl,node_complaint_ctrl,node_stats_ctrl toneMint
class node_user_ctrl,node_calendar_ctrl,node_attendance_ctrl toneRose
class node_user_db,node_patient_db,node_queue_db,node_record_db,node_attendance_db,node_staff toneIndigo
```

## Components

### Staff workspaces

- [Vue app shell](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/App.vue): `client/src/App.vue`
- [Login workspace](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/views/Login.vue): `client/src/views/Login.vue`
- [Reception desk](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/views/Reception.vue): `client/src/views/Reception.vue`
- [Patient registration](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/reception/addeditpatientform.vue): `client/src/components/reception/addeditpatientform.vue`
- [Queue tokens](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/reception/queview.vue): `client/src/components/reception/queview.vue`
- [Doctor workspace](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/views/Doctor.vue): `client/src/views/Doctor.vue`
- [Doctor dashboard](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/doctor/doctor_dashboard.vue): `client/src/components/doctor/doctor_dashboard.vue`
- [Doctor queue](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/doctor/doctor_que_view.vue): `client/src/components/doctor/doctor_que_view.vue`
- [Patient console](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/doctor/patient_console.vue): `client/src/components/doctor/patient_console.vue`
- [Patient search](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/doctor/searchpatient.vue): `client/src/components/doctor/searchpatient.vue`
- [Patient history](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/doctor/history.vue): `client/src/components/doctor/history.vue`
- [Complaints and tests](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/doctor/complaint.vue): `client/src/components/doctor/complaint.vue`
- [Admin workspace](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/views/Admin.vue): `client/src/views/Admin.vue`
- [User management](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/admin/addeditdeleteform.vue): `client/src/components/admin/addeditdeleteform.vue`
- [Attendance tools](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/admin/attendence.vue): `client/src/components/admin/attendence.vue`
- [Attendance planning](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/admin/workingdays.vue): `client/src/components/admin/workingdays.vue`
- [Monthly reports](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/components/admin/calculate_attendence.vue): `client/src/components/admin/calculate_attendence.vue`

### Application API

- [HTTP API](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/client/src/plugins/axios.js): `client/src/plugins/axios.js`
- [API route dispatch](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/router/index.js): `server/router/index.js`
- [Role checks](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/functions/User_check.js): `server/functions/User_check.js`

### Patient care

- [Patient details](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/patients/patient_details/index.js): `server/controller/patients/patient_details/index.js`
- [Patient queue](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/patients/patient_que/index.js): `server/controller/patients/patient_que/index.js`
- [History records](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/patients/patient_records/index.js): `server/controller/patients/patient_records/index.js`
- [Clinical notes and tests](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/patients/patient_complaint/index.js): `server/controller/patients/patient_complaint/index.js`
- [Doctor statistics](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/doctor/doctor_statistics/index.js): `server/controller/doctor/doctor_statistics/index.js`

### Administration

- [User and login](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/users/user_details/index.js): `server/controller/users/user_details/index.js`
- [Calendar plans](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/calendar/index.js): `server/controller/calendar/index.js`
- [Attendance operations](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/controller/users/user_attendence/index.js): `server/controller/users/user_attendence/index.js`

### MongoDB records

- [User records](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/models/Users_schema.js): `server/models/Users_schema.js`
- [Patient records](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/models/patient_schema.js): `server/models/patient_schema.js`
- [Queue records](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/models/patient_que_schema.js): `server/models/patient_que_schema.js`
- [Clinical records](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/models/patient-record_schema.js): `server/models/patient-record_schema.js`
- [Attendance records](https://github.com/nagarjuna-pradeepkumar/hospital-management-system/blob/old-app/server/models/attendence_schema.js): `server/models/attendence_schema.js`

### Other components

- **Clinic staff**

## Connections

- Clinic staff → Vue app shell: uses (evidence: `README.md`)
- Vue app shell → Login workspace: routes to (evidence: `README.md`)
- Vue app shell → Reception desk: routes to (evidence: `README.md`)
- Vue app shell → Doctor workspace: routes to (evidence: `README.md`)
- Vue app shell → Admin workspace: routes to (evidence: `README.md`)
- Reception desk → Patient registration: presents (evidence: `README.md`)
- Reception desk → Queue tokens: presents (evidence: `README.md`)
- Doctor workspace → Doctor dashboard: presents (evidence: `client/src/views/Doctor.vue`)
- Doctor workspace → Doctor queue: presents (evidence: `client/src/views/Doctor.vue`)
- Doctor workspace → Patient console: presents (evidence: `client/src/views/Doctor.vue`)
- Doctor workspace → Patient search: presents (evidence: `README.md`)
- Doctor workspace → Patient history: presents (evidence: `README.md`)
- Doctor workspace → Complaints and tests: presents (evidence: `README.md`)
- Admin workspace → User management: presents (evidence: `README.md`)
- Admin workspace → Attendance tools: presents (evidence: `README.md`)
- Admin workspace → Attendance planning: presents (evidence: `README.md`)
- Admin workspace → Monthly reports: presents (evidence: `README.md`)
- Patient search → HTTP API: requests patients (evidence: `client/src/components/doctor/searchpatient.vue`)
- HTTP API → API route dispatch: sends API requests (evidence: `README.md`)
- API route dispatch → User and login: dispatches users (evidence: `server/router/index.js`)
- API route dispatch → Calendar plans: dispatches calendar (evidence: `server/router/index.js`)
- API route dispatch → Attendance operations: dispatches attendance (evidence: `server/router/index.js`)
- API route dispatch → Patient details: dispatches patients (evidence: `server/router/index.js`)
- API route dispatch → Patient queue: dispatches queue (evidence: `server/router/index.js`)
- API route dispatch → History records: dispatches records (evidence: `server/router/index.js`)
- API route dispatch → Clinical notes and tests: dispatches complaints (evidence: `server/router/index.js`)
- API route dispatch → Doctor statistics: dispatches statistics (evidence: `server/router/index.js`)
- User and login → User records: reads and writes (evidence: `server/controller/users/user_details/index.js`)
- User and login → Attendance records: updates attendance (evidence: `server/controller/users/user_details/index.js`)
- Calendar plans → Attendance records: plans attendance
- Attendance operations → Attendance records: reads and writes (evidence: `server/controller/users/user_attendence/index.js`)
- Patient details → Patient records: reads and writes (evidence: `server/controller/patients/patient_details/index.js`)
- Patient queue → Queue records: reads and writes (evidence: `server/controller/patients/patient_que/index.js`)
- History records → Clinical records: reads and writes (evidence: `server/controller/patients/patient_records/index.js`)
- Clinical notes and tests → Clinical records: updates clinical data (evidence: `server/controller/patients/patient_complaint/index.js`)
- Doctor statistics → Clinical records: reads records
- Role checks → User records: checks roles (evidence: `server/functions/User_check.js`)
- Clinical notes and tests → Role checks: checks doctor access (evidence: `server/controller/patients/patient_complaint/index.js`)
