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 

Employee request

Limit of declarations that could be signed by doctor is added to create employee request

Save declaration_limit to parties

ParameterSource
declaration_limitprm.parties.declaration_limit

Employees

Declaration limit and declaration count are added to get employees list and get employee details

Declaration request

Add overlimit to declaration request. Set overlimit on create declaration request

Report DB

Add declaration_count and declaration_limit to reports.parties

ParameterSource
declaration_countreports.parties.declaration_count
declaration_limitreports.parties.declaration_limit

Sign declaration request

  1. get employee_id from request
  2. get party for employee
  3. add +1 to properties.declaration_amount of employee_id
    1. properties: {"counter": n+1, "limit": 2000}
    count for party

Terminate declaration

  1. get employee_id from request
  2. get party for employee
  3. add -1 to properties.declaration_amount of employee_idproperties: {"counter": n-1, "limit": 2000}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 propertiesupdate prm.parties.declaration_amount on prm.employees for each doctor

Approve declaration request

Check doctor's limitcount for each employee