Table of Contents |
---|
Specification
...
This WS is design to deactivate relationship after reorganization by NHS admin. This action must be done in case reorganization reorganized MSP.
Input parameters
parent_id
Authorize
- Verify the validity of access token
- in case of error return 401 ('Access denied')
- Check user scope related_legal_entities:deactivate in order to perform this action
- in case of error generate 401 response ('Invalid scopes')
- Verify the validity of access token
Validate request
- Validate that relationship exists
- Find $id $parent_id in prm.related_legal_entites
- in case of error return 404 error view $id ('Invalid id')
- Find $id $parent_id in prm.related_legal_entites
- Validate that relationship is active
- Check is_active=true
- in case of error return 409 error view $id ('The relationship between legal entities is already deactivated ')
- Check is_active=true
- Validate all child legal entities is are closed
- Find legal entities in prm.legal_entities by child_id and check status='CLOSED'
- in case of error return 422 error view $id ('Child legal entities must be closed ')
- Find legal entities in prm.legal_entities by child_id and check status='CLOSED'
...