ЕСОЗ - публічна документація
Get Medication request Request by ID_ENG
- 1 Purpose
- 2 Specification
- 3 Logic
- 4 Preconditions
- 5 Global and configurable parameters
- 6 Input parameters
- 7 Filters
- 8 Request structure
- 9 Authorize
- 10 Headers
- 11 Validate request
- 11.1 Validate FK
- 12 Request data validation
- 13 Parameters that are used when processing the request
- 13.1 Configuration parameters
- 13.2 Dictionaries
- 14 Processing
- 15 Response structure
- 16 Post-processing processes
- 16.1 HTTP status codes
- 17 Backward compatibility
Purpose
This WS is designed to return Request for Medication request detail.
Specification
Project Name | Електронний рецепт | COVID-certificate |
---|---|---|
Project abreviation | ePrescription | SVC |
Developer | API paragraph not found | Розробник методу API. Наприклад, Edenlab |
Project Manager | API paragraph not found | @Mykhailo Zhushman (Unlicensed) |
Tech Lead | API paragraph not found |
|
Product Owner | API paragraph not found | @Yevhen Batura NHSU |
Вusiness analyst | API paragraph not found | @Taras Khometa (Unlicensed) |
Status | APPROVED | APPROVED |
Version | API paragraph not found | 1.0 |
Date of release | API paragraph not found | Jun 22, 2022 |
Link | Посилання на Apiary або Swagger | |
Resource | /api/medication_request_requests/{{id}} | Наприклад: /api/persons/create |
Scope | medication_request_request:read | Зазначається потрібний scope |
Components | ePrescription, Reimbursement | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription |
Microservices | API paragraph not found | Перелік мікросервісів, які використовує метод API. Наприклад: Auth, ABAC |
Protocol type | REST | Тип протоколу, який використовується запитом, наприклад: SOAP | REST |
Request type | GET | Тип HTTP методу, який використовується запитом, наприклад: POST | GET… |
Sync/Async | Sync | Метод є синхронним чи асинхронним? |
Logic
Logic WS
Verify the validity of access token.
Check user scopes in order to perform this action (scope = 'medication_request_request:read').
Search Requests for Medication request by id in WS url:
SELECT * FROM medication_request_requests WHERE id=$.id AND legal_entity_id = $.context.legal_entity_id
Logic WS for medication request requests based on care plan
Get party_id from $.context.user_id
Get list from $.prm.employees for this party_id
Get care_plan_id from $.medication_request_requests.data_based_on_care_plan_id
Check $.approvals for user's employees (granted_to) on care_plan_id (granted_resources) and $.medication_request_requests.person_id (granted_by)
Search Medication request requests by filters: data_based_on_care_plan_id, person_id
SELECT * FROM medication_request_requests MRR WHERE MRR.id = $.id AND MRR.data_based_on_care_plan_id = $.id AND MRR.person_id = $.id AND MRR.is_active = TRUE
Preconditions
API paragraph not found
Global and configurable parameters
No
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
id |
| String | Required | 48416485-cc98-46c4-8bba-e321de9e1ecd |
Filters
No
Request structure
API paragraph not found
Authorize
Request to process the request using a token in the headers
Headers
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
Validate request
Validate FK
Validate id - medication_request_request_id exists:
return 422 in case validation fails (422 EView).
Request data validation
API paragraph not found
Parameters that are used when processing the request
Configuration parameters
Access to the method is defined by the scope medication_request_request:read. Permission for this scope is determined by the System administrator by configuring scopes in the context of clients and roles.
Dictionaries
API paragraph not found
Processing
API paragraph not found
Response structure
See on Apiary
Example:
Post-processing processes
No
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 | Response |
|
422 | Error |
|
Backward compatibility
API paragraph not found
ЕСОЗ - публічна документація