ЕСОЗ - публічна документація
REST API PRIVATE SPACE Private. Get Medication Requests [API-005-008-002-0161]
- 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
- 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 | REST API PRIVATE SPACE Private. Get Medication Requests [API-005-008-002-0161] |
Guideline ID | GUI-0011 |
Author | @Iryna Lishtaba (SoE eHealth) |
Document version | 1 |
Document status | DRAFT |
Date of creation | 04.03.2025 |
Date of update | 04.03.2025 |
Method API ID | API-005-008-002-0161 |
Microservices (namespace) | IL |
Link на API-специфікацію | |
Resource | {{host}}/api/admin/medication_requests |
Scope | medication_request_admin:read |
Protocol type | REST |
Request type | GET |
Sync/Async | Sync |
Public/Private | Private |
Purpose
This WS is designed to search (get list) of Medication requests for NHS_ADMIN. In the response of these endpoint person_id is return in hashed form.
According to requirements user of NHS_ADMIN can see all Medication request (without limitations)
Logic
Verify the validity of access token
Return 401 in case validation fails
Check user scopes in order to perform this action (scope = 'medication_request_admin:read')
Return 403 in case invalid scope(s)Search Medication requests by filters:
SELECT * FROM medication_requests MR WHERE (MR.employee_id == $.employee_id OR $.employee_id IS NULL) AND (MR.status == $.status OR $.status IS NULL) AND (MR.patient_id == $.patient_id OR $.patient_id IS NULL) AND (MR.medication_id = $.medication_id OR $.medication_id IS NULL) AND (MR.number = $.request_number OR $.request_number IS NULL) AND (MR.created_at >= $.created_from OR $.created_from IS NULL) AND (MR.created_at <= $.created_to OR $.created_to IS NULL) AND (MR.legal_entity_id == $.legal_entity_id OR $.legal_entity_id IS NULL)
Configuration parameters
N/A
Dictionaries
N/A
Input parameters
Input parameter | Mandatory | Type | Description | Example | |
---|---|---|---|---|---|
1 | id | O | String | Medication dispense ID | a89f6a26-4221-4597-a1d2-542d5e40b565 |
2 | medication_request_id | O | String | Medication request ID | a89f6a26-4221-4597-a1d2-542d5e40b565 |
3 | legal_entity_id | O | String | legal entity identifier | d290f1ee-6c54-4b01-90e6-d701748f0851 |
4 | employee_id | O | String | user_id of a doctor | 7124259c-eeb1-4cbb-acac-ada2162675d1 |
5 | person_id | O | String | hash of person_id of a patient | 01352B970879A80E19B60C15C8E488DA26CABC3B9F7FA71684904A99DBD5ACE4 |
6 | status | O | Enum | Status | ACTIVE |
7 | request_number | O | String | Public medication request human readable number | 0000-243P-1X53-EH38 |
8 | 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 |
9 | medication_id | O | String | innm dosage id | b075f148-7f93-4fc2-b2ec-2d81b19a9b5b |
10 | intent | O | String | Medication request intent | order |
11 | care_plan_id | O | String | care plan identifier | 8838982b-6a77-4cb5-87cd-cdb82eb55364 |
12 | encounter_id | O | String | encounter identifier | 7075e0e2-6b57-47fd-aff7-324806efa7e5 |
13 | page | O | Number | Page number | 2 |
14 | 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
If according to filters requests are not found, WS returns empty data array.
WS also returns pagination data - for technical info.
Processing
N/A
Response structure examples
See on API-specification
HTTP status codes
Response code | HTTP Status code | Message | Internal name | Description | |
---|---|---|---|---|---|
1 | Базові | ||||
2 |
| 401 | validation fails |
| Помилка валідації |
3 |
| 403 | invalid scope(s) |
| Відсутній доступ |
4 | Специфічні | ||||
5 |
|
|
|
|
|
Post-processing processes
Return object with responce structure from WS Sign Medication Request.
Technical modules where the method is used
Related content
ЕСОЗ - публічна документація