Сторінка знаходиться в процесі розробки. Інформація на ній може бути застарілою.
/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)
Properties of a REST API method document
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
No
Dictionaries
Input parameters
Description of 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 (посилання на сторінку з API-специфікацією)
Description of the REST API request structure, example
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 (посилання на сторінку з API-специфікацією)
Description of the REST API response structure, example
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
No
Technical modules where the method is used
List of pages describing technical modules where the method is used