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 declaration_amount >= declaration_limit
  3. Doctor should change declaration_limit via personal cabinet

Specification

Apiary

Data structure 

...

  1. get employee_id from request
  2. add +1 to properties.declaration_amount of employee_id
    1. properties: {declaration_amount: n+1, declaration_limit: 2000}

Terminate declaration

  1. get employee_id from request
  2. add -1 to properties.declaration_amount of employee_id
    1. 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

Approve declaration request

Check doctor's limit