ЕСОЗ - публічна документація
Search Groups of Diagnoses by params (NHS Admin)
Purpose
This WS allows to find Groups of Diagnoses in Admin panel using search params. Groups can be found by group params and/or by item params.
Key points
This is a graphQl query method used in Administration panel only.
Only authenticated and authorized NHS employee with appropriate scope can search Groups of Diagnoses.
Specification
Link | graphQl query method | Посилання на Apiary або Swagger |
Resource | graphQl query method | Посилання на ресурс, наприклад: /api/persons/create |
Scope | diagnoses_group:read | Scope для доступу |
Components | Medical events | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription |
Microservices | API paragraph not found | Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC |
Protocol type | API paragraph not found | Тип протоколу, який використовується запитом, наприклад: SOAP | REST |
Request type | API paragraph not found | Тип запиту API, наприклад: GET, POST, PATCH… |
Sync/Async | API paragraph not found | Метод є синхронним чи асинхронним? |
Public/Private/Internal | Internal | Потрібно зазначити тип методу за ступенем доступності |
Logic
Render diagnoses_groups
array with nested array of diagnoses_group_codes
that match the search params
Authorize
Verify the validity of access token
in case of error - 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 = 'diagnoses_group:read')
return 403 (“Your scope does not allow to access this resource. Missing allowances: diagnoses_group:read”) in case of invalid scope(s)
Request data validation
Validate legal entity
Extract client_id from token.
Check client scopes in order to perform this action (scope = 'diagnoses_group:read')
in case of error - return 403 (“Your scope does not allow to access this resource. Missing allowances: diagnoses_group:read”)
Check client_type = NHS
in case of error - return 403 ('You don’t have permission to access this resource')
Check legal entity status (status = ACTIVE)
In case of error - return 409 ('client_id refers to legal entity that is not active')
HTTP status codes*
HTTP status code | Message | What caused the error |
---|---|---|
401 | Invalid access token |
|
403 |
|
|
409 | client_id refers to legal entity that is not active |
|
ЕСОЗ - публічна документація