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

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

Version 1 Next »

Specification

Schema

Features - add service to group

Features - add service to group

Authorize

  1. Check user scope (scope = 'service_catalog:write') in order to perform this action
    1. In case error - generate 401 response

Active connection service with service group

Search active connection service with service group

SELECT * FROM service_inclusions
WHERE is_active = True

Logic

  1. When service add to service group - create new record in table Service_inclusions
  2. When delete service from service group - search connection service with service group and set is_active = False

Validate status

When add service to service group check that Service/Service group should be active (is_active == TRUE)

  1. Validate `is_active` == FALSE
    1. if invalid  - return 409 eror (message: "Service/Service group should be active !")

Validate PK Service/Service group

Check on existing Service/Service group record 

  1. Check exist Service/Service group by $.id.

    1. if invalid - return 404 error (message: "Service/Service group is not found!")

Validate uniqueness active connection Service with Service group

Active connection service with service group. In case of duplication the error must be shown.

  1. Check uniqueness by $.service_id and  $.service_group_id and $.service_inclusions.is_active = True

    1. if invalid - return 409 error (message: "Service already added in service group")

Validate Service Group

  1. When add service to group, check Service group don't have active subroup:
    1. if invalid - return 422 error (message: "ServiceGroup should not have active subgroups")

Validate Program service

  1. When add service ti group and this Service include in program service, check Service group include in this program  service
    1. if invalid - return 422 error (message: "Service should be included in all medical programs which ServiceGroup included in")


  • No labels