Specification
Features - add service to group
Features - add service to group
Authorize
- Check user scope (scope = 'service_catalog:write') in order to perform this action
- In case error - generate 401 response
...
- if invalid - return 409 eror (message: "Service/Service group should be active !")
Validate PK Service/Service group
Check on existing Service/Service group record
Check exist Service/Service group by $.id.
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.
Check uniqueness by $.service_id and $.service_group_id and $.service_inclusions.is_active = True
- if invalid - return 409 error (message: "Service already added in service group")
...
- When add service to group, check Service group don't have active subroup:
- if invalid - return 422 error (message: "ServiceGroup should not have active subgroups")
Validate Program service
- When add service ti to group and this Service include group included in program service, check that Service group include included in this program serviceservice
- if invalid - return 422 error (message: "Service should be included in all medical programs which ServiceGroup included in")
When deactivate service from program service, check that Service group (in which service included) don't included in this program service
- if invalid - return 422 error (message: "Service should be removed from ServiceGroup which included in this medical programs")