Versions Compared

Key

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

...

  1. Count all declarations in status active where OPS.declarations.employee_id==$.declaration_request.employee_id
    1.1 If there is an active declaration with the current person, exclude it from the selection in order to let doctor resign declaration with current patient
  2. Count all declaration_requests in status approvedwhere IL.declaration_requests.data($.employee.id) ==$.declaration_request.employee_id
  3. Select config parameter for declarations_limit where speciality == $.declaration_request.scope
  4. Compare the result of selections with config parameter. In case count (declarations+declaration_requests )> config_parameter, return 409 "The employee has reached the declaration limit"

...