# lucyneitor/poo_avance architecture

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

- Interactive diagram: https://gitdiagram.com/lucyneitor/poo_avance
- Repository: https://github.com/lucyneitor/poo_avance

## Overview

This is a Spanish-language command-line clinic application for managing patients and departments. The workflow starts at `main.py`, initializes SQLite, and presents a main menu; users then enter either management flow to create, edit, delete, or view records. Controllers coordinate prompts, validated domain objects, and DAO operations. Patient records can reference departments. The source excerpts show the principal calls; README content is general Git and OOP material and does not document additional product capabilities.

Main entry points: [`controllers/paciente_controller.py`](https://github.com/lucyneitor/poo_avance/blob/main/controllers/paciente_controller.py) (Patient management), [`models/departamento_dao.py`](https://github.com/lucyneitor/poo_avance/blob/main/models/departamento_dao.py) (Department persistence), [`models/departamento.py`](https://github.com/lucyneitor/poo_avance/blob/main/models/departamento.py) (Department model), [`views/paciente_view.py`](https://github.com/lucyneitor/poo_avance/blob/main/views/paciente_view.py) (Patient prompts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_entrypoint["Program startup<br/>[main.py]"]
end

subgraph group_ui["Interactive presentation"]
  node_mainview["Main menu<br/>[main_view.py]"]
  node_patientview["Patient prompts<br/>[paciente_view.py]"]
  node_departmentview["Department prompts"]
  node_inpututils["Input helpers<br/>[utils.py]"]
end

subgraph group_flows["Management workflows"]
  node_maincontroller["Main menu flow<br/>[main_controller.py]"]
  node_patientcontroller["Patient management"]
  node_departmentcontroller["Department management"]
end

subgraph group_data["Domain and persistence"]
  node_patientmodel["Patient model<br/>[paciente.py]"]
  node_departmentmodel["Department model<br/>[departamento.py]"]
  node_patientdao["Patient persistence<br/>[paciente_dao.py]"]
  node_departmentdao["Department persistence"]
  node_database["SQLite access<br/>[database.py]"]
  node_clinicdb[("Clinic database<br/>[clinica.db]")]
end

node_user(("CLI user"))

node_user -->|"starts"| node_entrypoint
node_entrypoint -->|"initializes"| node_database
node_entrypoint -->|"runs"| node_maincontroller
node_user -->|"chooses menu"| node_mainview
node_maincontroller -->|"shows menu"| node_mainview
node_maincontroller -->|"dispatches"| node_patientcontroller
node_maincontroller -->|"dispatches"| node_departmentcontroller
node_patientcontroller -->|"requests and displays"| node_patientview
node_departmentcontroller -->|"requests and displays"| node_departmentview
node_patientview -->|"uses input helpers"| node_inpututils
node_departmentview -->|"uses input helpers"| node_inpututils
node_patientcontroller -->|"creates"| node_patientmodel
node_patientcontroller -->|"manages records"| node_patientdao
node_patientcontroller -->|"looks up departments"| node_departmentdao
node_departmentcontroller -->|"creates"| node_departmentmodel
node_departmentcontroller -->|"manages records"| node_departmentdao
node_patientdao -->|"constructs records"| node_patientmodel
node_departmentdao -->|"constructs records"| node_departmentmodel
node_patientdao -->|"loads departments"| node_departmentdao
node_patientdao -->|"opens connection"| node_database
node_departmentdao -->|"opens connection"| node_database
node_database -->|"reads and writes"| node_clinicdb
node_patientview -->|"renders records"| node_patientmodel
node_patientview -->|"renders choices"| node_departmentmodel
node_departmentview -->|"renders records"| node_departmentmodel
node_mainview -->|"uses input helpers"| node_inpututils
node_patientmodel -->|"references department"| node_departmentmodel

click node_entrypoint "https://github.com/lucyneitor/poo_avance/blob/main/main.py"
click node_maincontroller "https://github.com/lucyneitor/poo_avance/blob/main/controllers/main_controller.py"
click node_mainview "https://github.com/lucyneitor/poo_avance/blob/main/views/main_view.py"
click node_patientcontroller "https://github.com/lucyneitor/poo_avance/blob/main/controllers/paciente_controller.py"
click node_departmentcontroller "https://github.com/lucyneitor/poo_avance/blob/main/controllers/departamento_controller.py"
click node_patientview "https://github.com/lucyneitor/poo_avance/blob/main/views/paciente_view.py"
click node_departmentview "https://github.com/lucyneitor/poo_avance/blob/main/views/departamento_view.py"
click node_inpututils "https://github.com/lucyneitor/poo_avance/blob/main/views/utils.py"
click node_patientmodel "https://github.com/lucyneitor/poo_avance/blob/main/models/paciente.py"
click node_departmentmodel "https://github.com/lucyneitor/poo_avance/blob/main/models/departamento.py"
click node_patientdao "https://github.com/lucyneitor/poo_avance/blob/main/models/paciente_dao.py"
click node_departmentdao "https://github.com/lucyneitor/poo_avance/blob/main/models/departamento_dao.py"
click node_database "https://github.com/lucyneitor/poo_avance/blob/main/config/database.py"
click node_clinicdb "https://github.com/lucyneitor/poo_avance/blob/main/clinica.db"

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_entrypoint,node_user toneBlue
class node_mainview,node_patientview,node_departmentview,node_inpututils toneAmber
class node_maincontroller,node_patientcontroller,node_departmentcontroller toneMint
class node_patientmodel,node_departmentmodel,node_patientdao,node_departmentdao,node_database,node_clinicdb toneRose
```

## Components

### Application entry

- [Program startup](https://github.com/lucyneitor/poo_avance/blob/main/main.py): `main.py`

### Interactive presentation

- [Main menu](https://github.com/lucyneitor/poo_avance/blob/main/views/main_view.py): `views/main_view.py`
- [Patient prompts](https://github.com/lucyneitor/poo_avance/blob/main/views/paciente_view.py): `views/paciente_view.py`
- [Department prompts](https://github.com/lucyneitor/poo_avance/blob/main/views/departamento_view.py): `views/departamento_view.py`
- [Input helpers](https://github.com/lucyneitor/poo_avance/blob/main/views/utils.py): `views/utils.py`

### Management workflows

- [Main menu flow](https://github.com/lucyneitor/poo_avance/blob/main/controllers/main_controller.py): `controllers/main_controller.py`
- [Patient management](https://github.com/lucyneitor/poo_avance/blob/main/controllers/paciente_controller.py): `controllers/paciente_controller.py`
- [Department management](https://github.com/lucyneitor/poo_avance/blob/main/controllers/departamento_controller.py): `controllers/departamento_controller.py`

### Domain and persistence

- [Patient model](https://github.com/lucyneitor/poo_avance/blob/main/models/paciente.py): `models/paciente.py`
- [Department model](https://github.com/lucyneitor/poo_avance/blob/main/models/departamento.py): `models/departamento.py`
- [Patient persistence](https://github.com/lucyneitor/poo_avance/blob/main/models/paciente_dao.py): `models/paciente_dao.py`
- [Department persistence](https://github.com/lucyneitor/poo_avance/blob/main/models/departamento_dao.py): `models/departamento_dao.py`
- [SQLite access](https://github.com/lucyneitor/poo_avance/blob/main/config/database.py): `config/database.py`
- [Clinic database](https://github.com/lucyneitor/poo_avance/blob/main/clinica.db): `clinica.db`

### Other components

- **CLI user**

## Connections

- CLI user → Program startup: starts (evidence: `main.py`)
- Program startup → SQLite access: initializes (evidence: `main.py`)
- Program startup → Main menu flow: runs (evidence: `main.py`)
- CLI user → Main menu: chooses menu (evidence: `views/main_view.py`)
- Main menu flow → Main menu: shows menu (evidence: `controllers/main_controller.py`)
- Main menu flow → Patient management: dispatches (evidence: `controllers/main_controller.py`)
- Main menu flow → Department management: dispatches (evidence: `controllers/main_controller.py`)
- Patient management → Patient prompts: requests and displays (evidence: `controllers/paciente_controller.py`)
- Department management → Department prompts: requests and displays (evidence: `controllers/departamento_controller.py`)
- Patient prompts → Input helpers: uses input helpers (evidence: `views/paciente_view.py`)
- Department prompts → Input helpers: uses input helpers (evidence: `views/departamento_view.py`)
- Patient management → Patient model: creates (evidence: `controllers/paciente_controller.py`)
- Patient management → Patient persistence: manages records (evidence: `controllers/paciente_controller.py`)
- Patient management → Department persistence: looks up departments (evidence: `controllers/paciente_controller.py`)
- Department management → Department model: creates (evidence: `controllers/departamento_controller.py`)
- Department management → Department persistence: manages records (evidence: `controllers/departamento_controller.py`)
- Patient persistence → Patient model: constructs records (evidence: `models/paciente_dao.py`)
- Department persistence → Department model: constructs records (evidence: `models/departamento_dao.py`)
- Patient persistence → Department persistence: loads departments (evidence: `models/paciente_dao.py`)
- Patient persistence → SQLite access: opens connection (evidence: `models/paciente_dao.py`)
- Department persistence → SQLite access: opens connection (evidence: `models/departamento_dao.py`)
- SQLite access → Clinic database: reads and writes (evidence: `config/database.py`)
- Patient prompts → Patient model: renders records (evidence: `views/paciente_view.py`)
- Patient prompts → Department model: renders choices (evidence: `views/paciente_view.py`)
- Department prompts → Department model: renders records (evidence: `views/departamento_view.py`)
- Main menu → Input helpers: uses input helpers (evidence: `views/main_view.py`)
- Patient model → Department model: references department (evidence: `models/paciente.py`)
