Table of Contents |
---|
...
- Limit is set with employee_request create/update
- add validation on declaration approve. Return error if doctor's declaration_amount >= declaration_limit
- Doctor should change declaration_limit via personal cabinet
Specification
Apiary
...
- get employee_id from request
- add +1 to properties.declaration_amount of employee_id
- properties: {declaration_amount: n+1, declaration_limit: 2000}
Terminate declaration
- get employee_id from request
- add -1 to properties.declaration_amount of employee_id
- properties: {declaration_amount: n-1, declaration_limit: 2000}
Count declarations for employees
Ones a day start the process.
Calculate amount of declarations and update properties.declaration_amount on prm.employees for each doctor