ЕСОЗ - публічна документація
Get Device dispense details
Purpose
This method allows to get detailed information of the Device dispense.
Specification
Link | Посилання на Apiary або Swagger | |
Resource | /api/patients/{{patient_id}}/device_dispenses/{{device_dispense_id}} | Посилання на ресурс, наприклад: /api/persons/create |
Scope |
| Scope для доступу |
Components | Devices | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription |
Microservices |
| Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC |
Protocol type | REST | Тип протоколу, який використовується запитом, наприклад: SOAP | REST |
Request type | POST | Тип запиту API, наприклад: GET, POST, PATCH… |
Sync/Async | Sync | Метод є синхронним чи асинхронним? |
Public/Private/Internal | Public | Потрібно зазначити тип методу за ступенем доступності |
Logic
Service returns specified Device dispense related to the legal entity from token:
Get Device dispense by ID from device_dispenses (MongoDB)
Validate data consistency:
Ensure that requested Device dispense relates to requested legal entity
Return 404 ('not_found') in case of error
Render a response according to specification
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
patient_id |
| String | Unique patient identifier |
|
device_dispense_id |
| String | Unique device dispense identifier |
|
Request structure
API paragraph not found
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 = 'device_dispense:read')
Return (403, 'Your scope does not allow to access this resource. Missing allowances: device_dispense:read') in case of invalid scope(s)
Access to the resource is also managed by ABAC rules (EN) .
Headers
Content-Type:application/json
Authorization:Bearer mF_9.B5f-4.1JqM
api-key:aFBLVTZ6Z2dON1V
Request data validation
Validate Device dispense
Get Device dispense identifier from the URL
Check Device dispense exists in device_dispenses (MongoDB)
Return 404 ('not_found') in case of error
Check Device dispense belongs to legal entity
Return 404 ('not_found') in case of error
Processing
API paragraph not found
Response structure
See on Apiary
HTTP status codes*
HTTP status code | Message | What caused the error |
---|---|---|
200 |
|
|
404 |
|
|
ЕСОЗ - публічна документація