# luuthanh167/hopital-oop- architecture

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

- Interactive diagram: https://gitdiagram.com/luuthanh167/hopital-oop-
- Repository: https://github.com/luuthanh167/hopital-oop-

## Overview

HospitalOOP is an educational outpatient clinic management application. Its documented workflow creates a patient and doctor, schedules a future appointment with conflict checks, updates its status, then records and displays the visit outcome in the patient's medical record. Prescription and staff-role modeling are additional capabilities. The sampled services keep in-memory state; no persistent database or external integrations are shown. The README identifies the console entry point, but its source was not sampled, so those workflow links are based on documentation.

Main entry points: [`Test/Program.cs`](https://github.com/luuthanh167/hopital-oop-/blob/main/Test/Program.cs) (Console entry), [`Utilities/ValidationHelper.cs`](https://github.com/luuthanh167/hopital-oop-/blob/main/Utilities/ValidationHelper.cs) (Validation rules), [`Models/Appointment.cs`](https://github.com/luuthanh167/hopital-oop-/blob/main/Models/Appointment.cs) (Appointment), [`Services/AppointmentScheduler.cs`](https://github.com/luuthanh167/hopital-oop-/blob/main/Services/AppointmentScheduler.cs) (Appointment scheduler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Console workflow"]
  node_console["Console entry<br/>[Program.cs]"]
end

subgraph group_domain["Clinic models"]
  node_patient["Patient records<br/>[Patient.cs]"]
  node_staff["Staff roles<br/>[Staff.cs]"]
  node_appointment["Appointment<br/>[Appointment.cs]"]
  node_prescription["Prescription<br/>[Prescription.cs]"]
end

subgraph group_services["Clinic services"]
  node_scheduler["Appointment scheduler"]
  node_history["Medical history<br/>[MedicalHistory.cs]"]
end

subgraph group_validation["Validation"]
  node_validator["Validation rules"]
end

node_operator(("Clinic operator"))

node_operator -->|"uses"| node_console
node_console -->|"creates"| node_patient
node_console -->|"creates"| node_staff
node_console -->|"creates"| node_appointment
node_console -->|"schedules"| node_scheduler
node_console -->|"records visit"| node_history
node_scheduler -->|"checks and updates"| node_appointment
node_scheduler -->|"validates"| node_validator
node_history -->|"records outcome"| node_appointment
node_history -->|"updates record"| node_patient
node_appointment -->|"validates"| node_validator
node_patient -->|"validates"| node_validator
node_staff -->|"validates"| node_validator
node_prescription -->|"validates"| node_validator

click node_console "https://github.com/luuthanh167/hopital-oop-/blob/main/Test/Program.cs"
click node_patient "https://github.com/luuthanh167/hopital-oop-/blob/main/Models/Patient.cs"
click node_staff "https://github.com/luuthanh167/hopital-oop-/blob/main/Models/Staff.cs"
click node_appointment "https://github.com/luuthanh167/hopital-oop-/blob/main/Models/Appointment.cs"
click node_prescription "https://github.com/luuthanh167/hopital-oop-/blob/main/Models/Prescription.cs"
click node_scheduler "https://github.com/luuthanh167/hopital-oop-/blob/main/Services/AppointmentScheduler.cs"
click node_history "https://github.com/luuthanh167/hopital-oop-/blob/main/Services/MedicalHistory.cs"
click node_validator "https://github.com/luuthanh167/hopital-oop-/blob/main/Utilities/ValidationHelper.cs"

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_console toneBlue
class node_patient,node_staff,node_appointment,node_prescription toneAmber
class node_scheduler,node_history toneMint
class node_validator toneRose
class node_operator toneIndigo
```

## Components

### Console workflow

- [Console entry](https://github.com/luuthanh167/hopital-oop-/blob/main/Test/Program.cs): `Test/Program.cs`

### Clinic models

- [Patient records](https://github.com/luuthanh167/hopital-oop-/blob/main/Models/Patient.cs): `Models/Patient.cs`
- [Staff roles](https://github.com/luuthanh167/hopital-oop-/blob/main/Models/Staff.cs): `Models/Staff.cs`
- [Appointment](https://github.com/luuthanh167/hopital-oop-/blob/main/Models/Appointment.cs): `Models/Appointment.cs`
- [Prescription](https://github.com/luuthanh167/hopital-oop-/blob/main/Models/Prescription.cs): `Models/Prescription.cs`

### Clinic services

- [Appointment scheduler](https://github.com/luuthanh167/hopital-oop-/blob/main/Services/AppointmentScheduler.cs): `Services/AppointmentScheduler.cs`
- [Medical history](https://github.com/luuthanh167/hopital-oop-/blob/main/Services/MedicalHistory.cs): `Services/MedicalHistory.cs`

### Validation

- [Validation rules](https://github.com/luuthanh167/hopital-oop-/blob/main/Utilities/ValidationHelper.cs): `Utilities/ValidationHelper.cs`

### Other components

- **Clinic operator**

## Connections

- Clinic operator → Console entry: uses (evidence: `README.md`)
- Console entry → Patient records: creates (evidence: `README.md`)
- Console entry → Staff roles: creates (evidence: `README.md`)
- Console entry → Appointment: creates (evidence: `README.md`)
- Console entry → Appointment scheduler: schedules (evidence: `README.md`)
- Console entry → Medical history: records visit (evidence: `README.md`)
- Appointment scheduler → Appointment: checks and updates (evidence: `Services/AppointmentScheduler.cs`)
- Appointment scheduler → Validation rules: validates (evidence: `Services/AppointmentScheduler.cs`)
- Medical history → Appointment: records outcome (evidence: `Services/MedicalHistory.cs`)
- Medical history → Patient records: updates record (evidence: `Services/MedicalHistory.cs`)
- Appointment → Validation rules: validates (evidence: `Models/Appointment.cs`)
- Patient records → Validation rules: validates (evidence: `Models/Patient.cs`)
- Staff roles → Validation rules: validates (evidence: `Models/Staff.cs`)
- Prescription → Validation rules: validates (evidence: `Models/Prescription.cs`)
