Table of Contents |
---|
...
This is a graphQl method used in Administration panel only.
Only authenticated and authorized NHS employee with appropriate scope can deactivate a Group of Diagnoses.
Only active Groups of Diagnoses can be deactivated.
Specification
...
Page Properties | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Expand | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
|
Logic
Update data:
diagnoses_groups table
set is_active = false
set deactivation_reason = $.deactivation_reason
set updated_at, updated_by
Deactivate all approvals with approval.diagnoses_group_id = $.diagnoses_group_id
Authorize
Verify the validity of access token
in case of error - return 401 (“Invalid access token”) in case of validation fails
Verify that token is not expired
in case of error - return 401 (“Invalid access token”)
Check user scopes in order to perform this action (scope = 'diagnoses_group:write')
return 403 (“Your scope does not allow to access this resource. Missing allowances: diagnoses_group:write”) in case of invalid scope(s)
...