ЕСОЗ - публічна документація
(GraphQL, NHS) Get Person's DRACS death candidates data
Purpose
This WS is designed to allow NHS employee with assigned appropriate scopes to get person’s DRACS death candidates.
Key points
This is a graphQl query method used in Administration panel only.
Only authenticated and authorized NHS employee with appropriate scope can get person’s DRACS death candidates.
Specification
Link | - | Посилання на Apiary або Swagger |
Resource | /graphql | Посилання на ресурс, наприклад: /api/persons/create |
Scope | person:read | Scope для доступу |
Components | Patient registry | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription |
Microservices | mpi/api il/api (rpc) fe/admin-web | Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC |
Protocol type | GraphQL | Тип протоколу, який використовується запитом, наприклад: SOAP | REST |
Request type | POST | Тип запиту API, наприклад: GET, POST, PATCH… |
Sync/Async | Sync | Метод є синхронним чи асинхронним? |
Public/Private/Internal | Private | Потрібно зазначити тип методу за ступенем доступності |
Authorize
Verify the validity of access token
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 = 'person:read')
Return (403, 'Your scope does not allow to access this resource. Missing allowances: person:read') in case of invalid scope(s)
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
Find person in mpi.persons
in case of error - return 404 "Such person doesn't exist"
Check if person is active: person.status = 'active' and person.is_active = true
in case of error - return 409 "Such person isn't active"
Service logic
Get candidates data from mpi.person_verification_candidates table by person_id
Get DRACS death act details from mimir.dracs_death_acts table by verification_candidate.entity_id
Render a response according to specification.
ЕСОЗ - публічна документація