How metanochava/back works
Mytech SaaS is a Django multi-tenant business platform with healthcare, HR, inventory, sales, and pharmacy modules. Users work through module APIs for domain workflows; services enforce business rules and persist changes in module models. The excerpts directly show recruitment actions, pharmacy dispensing, and exam/lab processing. Other substantial capabilities are represented from the source tree and index, but their runtime connections are left unasserted where source was not shown.
Main entry points: exam_request_service.py Exam and lab flow · services.py Prescription dispensing · application.py Recruitment actions · recruitment_service.py Recruitment service
Components 26
Healthcare
- Clinical APIs
saude/views - Clinical services
saude/services - Exam and lab flow
saude/services/exam_request_service.py - Consultation service
saude/services/consultation_service.py - Lab result service
saude/services/lab_result_service.py - Patient records
saude/models/paciente.py - Exam requests
saude/models/pedidoexamemedico.py - Requested exam items
saude/models/itempedidoexamemedico.py - Exam results
saude/models/resultadoexamemedico.py
Human Resources
- HR APIs
hr/views - Recruitment actions
hr/views/application.py - Recruitment service
hr/services/recruitment_service.py - Applications
hr/models/application.py - Employee lifecycle
hr/services/lifecycle_service.py - HR records
hr/models/employee.py
Commerce and Stock
- Sales APIs
sales/views - Sales records
sales/models - Inventory APIs
inventory/views - Stock operations
inventory/services.py - Stock and products
inventory/models
Pharmacy
- Pharmacy APIs
farmacia/views - Prescription dispensing
farmacia/services.py - Pharmacy queue
farmacia/models/filafarmacia.py - Prescription-created event
Other components
- Staff user
- Patient
Connections 26
- Staff user → Recruitment actions: submits actions
- Recruitment actions → Recruitment service: delegates actions
hr/views/application.py - Recruitment actions → Applications: loads application
hr/views/application.py - Recruitment service → Applications: updates workflow
- Recruitment service → HR records: creates employee
- Staff user → Employee lifecycle: manages lifecycle
- Employee lifecycle → HR records: updates employee
hr/services/lifecycle_service.py - Patient → Clinical APIs: requests care
- Staff user → Clinical APIs: uses clinical APIs
- Clinical APIs → Clinical services: delegates workflows
- Clinical services → Consultation service: uses consultation logic
saude/services/exam_request_service.py - Exam and lab flow → Patient records: resolves patient
saude/services/exam_request_service.py - Exam and lab flow → Exam requests: loads requests
saude/services/exam_request_service.py - Exam and lab flow → Requested exam items: locks exam items
saude/services/exam_request_service.py - Exam and lab flow → Exam results: validates results
saude/services/exam_request_service.py - Exam and lab flow → Lab result service: coordinates results
saude/services/exam_request_service.py - Staff user → Sales APIs: records sales
- Sales APIs → Sales records: persists sales
- Staff user → Inventory APIs: manages stock
- Inventory APIs → Stock operations: uses stock operations
- Stock operations → Stock and products: updates stock
inventory/services.py - Staff user → Pharmacy APIs: reviews prescriptions
- Pharmacy APIs → Prescription dispensing: calls workflows
- Prescription dispensing → Pharmacy queue: updates queue
- Prescription-created event → Prescription dispensing: enqueues prescription
- Prescription dispensing → Stock operations: commits stock movements
farmacia/services.py