/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 return records about Medication requests in person context by search parameters
Logic
Процеси роботи з випискою електронних рецептів
Preconditions
MRs should be created
Configuration parameters
Description of the configuration parameters that are used when processing a request in the system
Dictionaries
eHealth/SNOMED/anatomical_structure_administration_site_codes
eHealth/SNOMED/administration_methods
eHealth/SNOMED/dose_and_rate
eHealth/clinical_impression_patient_categories
Input parameters
Description of input parameters
Input parameter | Mandatory | Type | Description | Example | |
---|---|---|---|---|---|
1 | person_id | M | String | person_id of a patient | 5e661b15-a39a-4713-b18e-ba03a4a48ecc |
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 | status | O | Enum |
| ACTIVE |
5 | request_number | O | String | Public medication request human readable number | 0000-243P-1X53-EH38 |
6 | 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 |
7 | 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 |
8 | medication_id | O | String | innm dosage id | b075f148-7f93-4fc2-b2ec-2d81b19a9b5b |
9 | intent | O | String | Medication request intent | order |
10 | care_plan_id | O | String | care plan identifier | 8838982b-6a77-4cb5-87cd-cdb82eb55364 |
11 | encounter_id | O | String | encounter identifier | 7075e0e2-6b57-47fd-aff7-324806efa7e5 |
12 | episode_id | O | String | Unique episode identifier, look into episode in encounter | 6f305d0e-1758-4920-9167-d4f97225ad7e |
13 | medical_program_id | O | String | Internal medical program ID, a UUID string | 9a2fc263-6029-4b2b-b40a-66f4435509b7 |
14 | started_at_from | O | String | tart date of the period of treatment initiation period. Format DATE '2017-08-16 | 2017-08-16 |
15 | ended_at_from | O | String | End date of the period of treatment initiation period. Format DATE '2017-09-16' | 2017-09-16 |
16 | started_at_to | O | String | Start date of the period of treatment ending period. Format DATE '2017-08-20' | 2017-08-20 |
17 | ended_at_to | O | String | End date of the period of treatment ending period. Format DATE '2017-09-20' | 2017-09-20 |
18 | dispense_valid_from_start | O | String | Start date of the period of dispense issue date. Format DATE '2017-02-17' | 2017-02-17 |
19 | dispense_valid_from_end | O | String | End date of the period of dispense issue date. Format DATE '2017-02-19' | 2017-02-19 |
20 | dispense_valid_to_start | O | String | Start date of the period of dispense expiry date. Format DATE '2017-03-26' | 2017-03-26 |
21 | dispense_valid_to_end | O | String | nd date of the period of dispense expiry date. Format DATE '2017-03-30 | 2017-03-30 |
22 | page | O | Number | Page number | 2 |
23 | 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 person filtered by submitted parameters:
Get all Medication requests by person_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