ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Purpose

This service is made to count an amount of declaration doctor has already made. The amount will increase (decrease) with each declaration signed (terminated) on prm and recalculated every night with real amount of doctor's declarations on ops.

Overview

  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 

Sign declaration request

  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



  • No labels