How bhim100/pharmacy_managament works
This is a Flask pharmacy-management application for staff to manage medicine inventory, customers, suppliers, billing, dashboards, and reports. The main workflow enters through Flask routes: staff search or manage records, or submit a checkout; route handlers call domain services, which query Oracle when configured and otherwise some services return sample data. Billing writes bills and stock changes transactionally. SQL schema and PL/SQL add database-side capabilities, but their runtime invocation is not shown in the excerpts, so they are represented as a separate database layer without speculative links.
Main entry points: app.py Flask routes · db.py Connection provider · inventory_service.py Inventory management · dashboard_service.py Dashboard metrics
Components 17
Web application
- Flask routes
backend/app.py - Dashboard views
backend/templates/home.html - Billing interface
backend/static/js/billing.js - Inventory interface
backend/static/js/inventory.js
Pharmacy workflows
- Dashboard metrics
backend/services/dashboard_service.py - Medicine search
backend/services/medicine_service.py - Inventory management
backend/services/inventory_service.py - Billing checkout
backend/services/billing_service.py - Customer records
backend/services/customer_service.py - Supplier records
backend/services/supplier_service.py - Reports and exports
backend/services/report_service.py
Data access
- Application settings
backend/settings_store.py - Connection provider
backend/db.py - Oracle database
Oracle database features
- Relational schema
database/schema.sql - PL/SQL logic
plsql
Other components
- Pharmacy staff
Connections 23
- Pharmacy staff → Flask routes: uses
- Flask routes → Dashboard metrics: requests metrics
backend/app.py - Flask routes → Medicine search: searches
backend/app.py - Flask routes → Inventory management: manages stock
backend/app.py - Flask routes → Billing checkout: submits checkout
backend/app.py - Flask routes → Customer records: manages customers
backend/app.py - Flask routes → Supplier records: manages suppliers
backend/app.py - Flask routes → Reports and exports: requests reports
backend/app.py - Flask routes → Application settings: updates settings
backend/app.py - Dashboard metrics → Connection provider: opens connection
backend/services/dashboard_service.py - Medicine search → Connection provider: opens connection
backend/services/medicine_service.py - Inventory management → Connection provider: opens connection
backend/services/inventory_service.py - Inventory management → Application settings: reads thresholds
backend/services/inventory_service.py - Billing checkout → Connection provider: opens connection
backend/services/billing_service.py - Customer records → Connection provider: opens connection
backend/services/customer_service.py - Supplier records → Connection provider: opens connection
backend/services/supplier_service.py - Reports and exports → Connection provider: opens connection
backend/services/report_service.py - Connection provider → Oracle database: connects
backend/db.py - Dashboard views → Flask routes: renders through
- Billing interface → Flask routes: submits checkout
- Inventory interface → Flask routes: uses routes
- Relational schema → Oracle database: defines tables
- PL/SQL logic → Oracle database: database routines