How termuxbash/hospitalmanagement works
CareDesk is a Flask hospital-records application: staff log in, then review the dashboard or manage patients, doctors, consultations, and consultation-linked billing. The app owns request handling, validation, and SQLite access; SQL files provide the schema, summary views, and audit/history triggers. Database selection is persisted in a configuration file. The README documents these capabilities, but most route implementations and SQL files were not sampled, so unsampled links rely only on documented relationships.
Main entry points: app.py Flask routes · hospital.db SQLite database · init.sql Core schema · views.sql Summary views
Components 19
Web application
- Flask routes
app.py - Dashboard
templates/dashboard.html - Staff login
templates/login.html
Clinical records
- Patient directory
templates/patients.html - Doctor directory
templates/doctors.html - Consultations
templates/consultations.html - Patient entry
templates/patient_form.html - Doctor entry
templates/doctor_form.html - Consultation entry
templates/consultation_form.html
Billing
- Billing ledger
templates/billing.html - Billing entry
templates/billing_form.html - Billing audit
templates/billing_audit.html
Persistence
- Database settings
templates/database_settings.html - Database selection
database_config.json - Core schema
init.sql - Summary views
views.sql - History and audit triggers
triggers.sql - SQLite database
hospital.db
Other components
- Hospital staff
Connections 26
- Hospital staff → Flask routes: uses
README.md - Flask routes → Staff login: renders
app.py - Flask routes → Dashboard: renders
app.py - Flask routes → Patient directory: renders
app.py - Flask routes → Doctor directory: renders
app.py - Flask routes → Consultations: renders
app.py - Flask routes → Billing ledger: renders
app.py - Flask routes → Billing entry: renders
- Flask routes → Billing audit: renders
app.py - Flask routes → Database settings: renders
app.py - Flask routes → Patient entry: renders
- Flask routes → Doctor entry: renders
- Flask routes → Consultation entry: renders
- Flask routes → SQLite database: reads and writes
app.py - Flask routes → Database selection: reads and updates
app.py - Flask routes → Core schema: initializes from
app.py - Flask routes → Summary views: initializes from
app.py - Flask routes → History and audit triggers: initializes from
app.py - Core schema → SQLite database: defines tables
README.md - Summary views → SQLite database: provides summaries
README.md - History and audit triggers → SQLite database: records history and audit
README.md - Flask routes → Dashboard: shows totals
README.md - Flask routes → Patient directory: searches patients
README.md - Flask routes → Consultations: links patient and doctor
README.md - Flask routes → Billing ledger: links billing to consultations
README.md - Flask routes → Billing audit: reviews billing changes
README.md