How nicolasgomez97/gestion-consultorio-odontologico-passera-unc works
Purpose and Entry Points
Desktop dental-clinic management system (“Gestion Consultorio Odontologico”). The application starts from main.py, which launches the UI application defined in ui/app.py. Persistent clinic data is stored locally in SQLite under data/clinica.db.
Application Shell and Navigation
ui/app.py is the central UI composition and navigation layer. It coordinates feature screens, shared styling, and reusable controls through:
• ui/app.py
• ui/theme.py
• ui/widgets.py
This is a local desktop UI architecture rather than a web service; feature modules own their screen-level interactions.
Persistence and Domain Model Boundary
database.py provides the database access/initialization boundary, while models.py defines the clinic domain entities and their persistence-facing representation. SQLite files, including WAL/SHM companions, indicate local transactional storage with write-ahead logging:
• database.py
• models.py
• data/clinica.db
UI screens should interact with clinic data through these shared model/database layers rather than directly coupling to SQLite files.
Identity and Access Management
Authentication and user administration are separated into dedicated UI flows:
• ui/login_ui.py
• ui/usuarios_ui.py
• models.py
Login gates access to the operational application; user management likely maintains staff accounts and roles/credentials in the same local database.
Core Clinical and Scheduling Workflows
The primary operational flow centers on patient records, practitioner records, appointments, and billable services:
• ui/pacientes_ui.py
• ui/odontologos_ui.py
• ui/turnos_ui.py
• ui/prestaciones_ui.py
Patients and dentists are master data. Appointment (turnos) workflows connect those entities over time, while services (prestaciones) capture care delivered or offered.
Dental Record Modules
Clinical charting is split into specialized odontological record views:
• ui/odontograma_ui.py
• ui/periodontograma_ui.py
• ui/historial_ui.py
These modules form the patient clinical-history boundary: odontograms capture tooth-level status, periodontograms capture periodontal assessment, and history consolidates longitudinal clinical information.
Reporting and Notifications
Operational reporting and outbound email are separate integration points:
• ui/reportes_ui.py
• email_service.py
• data/email_config.json
Reports consume locally persisted clinic data. email_service.py uses externally configured email settings from data/email_config.json, making SMTP/email delivery the main external-service dependency.
Runtime and Deployment Characteristics
The repository is a Python desktop application with local filesystem state. There is no indicated server, API, or cloud infrastructure. Runtime-critical assets are:
• main.py
• database.py
• data/clinica.db
The SQLite WAL/SHM files (data/clinica.db-wal, data/clinica.db-shm) are runtime database artifacts and should be treated as part of local database consistency, not independent application data sources.
Main entry points: app.py Application Shell · models.py Domain Models · reportes_ui.py Reports · login_ui.py Login
Components 19
Desktop UI
Screen modules compose the local clinic application.
- Application Shell · Coordinates navigation, screens, styling, and controls.
ui/app.py - Theme
ui/theme.py - Shared Widgets
ui/widgets.py - Login · Gates access to operational screens.
ui/login_ui.py - User Management · Maintains staff accounts and credentials.
ui/usuarios_ui.py - Patients
ui/pacientes_ui.py - Dentists
ui/odontologos_ui.py - Appointments · Connects patients and dentists over time.
ui/turnos_ui.py - Services · Captures billable or delivered care.
ui/prestaciones_ui.py - Reports · Produces operational reporting from clinic data.
ui/reportes_ui.py
Clinical Records
Specialized patient charting views.
- Odontogram · Captures tooth-level status.
ui/odontograma_ui.py - Periodontogram · Captures periodontal assessments.
ui/periodontograma_ui.py - Clinical History · Consolidates longitudinal patient information.
ui/historial_ui.py
Local Persistence
SQLite-backed clinic state.
- Database Access · Initializes and accesses local clinic storage.
database.py - Clinic Database · Local transactional storage with WAL support.
data/clinica.db
Other components
- Application Entry · Launches the desktop application.
main.py - Domain Models · Defines clinic entities and persistence-facing representations.
models.py - Email Service · Delivers outbound email using local configuration.
email_service.py - Email Configuration
data/email_config.json
Connections 27
- Application Entry → Application Shell: launches
- Application Shell → Theme: uses
- Application Shell → Shared Widgets: uses
- Application Shell → Login: shows
- Application Shell → User Management: navigates to
- Application Shell → Patients: navigates to
- Application Shell → Dentists: navigates to
- Application Shell → Appointments: navigates to
- Application Shell → Services: navigates to
- Application Shell → Odontogram: navigates to
- Application Shell → Periodontogram: navigates to
- Application Shell → Clinical History: navigates to
- Application Shell → Reports: navigates to
- Login → Domain Models: authenticates through
- User Management → Domain Models: manages
- Patients → Domain Models: manages
- Dentists → Domain Models: manages
- Appointments → Domain Models: uses
- Services → Domain Models: uses
- Odontogram → Domain Models: records
- Periodontogram → Domain Models: records
- Clinical History → Domain Models: reads and records
- Reports → Domain Models: reads
- Domain Models → Database Access: persists through
- Database Access → Clinic Database: reads and writes
- Reports → Email Service: sends via
- Email Service → Email Configuration: loads settings