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
parentmerged_to_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 $parent$merged_to_id in prm.related_legal_entites
- in case of error return 404 error view $id ('Invalid id')
- Find $parent$merged_to_id in prm.related_legal_entites
- Validate that relationship is relationships are active
- Check is_active=true
- in case of error return 409 error view $id ('The relationship relationships between legal entities is are already deactivated ')
- Check is_active=true
- Validate all child merged_from legal entities are closed
- Find legal entities in prm.legal_entities by childmerged_from_id and check status='CLOSED'
- in case of error return 422 error view $id ('Child Merged_from legal entities must be closed ')
- Find legal entities in prm.legal_entities by childmerged_from_id and check status='CLOSED'
...