# kwanhochan/oop-project architecture

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

- Interactive diagram: https://gitdiagram.com/kwanhochan/oop-project
- Repository: https://github.com/kwanhochan/oop-project

## Overview

This is a small, menu-driven Alberta Hospital management program. Users choose doctor or patient operations; the corresponding manager handles records and persists changes in text files. The README describes the doctor and patient classes/managers and a management board. The sampled source confirms menu dispatch and file-backed managers; omitted code limits certainty about the details of some manager operations.

Main entry points: [`manage_system.py`](https://github.com/kwanhochan/oop-project/blob/main/manage_system.py) (Management menus), [`Project Data/doctors.txt`](https://github.com/kwanhochan/oop-project/blob/main/Project%20Data/doctors.txt) (Doctor data), [`Project Data/patients.txt`](https://github.com/kwanhochan/oop-project/blob/main/Project%20Data/patients.txt) (Patient data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_menus["Menu control"]
  node_management["Management menus<br/>[manage_system.py]"]
end

subgraph group_records["Record management"]
  node_doctor_manager["Doctor manager<br/>[manage_system.py]"]
  node_doctor["Doctor records<br/>[manage_system.py]"]
  node_patient_manager["Patient manager<br/>[manage_system.py]"]
  node_patient["Patient records<br/>[manage_system.py]"]
end

subgraph group_storage["Text storage"]
  node_doctors_file[("Doctor data<br/>[doctors.txt]")]
  node_patients_file[("Patient data<br/>[patients.txt]")]
end

node_user(("User"))

node_user -->|"selects options"| node_management
node_management -->|"dispatches doctor actions"| node_doctor_manager
node_management -->|"dispatches patient actions"| node_patient_manager
node_doctor_manager -->|"creates and updates"| node_doctor
node_patient_manager -->|"creates and updates"| node_patient
node_doctor_manager -->|"reads and writes"| node_doctors_file
node_patient_manager -->|"reads and writes"| node_patients_file

click node_management "https://github.com/kwanhochan/oop-project/blob/main/manage_system.py"
click node_doctor_manager "https://github.com/kwanhochan/oop-project/blob/main/manage_system.py"
click node_doctor "https://github.com/kwanhochan/oop-project/blob/main/manage_system.py"
click node_patient_manager "https://github.com/kwanhochan/oop-project/blob/main/manage_system.py"
click node_patient "https://github.com/kwanhochan/oop-project/blob/main/manage_system.py"
click node_doctors_file "https://github.com/kwanhochan/oop-project/blob/main/Project%20Data/doctors.txt"
click node_patients_file "https://github.com/kwanhochan/oop-project/blob/main/Project%20Data/patients.txt"

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_management,node_user toneBlue
class node_doctor_manager,node_doctor,node_patient_manager,node_patient toneAmber
class node_doctors_file,node_patients_file toneMint
```

## Components

### Menu control

- [Management menus](https://github.com/kwanhochan/oop-project/blob/main/manage_system.py): `manage_system.py`

### Record management

- [Doctor manager](https://github.com/kwanhochan/oop-project/blob/main/manage_system.py): `manage_system.py`
- [Doctor records](https://github.com/kwanhochan/oop-project/blob/main/manage_system.py): `manage_system.py`
- [Patient manager](https://github.com/kwanhochan/oop-project/blob/main/manage_system.py): `manage_system.py`
- [Patient records](https://github.com/kwanhochan/oop-project/blob/main/manage_system.py): `manage_system.py`

### Text storage

- [Doctor data](https://github.com/kwanhochan/oop-project/blob/main/Project%20Data/doctors.txt): `Project Data/doctors.txt`
- [Patient data](https://github.com/kwanhochan/oop-project/blob/main/Project%20Data/patients.txt): `Project Data/patients.txt`

### Other components

- **User**

## Connections

- User → Management menus: selects options
- Management menus → Doctor manager: dispatches doctor actions
- Management menus → Patient manager: dispatches patient actions
- Doctor manager → Doctor records: creates and updates
- Patient manager → Patient records: creates and updates
- Doctor manager → Doctor data: reads and writes
- Patient manager → Patient data: reads and writes
