# ashaleyalcantara/sistema-de-triagem-reorganizado architecture

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

- Interactive diagram: https://gitdiagram.com/ashaleyalcantara/sistema-de-triagem-reorganizado
- Repository: https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado

## Overview

This Laravel clinic triage system takes staff from role-based login through reception, patient registration and a triage queue, then records clinical measures and urgency before the physician queue and consultation. Staff management and public waiting-room display are additional capabilities. Controllers own the workflow and query Eloquent models; the README describes SQLite as the default store. The route-to-controller and controller-to-view links are documented or visible in the supplied excerpts; unsampled route details and persistence wiring are not expanded.

Main entry points: [`routes/web.php`](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/TriagemController.php`](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/TriagemController.php) (Triage workflow), [`app/Models/Triagem.php`](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Models/Triagem.php) (Triage model), [`app/Http/Controllers/PacienteController.php`](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/PacienteController.php) (Reception queue)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_routes["Web routes<br/>[web.php]"]
  node_basecontroller["Controller base<br/>[Controller.php]"]
  node_bootstrap["Laravel application<br/>[app.php]"]
  node_provider["Application provider"]
end

subgraph group_staff["Staff access"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_loginview["Login screen<br/>[login.blade.php]"]
  node_staffmanage["Staff management"]
  node_staffviews["Staff screens"]
  node_profileviews["Profile screens<br/>[perfil.blade.php]"]
end

subgraph group_triage["Patient triage"]
  node_reception["Reception queue"]
  node_receptionview["Reception screen"]
  node_triageflow["Triage workflow"]
  node_triageview["Triage screens<br/>[painel.blade.php]"]
  node_callview["Call display"]
  node_callcontroller["Call panel controller"]
end

subgraph group_care["Medical care"]
  node_physician["Physician queue"]
  node_physicianview["Physician dashboard"]
end

subgraph group_data["Domain data"]
  node_employee["Employee model<br/>[Funcionario.php]"]
  node_patient["Patient model<br/>[Paciente.php]"]
  node_triage["Triage model<br/>[Triagem.php]"]
  node_user["Default user model<br/>[User.php]"]
  node_factory["User factory<br/>[UserFactory.php]"]
  node_sqlite[("SQLite database<br/>[database.php]")]
end

node_visitor(("Staff / visitor"))

node_visitor -->|"requests"| node_routes
node_routes -->|"routes to"| node_auth
node_routes -->|"routes to"| node_staffmanage
node_routes -->|"routes to"| node_reception
node_routes -->|"routes to"| node_triageflow
node_routes -->|"routes to"| node_physician
node_auth -->|"authenticates with"| node_employee
node_auth -->|"renders"| node_loginview
node_staffmanage -->|"manages"| node_employee
node_staffmanage -->|"renders"| node_staffviews
node_staffmanage -->|"renders"| node_profileviews
node_reception -->|"searches and creates"| node_patient
node_reception -->|"queues patients"| node_triage
node_reception -->|"renders"| node_receptionview
node_triageflow -->|"reads and updates"| node_triage
node_triageflow -->|"loads patient"| node_patient
node_triageflow -->|"renders"| node_triageview
node_triageflow -->|"renders"| node_callview
node_physician -->|"reads and updates"| node_triage
node_physician -->|"renders"| node_physicianview
node_callcontroller -->|"queries"| node_triage
node_patient -->|"has many"| node_triage
node_triage -->|"belongs to"| node_patient
node_employee -->|"references"| node_user
node_factory -->|"creates"| node_user
node_reception -.->|"persists via models"| node_sqlite
node_triageflow -.->|"persists via models"| node_sqlite
node_physician -.->|"persists via models"| node_sqlite
node_bootstrap -->|"loads"| node_routes

click node_routes "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/routes/web.php"
click node_auth "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/AuthController.php"
click node_loginview "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/login/login.blade.php"
click node_staffmanage "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/FuncionarioController.php"
click node_staffviews "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/Administrador/gestaoFuncionarios.blade.php"
click node_profileviews "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/funcionarios/perfil.blade.php"
click node_reception "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/PacienteController.php"
click node_receptionview "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/recepcionista.blade.php"
click node_triageflow "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/TriagemController.php"
click node_triageview "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/triagem/painel.blade.php"
click node_callview "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/painelChamada.blade.php"
click node_physician "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/MedicoController.php"
click node_physicianview "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/medico/dashboard.blade.php"
click node_callcontroller "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/PainelController.php"
click node_employee "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Models/Funcionario.php"
click node_patient "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Models/Paciente.php"
click node_triage "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Models/Triagem.php"
click node_user "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Models/User.php"
click node_factory "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/database/factories/UserFactory.php"
click node_sqlite "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/config/database.php"
click node_basecontroller "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/Controller.php"
click node_bootstrap "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/bootstrap/app.php"
click node_provider "https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Providers/AppServiceProvider.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_routes,node_basecontroller,node_bootstrap,node_provider toneBlue
class node_auth,node_loginview,node_staffmanage,node_staffviews,node_profileviews toneAmber
class node_reception,node_receptionview,node_triageflow,node_triageview,node_callview,node_callcontroller toneMint
class node_physician,node_physicianview toneRose
class node_employee,node_patient,node_triage,node_user,node_factory,node_sqlite,node_visitor toneIndigo
```

## Components

### Web entry

- [Web routes](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/routes/web.php): `routes/web.php`
- [Controller base](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/Controller.php): `app/Http/Controllers/Controller.php`
- [Laravel application](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [Application provider](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Providers/AppServiceProvider.php): `app/Providers/AppServiceProvider.php`

### Staff access

- [Authentication](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Login screen](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/login/login.blade.php): `resources/views/login/login.blade.php`
- [Staff management](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/FuncionarioController.php): `app/Http/Controllers/FuncionarioController.php`
- [Staff screens](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/Administrador/gestaoFuncionarios.blade.php): `resources/views/Administrador/gestaoFuncionarios.blade.php`
- [Profile screens](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/funcionarios/perfil.blade.php): `resources/views/funcionarios/perfil.blade.php`

### Patient triage

- [Reception queue](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/PacienteController.php): `app/Http/Controllers/PacienteController.php`
- [Reception screen](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/recepcionista.blade.php): `resources/views/recepcionista.blade.php`
- [Triage workflow](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/TriagemController.php): `app/Http/Controllers/TriagemController.php`
- [Triage screens](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/triagem/painel.blade.php): `resources/views/triagem/painel.blade.php`
- [Call display](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/painelChamada.blade.php): `resources/views/painelChamada.blade.php`
- [Call panel controller](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/PainelController.php): `app/Http/Controllers/PainelController.php`

### Medical care

- [Physician queue](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Http/Controllers/MedicoController.php): `app/Http/Controllers/MedicoController.php`
- [Physician dashboard](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/resources/views/medico/dashboard.blade.php): `resources/views/medico/dashboard.blade.php`

### Domain data

- [Employee model](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Models/Funcionario.php): `app/Models/Funcionario.php`
- [Patient model](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Models/Paciente.php): `app/Models/Paciente.php`
- [Triage model](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Models/Triagem.php): `app/Models/Triagem.php`
- [Default user model](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/app/Models/User.php): `app/Models/User.php`
- [User factory](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/database/factories/UserFactory.php): `database/factories/UserFactory.php`
- [SQLite database](https://github.com/ashaleyalcantara/sistema-de-triagem-reorganizado/blob/main/config/database.php): `config/database.php`

### Other components

- **Staff / visitor**

## Connections

- Staff / visitor → Web routes: requests
- Web routes → Authentication: routes to (evidence: `routes/web.php`)
- Web routes → Staff management: routes to (evidence: `routes/web.php`)
- Web routes → Reception queue: routes to (evidence: `routes/web.php`)
- Web routes → Triage workflow: routes to (evidence: `routes/web.php`)
- Web routes → Physician queue: routes to (evidence: `routes/web.php`)
- Authentication → Employee model: authenticates with (evidence: `app/Http/Controllers/AuthController.php`)
- Authentication → Login screen: renders (evidence: `app/Http/Controllers/AuthController.php`)
- Staff management → Employee model: manages (evidence: `app/Http/Controllers/FuncionarioController.php`)
- Staff management → Staff screens: renders (evidence: `app/Http/Controllers/FuncionarioController.php`)
- Staff management → Profile screens: renders (evidence: `app/Http/Controllers/FuncionarioController.php`)
- Reception queue → Patient model: searches and creates (evidence: `app/Http/Controllers/PacienteController.php`)
- Reception queue → Triage model: queues patients (evidence: `app/Http/Controllers/PacienteController.php`)
- Reception queue → Reception screen: renders (evidence: `app/Http/Controllers/PacienteController.php`)
- Triage workflow → Triage model: reads and updates (evidence: `app/Http/Controllers/TriagemController.php`)
- Triage workflow → Patient model: loads patient (evidence: `app/Http/Controllers/TriagemController.php`)
- Triage workflow → Triage screens: renders (evidence: `app/Http/Controllers/TriagemController.php`)
- Triage workflow → Call display: renders (evidence: `app/Http/Controllers/TriagemController.php`)
- Physician queue → Triage model: reads and updates (evidence: `app/Http/Controllers/MedicoController.php`)
- Physician queue → Physician dashboard: renders (evidence: `app/Http/Controllers/MedicoController.php`)
- Call panel controller → Triage model: queries (evidence: `app/Http/Controllers/PainelController.php`)
- Patient model → Triage model: has many (evidence: `app/Models/Paciente.php`)
- Triage model → Patient model: belongs to (evidence: `app/Models/Triagem.php`)
- Employee model → Default user model: references (evidence: `app/Models/Funcionario.php`)
- User factory → Default user model: creates (evidence: `database/factories/UserFactory.php`)
- Reception queue → SQLite database: persists via models
- Triage workflow → SQLite database: persists via models
- Physician queue → SQLite database: persists via models
- Laravel application → Web routes: loads (evidence: `bootstrap/app.php`)
