# angiesunghoonie-afk/healthsystem architecture

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

- Interactive diagram: https://gitdiagram.com/angiesunghoonie-afk/healthsystem
- Repository: https://github.com/angiesunghoonie-afk/healthsystem

## Overview

Healthsystem is a PHP health-center records system with public information and registration alongside staff-facing records management. Visitors can explore services and register; authenticated staff use the dashboard to manage patients, consultations, medical records, medicine inventory, and users. Domain classes perform database operations, while shared navigation exposes role-specific routes. The service page also advertises vaccination, education, maternal/child, laboratory, dental, pharmacy, and emergency care; these are documented offerings, not separately evidenced runtime modules. Relationships reflect excerpts and SOURCE INDEX references; unsampled implementations are not inferred.

Main entry points: [`healthsystem2/config/database.php`](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/config/database.php) (PDO Connection), [`healthsystem2/components/sidebar.php`](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/components/sidebar.php) (Role Navigation), [`healthsystem2/classes/Patient.php`](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/classes/Patient.php) (Patient Domain), [`healthsystem2/modules/consultations.php`](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/modules/consultations.php) (Consultation Management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Access"]
  node_services["Service Information<br/>[services.php]"]
  node_registration["Registration<br/>[register.php]"]
end

subgraph group_auth["Accounts"]
  node_login["Login<br/>[login.php]"]
  node_authprocess["Account Processing<br/>[login_process.php]"]
end

subgraph group_clinical["Clinical Records"]
  node_patientsui["Patient Management<br/>[patients.php]"]
  node_consultui["Consultation Management<br/>[consultations.php]"]
  node_recordsui["Medical Records"]
  node_patientdomain["Patient Domain<br/>[Patient.php]"]
  node_consultdomain["Consultation Domain<br/>[Consultation.php]"]
  node_recorddomain["Medical Record Domain<br/>[MedicalRecord.php]"]
end

subgraph group_operations["Operations"]
  node_dashboard["Dashboard<br/>[dashboard.php]"]
  node_inventoryui["Medicine Inventory"]
  node_usersui["User Management<br/>[users.php]"]
  node_medicinedomain["Medicine Domain<br/>[Medicine.php]"]
end

subgraph group_foundation["Shared Infrastructure"]
  node_person["Person Helpers<br/>[person.php]"]
  node_navigation["Role Navigation<br/>[sidebar.php]"]
  node_connection["PDO Connection<br/>[database.php]"]
  node_database[("MySQL Database")]
end

node_visitor(("Visitor"))
node_staff(("Staff"))

node_visitor -->|"browses"| node_services
node_visitor -->|"registers"| node_registration
node_staff -->|"signs in"| node_login
node_login -->|"submits credentials"| node_authprocess
node_authprocess -->|"queries via"| node_connection
node_staff -.->|"opens"| node_dashboard
node_dashboard -->|"includes"| node_navigation
node_navigation -->|"links to"| node_patientsui
node_navigation -->|"links to"| node_consultui
node_navigation -->|"links to"| node_recordsui
node_navigation -->|"links to"| node_inventoryui
node_navigation -->|"links to"| node_usersui
node_patientsui -->|"uses"| node_patientdomain
node_consultui -->|"uses"| node_consultdomain
node_consultui -->|"uses"| node_patientdomain
node_recordsui -->|"uses"| node_recorddomain
node_recordsui -->|"uses"| node_patientdomain
node_inventoryui -->|"uses"| node_medicinedomain
node_usersui -->|"uses"| node_patientdomain
node_patientdomain -->|"extends"| node_person
node_consultdomain -->|"extends"| node_person
node_recorddomain -->|"extends"| node_person
node_medicinedomain -->|"extends"| node_person
node_services -->|"loads"| node_connection
node_dashboard -->|"loads"| node_connection
node_patientsui -->|"loads"| node_connection
node_consultui -->|"loads"| node_connection
node_recordsui -->|"loads"| node_connection
node_inventoryui -->|"loads"| node_connection
node_connection -->|"connects"| node_database
node_patientdomain -->|"queries"| node_database
node_consultdomain -->|"queries"| node_database
node_recorddomain -->|"queries"| node_database
node_medicinedomain -->|"queries"| node_database

click node_services "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/services.php"
click node_registration "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/register.php"
click node_login "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/login.php"
click node_authprocess "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/process/login_process.php"
click node_dashboard "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/dashboard.php"
click node_patientsui "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/modules/patients.php"
click node_consultui "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/modules/consultations.php"
click node_recordsui "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/modules/medical_records.php"
click node_inventoryui "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/modules/medicine_inventory.php"
click node_usersui "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/modules/users.php"
click node_patientdomain "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/classes/Patient.php"
click node_consultdomain "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/classes/Consultation.php"
click node_recorddomain "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/classes/MedicalRecord.php"
click node_medicinedomain "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/classes/Medicine.php"
click node_person "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/classes/person.php"
click node_navigation "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/components/sidebar.php"
click node_connection "https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/config/database.php"

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_services,node_registration toneBlue
class node_login,node_authprocess toneAmber
class node_patientsui,node_consultui,node_recordsui,node_patientdomain,node_consultdomain,node_recorddomain toneMint
class node_dashboard,node_inventoryui,node_usersui,node_medicinedomain toneRose
class node_person,node_navigation,node_connection,node_database,node_visitor,node_staff toneIndigo
```

## Components

### Public Access

- [Service Information](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/services.php): `healthsystem2/services.php`
- [Registration](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/register.php): `healthsystem2/register.php`

### Accounts

- [Login](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/login.php): `healthsystem2/login.php`
- [Account Processing](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/process/login_process.php): `healthsystem2/process/login_process.php`

### Clinical Records

- [Patient Management](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/modules/patients.php): `healthsystem2/modules/patients.php`
- [Consultation Management](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/modules/consultations.php): `healthsystem2/modules/consultations.php`
- [Medical Records](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/modules/medical_records.php): `healthsystem2/modules/medical_records.php`
- [Patient Domain](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/classes/Patient.php): `healthsystem2/classes/Patient.php`
- [Consultation Domain](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/classes/Consultation.php): `healthsystem2/classes/Consultation.php`
- [Medical Record Domain](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/classes/MedicalRecord.php): `healthsystem2/classes/MedicalRecord.php`

### Operations

- [Dashboard](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/dashboard.php): `healthsystem2/dashboard.php`
- [Medicine Inventory](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/modules/medicine_inventory.php): `healthsystem2/modules/medicine_inventory.php`
- [User Management](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/modules/users.php): `healthsystem2/modules/users.php`
- [Medicine Domain](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/classes/Medicine.php): `healthsystem2/classes/Medicine.php`

### Shared Infrastructure

- [Person Helpers](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/classes/person.php): `healthsystem2/classes/person.php`
- [Role Navigation](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/components/sidebar.php): `healthsystem2/components/sidebar.php`
- [PDO Connection](https://github.com/angiesunghoonie-afk/healthsystem/blob/main/healthsystem2/config/database.php): `healthsystem2/config/database.php`
- **MySQL Database**

### Other components

- **Visitor**
- **Staff**

## Connections

- Visitor → Service Information: browses (evidence: `healthsystem2/services.php`)
- Visitor → Registration: registers
- Staff → Login: signs in
- Login → Account Processing: submits credentials (evidence: `healthsystem2/process/login_process.php`)
- Account Processing → PDO Connection: queries via (evidence: `healthsystem2/process/login_process.php`)
- Staff → Dashboard: opens
- Dashboard → Role Navigation: includes (evidence: `healthsystem2/dashboard.php`)
- Role Navigation → Patient Management: links to (evidence: `healthsystem2/components/sidebar.php`)
- Role Navigation → Consultation Management: links to (evidence: `healthsystem2/components/sidebar.php`)
- Role Navigation → Medical Records: links to (evidence: `healthsystem2/components/sidebar.php`)
- Role Navigation → Medicine Inventory: links to (evidence: `healthsystem2/components/sidebar.php`)
- Role Navigation → User Management: links to (evidence: `healthsystem2/components/sidebar.php`)
- Patient Management → Patient Domain: uses (evidence: `healthsystem2/modules/patients.php`)
- Consultation Management → Consultation Domain: uses (evidence: `healthsystem2/modules/consultations.php`)
- Consultation Management → Patient Domain: uses (evidence: `healthsystem2/modules/consultations.php`)
- Medical Records → Medical Record Domain: uses (evidence: `healthsystem2/modules/medical_records.php`)
- Medical Records → Patient Domain: uses (evidence: `healthsystem2/modules/medical_records.php`)
- Medicine Inventory → Medicine Domain: uses (evidence: `healthsystem2/modules/medicine_inventory.php`)
- User Management → Patient Domain: uses (evidence: `healthsystem2/modules/users.php`)
- Patient Domain → Person Helpers: extends (evidence: `healthsystem2/classes/Patient.php`)
- Consultation Domain → Person Helpers: extends (evidence: `healthsystem2/classes/Consultation.php`)
- Medical Record Domain → Person Helpers: extends (evidence: `healthsystem2/classes/MedicalRecord.php`)
- Medicine Domain → Person Helpers: extends (evidence: `healthsystem2/classes/Medicine.php`)
- Service Information → PDO Connection: loads (evidence: `healthsystem2/services.php`)
- Dashboard → PDO Connection: loads (evidence: `healthsystem2/dashboard.php`)
- Patient Management → PDO Connection: loads (evidence: `healthsystem2/modules/patients.php`)
- Consultation Management → PDO Connection: loads (evidence: `healthsystem2/modules/consultations.php`)
- Medical Records → PDO Connection: loads (evidence: `healthsystem2/modules/medical_records.php`)
- Medicine Inventory → PDO Connection: loads (evidence: `healthsystem2/modules/medicine_inventory.php`)
- PDO Connection → MySQL Database: connects (evidence: `healthsystem2/config/database.php`)
- Patient Domain → MySQL Database: queries (evidence: `healthsystem2/classes/Patient.php`)
- Consultation Domain → MySQL Database: queries (evidence: `healthsystem2/classes/Consultation.php`)
- Medical Record Domain → MySQL Database: queries (evidence: `healthsystem2/classes/MedicalRecord.php`)
- Medicine Domain → MySQL Database: queries (evidence: `healthsystem2/classes/Medicine.php`)
