Table of Contents |
---|
...
Page Properties | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|
Input parameters
...
Input parameter
...
Values
...
Type
...
Description
...
Example
...
id
...
String
...
Person identifier
...
b075f148-7f93-4fc2-b2ec-2d81b19a9b7b
Dictionaries
GENDER
AUTHENTICATION_METHOD
DOCUMENT_TYPE
Request structure
...
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.
Headers
Content-Type:application/json
Authorization:Bearer {{access_token}}
Request data validation
Processing
Verify the validity of access token
Return
401
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 personReturn
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"
Processing
Get data from mpi DB:
persons by id
Render a response according to specification.
Response structure
Example:
Expand | |||||
---|---|---|---|---|---|
| |||||
|
HTTP status codes
Page Properties | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
...
|