# lordvcs/hospital-management-system architecture

> Architecture diagram of the GitHub repository lordvcs/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/lordvcs/hospital-management-system
- Repository: https://github.com/lordvcs/hospital-management-system

## Overview

This is a small Java Swing hospital-management proof of concept. An administrator opens the home screen, logs in against the users table, then uses the menu to view patient and doctor records and access billing; separate screens edit patient or doctor details. The application also provides About and Contact screens, with contact submissions stored in a database. The excerpts show the login, record queries, edits, billing queries, and contact submission; some menu navigation details are not visible, so those links are marked unverified or omitted.

Main entry points: [`MenuPage.java`](https://github.com/lordvcs/hospital-management-system/blob/master/MenuPage.java) (Management menu), [`HomePage.java`](https://github.com/lordvcs/hospital-management-system/blob/master/HomePage.java) (Login screen), [`Edit.java`](https://github.com/lordvcs/hospital-management-system/blob/master/Edit.java) (Edit patient), [`EditDoc.java`](https://github.com/lordvcs/hospital-management-system/blob/master/EditDoc.java) (Edit doctor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Login and navigation"]
  node_home["Login screen<br/>[HomePage.java]"]
  node_menu["Management menu<br/>[MenuPage.java]"]
end

subgraph group_records["Patient and doctor records"]
  node_patients["Patient records<br/>[MenuPage.java]"]
  node_patient_edit["Edit patient<br/>[Edit.java]"]
  node_doctors["Doctor records<br/>[MenuPage.java]"]
  node_doctor_edit["Edit doctor<br/>[EditDoc.java]"]
end

subgraph group_billing["Billing"]
  node_billing_ui["Patient billing<br/>[MenuPage.java]"]
end

subgraph group_info["Information and contact"]
  node_about["About screen<br/>[AboutUs.java]"]
  node_contact["Contact screen<br/>[ContactUs.java]"]
end

node_admin(("Administrator"))
node_hms_db[("HMS database")]
node_contact_db[("Contact database")]

node_admin -->|"opens"| node_home
node_home -->|"checks credentials"| node_hms_db
node_home -->|"opens after login"| node_menu
node_menu -->|"shows records"| node_patients
node_menu -->|"shows records"| node_doctors
node_patients -->|"queries"| node_hms_db
node_doctors -->|"queries"| node_hms_db
node_patient_edit -->|"reads and updates"| node_hms_db
node_doctor_edit -->|"reads and updates"| node_hms_db
node_billing_ui -->|"queries billing data"| node_hms_db
node_menu -.->|"opens editor"| node_patient_edit
node_menu -.->|"opens editor"| node_doctor_edit
node_patient_edit -->|"opens menu"| node_menu
node_doctor_edit -->|"opens menu"| node_menu
node_home -->|"opens"| node_about
node_contact -->|"returns home"| node_home
node_contact -->|"submits comments"| node_contact_db

click node_home "https://github.com/lordvcs/hospital-management-system/blob/master/HomePage.java"
click node_menu "https://github.com/lordvcs/hospital-management-system/blob/master/MenuPage.java"
click node_patients "https://github.com/lordvcs/hospital-management-system/blob/master/MenuPage.java"
click node_patient_edit "https://github.com/lordvcs/hospital-management-system/blob/master/Edit.java"
click node_doctors "https://github.com/lordvcs/hospital-management-system/blob/master/MenuPage.java"
click node_doctor_edit "https://github.com/lordvcs/hospital-management-system/blob/master/EditDoc.java"
click node_billing_ui "https://github.com/lordvcs/hospital-management-system/blob/master/MenuPage.java"
click node_about "https://github.com/lordvcs/hospital-management-system/blob/master/AboutUs.java"
click node_contact "https://github.com/lordvcs/hospital-management-system/blob/master/ContactUs.java"

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_home,node_menu toneBlue
class node_patients,node_patient_edit,node_doctors,node_doctor_edit,node_hms_db,node_contact_db toneAmber
class node_billing_ui toneMint
class node_about,node_contact toneRose
class node_admin toneIndigo
```

## Components

### Login and navigation

- [Login screen](https://github.com/lordvcs/hospital-management-system/blob/master/HomePage.java): `HomePage.java`
- [Management menu](https://github.com/lordvcs/hospital-management-system/blob/master/MenuPage.java): `MenuPage.java`

### Patient and doctor records

- [Patient records](https://github.com/lordvcs/hospital-management-system/blob/master/MenuPage.java): `MenuPage.java`
- [Edit patient](https://github.com/lordvcs/hospital-management-system/blob/master/Edit.java): `Edit.java`
- [Doctor records](https://github.com/lordvcs/hospital-management-system/blob/master/MenuPage.java): `MenuPage.java`
- [Edit doctor](https://github.com/lordvcs/hospital-management-system/blob/master/EditDoc.java): `EditDoc.java`

### Billing

- [Patient billing](https://github.com/lordvcs/hospital-management-system/blob/master/MenuPage.java): `MenuPage.java`

### Information and contact

- [About screen](https://github.com/lordvcs/hospital-management-system/blob/master/AboutUs.java): `AboutUs.java`
- [Contact screen](https://github.com/lordvcs/hospital-management-system/blob/master/ContactUs.java): `ContactUs.java`

### Other components

- **Administrator**
- **HMS database**
- **Contact database**

## Connections

- Administrator → Login screen: opens (evidence: `README.md`)
- Login screen → HMS database: checks credentials (evidence: `HomePage.java`)
- Login screen → Management menu: opens after login (evidence: `HomePage.java`)
- Management menu → Patient records: shows records (evidence: `MenuPage.java`)
- Management menu → Doctor records: shows records (evidence: `MenuPage.java`)
- Patient records → HMS database: queries (evidence: `MenuPage.java`)
- Doctor records → HMS database: queries (evidence: `MenuPage.java`)
- Edit patient → HMS database: reads and updates (evidence: `Edit.java`)
- Edit doctor → HMS database: reads and updates (evidence: `EditDoc.java`)
- Patient billing → HMS database: queries billing data (evidence: `MenuPage.java`)
- Management menu → Edit patient: opens editor (evidence: `MenuPage.java`)
- Management menu → Edit doctor: opens editor (evidence: `MenuPage.java`)
- Edit patient → Management menu: opens menu (evidence: `Edit.java`)
- Edit doctor → Management menu: opens menu (evidence: `EditDoc.java`)
- Login screen → About screen: opens (evidence: `HomePage.java`)
- Contact screen → Login screen: returns home (evidence: `ContactUs.java`)
- Contact screen → Contact database: submits comments (evidence: `ContactUs.java`)
