Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

  1. Limit is set with employee_request create/update
  2. add validation on declaration approve. Return error if doctor's counter >= limit
  3. Doctor should change declaration_limit via personal cabinet (TBD)

Specification

Data structure 

...

  1. get employee_id from request
  2. get party for employee
  3. add +1 to declaration_count for party

Terminate declaration

  1. get employee_id from request
  2. get party for employee
  3. add -1 to declaration_count for party

Approve declaration request

Check doctor's limit

Count declarations for employees

Ones a day start the process.

Calculate amount of declarations and update prm.parties.declaration_count for each employee