How sam77g/tde_estrutura works
PharmaERP is an in-memory, terminal pharmacy manager. The main workflow begins at the CLI menu and branches into medicine management, prioritized replenishment, and movement history/undo. Shared lists, stack, and deque hold state; validation and ID generation support operations. README capabilities such as filtering/sorting, replenishment cancellation, and DEBUG are included where documented, but some exact call paths are not visible in the excerpts. No persistence or external service is shown.
Main entry points: reposicao.py Request management · medicamentos.py Medicine CRUD · main.py Main menu · relatorios.py History and undo
Components 18
Terminal workflow
- Main menu
tde/main.py - Terminal
Medicine management
- Medicine menu
tde/medicamentos.py - Medicine CRUD
tde/medicamentos.py - Search and sorting
tde/medicamentos.py
Stock and history
- Stock movement support
tde/estoque.py - ID generation
tde/estoque.py - History menu
tde/relatorios.py - History and undo
tde/relatorios.py
Replenishment
- Replenishment menu
tde/reposicao.py - Request management
tde/reposicao.py - Criticality priority
tde/reposicao.py
Shared state and support
- Input validation
tde/validar.py - Medicine list
tde/estruturas.py - Movement history
tde/estruturas.py - Request queue
tde/estruturas.py - Structure DEBUG
tde/estruturas.py
Other components
- Pharmacy operator
Connections 25
- Pharmacy operator → Main menu: chooses menu
tde/main.py - Main menu → Input validation: reads choice
tde/main.py - Main menu → Medicine menu: opens
tde/main.py - Main menu → Replenishment menu: opens
tde/main.py - Main menu → History menu: opens
tde/main.py - Medicine menu → Medicine CRUD: dispatches
tde/medicamentos.py - Medicine CRUD → Input validation: validates with
tde/medicamentos.py - Medicine CRUD → Medicine list: updates
tde/medicamentos.py - Medicine CRUD → ID generation: generates IDs
tde/medicamentos.py - Medicine CRUD → History and undo: records entry
tde/medicamentos.py - Medicine CRUD → Request management: creates or cancels
tde/medicamentos.py - Medicine menu → Search and sorting: dispatches
tde/medicamentos.py - Medicine menu → Terminal: prompts and displays
tde/medicamentos.py - Replenishment menu → Request management: dispatches
tde/reposicao.py - Request management → Input validation: checks quantity
tde/reposicao.py - Request management → Request queue: reads and updates
tde/reposicao.py - Request management → Medicine list: updates stock
tde/reposicao.py - Request management → Criticality priority: inserts by criticality
tde/reposicao.py - Request management → ID generation: generates request IDs
tde/reposicao.py - History menu → History and undo: dispatches
tde/relatorios.py - History and undo → Movement history: pushes and pops
tde/relatorios.py - History and undo → Medicine list: reverses changes
tde/relatorios.py - History and undo → Request management: cancels or recreates
tde/relatorios.py - History menu → Terminal: displays history
tde/relatorios.py - Pharmacy operator → Structure DEBUG: views structures
README.md