Table of Contents |
---|
Purpose
This WS is designed to get list of persons that require a decision about its verification by NHS.
Statements
This is a graphQl query method used in Administration panel only.
Only authenticated and authorized NHS employee with appropriate scope can search for unverified persons.
User can filter list by search params
...
Authorize
Verify the validity of access token
in case of error return 401 ('Access denied')
Check user scope person:read in order to perform this action
in case of error generate 403 response ('You don’t have permission to access this resource: person:read')
Validate legal entity
Extract client_id from token.
Check client has scope person:read
in case of error - return 403 (“You don’t have permission to access this resource: person:read”)
Check legal entity type = NHS
In case of error - return 403 ('You don’t have permission to access this resource')
...
Specification
Page Properties | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Search params
Logic
Get list of records from persons table (mpi db):
with verification status
VERIFICATION_NEEDED
(with reasonRULES_TRIGGERED
) orIN_REVIEW
, additionally filtered by search params andwhich have
is_active
=true
andstatus
=active
Render list with Person data according to schema.
Request structure
See on Apiary
Authorize
Verify the validity of access token
in case of error return 401 ('Access denied')
Check user scope person:read in order to perform this action
in case of error generate 403 response ('You don’t have permission to access this resource: person:read')
Headers
Request data validation
Extract client_id from token.
Check client has scope person:read
in case of error - return 403 (“You don’t have permission to access this resource: person:read”)
Check legal entity type = NHS
In case of error - return 403 ('You don’t have permission to access this resource')
Processing
There is following search parameters allowed:
...
Comment: for optimal code selection is conducted on wider clause, such as VERIFICATION_NEEDED, IN_REVIEW with any of these two reasons: RULES_TRIGGERED
, MANUAL.
Service logic
...
Get list of records from persons table (mpi db):
with verification status
VERIFICATION_NEEDED
(with reasonRULES_TRIGGERED
) orIN_REVIEW
, additionally filtered by search params andwhich have
is_active
=true
andstatus
=active
...
Response structure
See on Apiary