# luuthanh167/hopital architecture

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

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

## Overview

Hopital is a small hospital-domain system for registering patients, scheduling doctor appointments, and recording visit outcomes and prescriptions. The available source shows patient and staff models using shared validation; the README documents the broader care workflow, while scheduler, history, appointment, and prescription files have no visible implementation excerpts. Accordingly, the workflow links below reflect README-described capabilities, not verified calls between those subsystems.

Main entry points: [`Models/Patient.cs`](https://github.com/luuthanh167/hopital/blob/main/Models/Patient.cs) (Patient registration), [`Utilities/ValidationHelper.cs`](https://github.com/luuthanh167/hopital/blob/main/Utilities/ValidationHelper.cs) (Validation rules), [`Models/Staff.cs`](https://github.com/luuthanh167/hopital/blob/main/Models/Staff.cs) (Staff roles), [`Services/AppointmentScheduler.cs`](https://github.com/luuthanh167/hopital/blob/main/Services/AppointmentScheduler.cs) (Appointment scheduling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_care["Care workflow"]
  node_registration["Patient registration<br/>[Patient.cs]"]
  node_scheduler["Appointment scheduling"]
  node_history["Visit outcomes<br/>[MedicalHistory.cs]"]
end

subgraph group_records["Domain records"]
  node_patient["Patient record<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_shared["Shared validation"]
  node_validation["Validation rules"]
end

node_user(("Hospital user"))

node_user -->|"registers patients"| node_registration
node_user -->|"schedules appointments"| node_scheduler
node_user -->|"records outcomes"| node_history
node_user -->|"records prescriptions"| node_prescription
node_registration -->|"validates fields"| node_validation
node_staff -->|"validates fields"| node_validation

click node_registration "https://github.com/luuthanh167/hopital/blob/main/Models/Patient.cs"
click node_scheduler "https://github.com/luuthanh167/hopital/blob/main/Services/AppointmentScheduler.cs"
click node_history "https://github.com/luuthanh167/hopital/blob/main/Services/MedicalHistory.cs"
click node_patient "https://github.com/luuthanh167/hopital/blob/main/Models/Patient.cs"
click node_staff "https://github.com/luuthanh167/hopital/blob/main/Models/Staff.cs"
click node_appointment "https://github.com/luuthanh167/hopital/blob/main/Models/Appointment.cs"
click node_prescription "https://github.com/luuthanh167/hopital/blob/main/Models/Prescription.cs"
click node_validation "https://github.com/luuthanh167/hopital/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_registration,node_scheduler,node_history,node_user toneBlue
class node_patient,node_staff,node_appointment,node_prescription toneAmber
class node_validation toneMint
```

## Components

### Care workflow

- [Patient registration](https://github.com/luuthanh167/hopital/blob/main/Models/Patient.cs): `Models/Patient.cs`
- [Appointment scheduling](https://github.com/luuthanh167/hopital/blob/main/Services/AppointmentScheduler.cs): `Services/AppointmentScheduler.cs`
- [Visit outcomes](https://github.com/luuthanh167/hopital/blob/main/Services/MedicalHistory.cs): `Services/MedicalHistory.cs`

### Domain records

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

### Shared validation

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

### Other components

- **Hospital user**

## Connections

- Hospital user → Patient registration: registers patients (evidence: `README.md`)
- Hospital user → Appointment scheduling: schedules appointments (evidence: `README.md`)
- Hospital user → Visit outcomes: records outcomes (evidence: `README.md`)
- Hospital user → Prescription: records prescriptions (evidence: `README.md`)
- Patient registration → Validation rules: validates fields (evidence: `Models/Patient.cs`)
- Staff roles → Validation rules: validates fields (evidence: `Models/Staff.cs`)
