Table of Contents |
---|
Purpose
This method allows to view Person's (MPI) details.
Specification
Page Properties | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||
|
Expand | ||
---|---|---|
| ||
|
Logic
This is a graphQl query method used in Administration panel only to get person’s data . Only authenticated and authorized NHS employee with appropriate scope can get person’s data.
Request structure
Example:
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Authorize
Request to process the request using a token in the headers.
Verify the validity of access token
Return
401
('Invalid access token') in case validation fails
Verify that token is not expired
in case of error - return (
401
, 'Invalid access token')
Check user scopes
person:read
in order to
search personperform this action (scope = 'person:read')
Return
read“403
in case invalid scope(s) "Your scope does not allow to access this resource. Missing allowances: person:read“
Request data validation
Validate legal entity
Extract client_id from token.
Check legal entity status (status = ACTIVE)
In case of error - return
409
('client_id refers to legal entity that is not active')
Validate request
Validate $.personId
Check $.personId
is ID from MPI.person.id
search person
$.personId
inMPI.person.(id = $.personId)
andMPI.person.(id = $.personId).is_active = true then ok
in case of error, return "Person not found
404
, "Such person doesn't exist"
Processing
Get data from mpi DB:
persons by id
Render a response according to specification.
Response structure
Example:
Expand | |||||
---|---|---|---|---|---|
| |||||
|
HTTP status codes
Page Properties | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
|