ЕСОЗ - публічна документація
Get Medication requests in care plan context [API-005-008-002-0147]
- 1 Properties of a REST API method document
- 2 Purpose
- 3 Logic
- 4 Configuration parameters
- 5 Dictionaries
- 6 Input parameters
- 7 Request structure
- 8 Headers
- 9 Request data validation
- 9.1 Authorize
- 10 Processing
- 11 Response structure examples
- 12 HTTP status codes
- 13 Post-processing processes
- 14 Technical modules where the method is used
Properties of a REST API method document
Document type | Метод REST API |
---|---|
Document title | Get Medication requests in care plan context [API-005-008-002-0147] |
Guideline ID | GUI-0011 |
Author | @ |
Document version | 1 |
Document status | DRAFT |
Date of creation | ХХ.ХХ.ХХХХ (дата фінальної версії документа – RC або PROD) |
Date of update | ХХ.ХХ.ХХХХ (дата зміни версії) |
Method API ID | API-005-008-002-0147 |
Microservices (namespace) | IL |
Component | ePrescription |
Component ID | COM-005-008 |
Link на API-специфікацію | |
Resource | {{host}}/api/care_plans/{{care_plan_id}}/medication_requests |
Scope | medication_request:read |
Protocol type | REST |
Request type | GET |
Sync/Async | Sync |
Public/Private | Public |
Purpose
This WS is designed to search Medication requests in the care plan context. If the user has approval on the care plan, he will receive a list of Medication requests based on this care plan
Logic
Процеси роботи з випискою електронних рецептів
Configuration parameters
N/A
Dictionaries
Input parameters
Input parameter | Mandatory | Type | Description | Example | |
---|---|---|---|---|---|
1 | care_plan_id | M | String | care plan identifier | 8838982b-6a77-4cb5-87cd-cdb82eb55364 |
2 | legal_entity_id | O | String | legal entity identifier | d290f1ee-6c54-4b01-90e6-d701748f0851 |
3 | employee_id | O | String | user_id of a doctor | 7124259c-eeb1-4cbb-acac-ada2162675d1 |
4 | person_id | O | String | person_id of a patient | d290f1ee-6c54-4b01-90e6-d701748f0851 |
5 | status | O | Enum |
| ACTIVE |
6 | request_number | O | String | Public medication request human readable number | 0000-243P-1X53-EH38 |
7 | created_from | O | String | Medication request creation date period start, which is determined by the external system. Format DATE '2017-08-17' | 2017-08-17 |
8 | created_to | O | String | Medication request creation date period end, which is determined by the external system. Format DATE '2017-08-30' | 2017-08-30 |
9 | medication_id | O | String | innm dosage id | b075f148-7f93-4fc2-b2ec-2d81b19a9b5b |
10 | intent | O | String | Medication request intent | order |
11 | encounter_id |
|
| encounter identifier | 7075e0e2-6b57-47fd-aff7-324806efa7e5 |
12 | medical_program_id | O | String | Internal medical program ID, a UUID string | 9a2fc263-6029-4b2b-b40a-66f4435509b7 |
13 | tarted_at_from | O | String | tart date of the period of treatment initiation period. Format DATE '2017-08-16 | 2017-08-16 |
14 | ended_at_from | O | String | End date of the period of treatment initiation period. Format DATE '2017-09-16' | 2017-09-16 |
15 | started_at_to | O | String | Start date of the period of treatment ending period. Format DATE '2017-08-20' | 2017-08-20 |
16 | ended_at_to | O | String | End date of the period of treatment ending period. Format DATE '2017-09-20' | 2017-09-20 |
17 | dispense_valid_from_start | O | String | Start date of the period of dispense issue date. Format DATE '2017-02-17' | 2017-02-17 |
18 | dispense_valid_from_end | O | String | End date of the period of dispense issue date. Format DATE '2017-02-19' | 2017-02-19 |
19 | dispense_valid_to_start | O | String | Start date of the period of dispense expiry date. Format DATE '2017-03-26' | 2017-03-26 |
20 | dispense_valid_to_end | O | String | nd date of the period of dispense expiry date. Format DATE '2017-03-30 | 2017-03-30 |
21 | page | O | Number | Page number. | 2 |
22 | page_size | O | Number | A limit on the number of objects to be returned, between 1 and 300. Default: 50 | 50 |
Request structure
See on API-specification
Headers
Request data validation
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 = 'medication_request:read')
Return (403, 'Your scope does not allow to access this resource. Missing allowances: medication_request:read') in case of invalid scope(s)
Access to the resource is also managed by ABAC rules (EN).
Processing
Service returns all Medication requests related to the care plan filtered by submitted parameters:
Get all Medication requests by care_plan_id from medication_requests (OPS database)
Validate data consistency:
Ensure that requested Medication requests have ABAC context
Return 403 ('Access denied') in case of error
Filter list above by submitted search parameters
Render a response according to specification with found Medication requests entities.
Response structure examples
See on API-specification
HTTP status codes
Response code | HTTP Status code | Message | Internal name | Description | |
---|---|---|---|---|---|
1 | Базові | ||||
2 |
| 401 | Invalid access token |
| Недійсний токен доступу |
3 |
| 403 | Your scope does not allow to access this resource. Missing allowances: medication_request:read' |
| Для вашої ролі відсутній доступ до цього ресурсу. Необхідний доступ на отримання переліку рецептів |
4 |
| 403 | Access denied |
| Доступ заборонено |
5 | Специфічні | ||||
6 |
|
|
|
|
|
Post-processing processes
N/A
Technical modules where the method is used
ЕСОЗ - публічна документація