Table of Contents |
---|
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
|
Authorization
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)
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')
Search params
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
Service logic
Render a forbidden_groups array with nested arrays of forbidden_group_codes and forbidden_group_services that match the search params