Purpose
This WS allows to find groups in Admin panel using search params. Groups can be found by group params and/or by item params
Key points
This is a graphQl query method used in Administration panel only
Only authenticated and authorized NHS employee with appropriate scope can search Forbidden groups.
Specification
Logic
Render a forbidden_groups array with nested arrays of forbidden_group_codes and forbidden_group_services that match the search params
Request structure
API paragraph not found
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 = 'forbidden_group:details')
return 403 (“Your scope does not allow to access this resource. Missing allowances: forbidden_group:details”) in case of invalid scope(s)
Headers
API paragraph not found
Request data validation
Validate legal entity
Extract client_id from token.
Check client scopes in order to perform this action (scope = 'forbidden_group:details')
in case of error - return 403 (“Your scope does not allow to access this resource. Missing allowances: forbidden_group:details”)
Check legal entity status (status = ACTIVE)
In case of error - return 409 ('client_id refers to legal entity that is not active')
Processing
Search with a few params performs according to the logical AND rule.
id. Search by forbidden_groups.id (used to get group details)
name. Search by forbidden_groups.name
is_active. Search by forbidden_groups.is_active
item_code. Searches by:
services.code (forbidden_group_services join services)
service_groups.code (forbidden_group_services join service_groups)
forbidden_group_codes.code (for dictionaries)
item_name. Searches by:
services.name (forbidden_group_services join services)
service_groups.name (forbidden_group_services join service_groups)
code description for dictionaries (forbidden_group_codes fc join dictionaries d on fc.system = d.name and fc.code = d.values.code)
item_type (string). Limits the search to the following items:
service - search within service items
service_group - search within service_group items
<system> - search within specified dictionary. Where <system> is
eHealth/ICD10_AM/condition_codes
,eHealth/ICPC2/actions
,eHealth/ICPC2/condition_codes
oreHealth/ICPC2/reasons
dictionary name
item_is_active. Searches by:
forbidden_group_services.is_active - for service/service_group
forbidden_group_codes.is_active - for dictionaries
Response structure
API paragraph not found
Post-processing processes
API paragraph not found
HTTP status code
API paragraph not found