Table of Contents |
---|
Purpose
This method allows to view Person's (MPI) details.
Specification
Page Properties | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|
...
Expand |
---|
...
Input parameter
...
Values
...
Type
...
Description
...
Example
...
id
...
String
...
Person identifier
...
b075f148-7f93-4fc2-b2ec-2d81b19a9b7b
Dictionaries
GENDER
AUTHENTICATION_METHOD
DOCUMENT_TYPE
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
Response structure
Example:
...
title | Response example. Code: 200 |
---|
...
| ||
|
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 in order to perform this action (scope = 'person:read')
Return
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
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 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
...
|