...
...
...
...
Purpose
This WS is designed to return records about Medication requests in person context by search parameters.
Specification
...
Link
...
...
Посилання на Apiary або Swagger
...
Resource
...
/api/persons/{{person_id}}/medication_requests
...
Посилання на ресурс, наприклад: /api/persons/create
...
Scope
...
medication_request:read
...
Scope для доступу
...
Components
...
ePrescription
...
Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription
...
Microservices
...
API paragraph not found
...
Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC
...
Protocol type
...
REST
...
Тип протоколу, який використовується запитом, наприклад: SOAP | REST
...
Request type
...
GET
...
Тип запиту API, наприклад: GET, POST, PATCH…
...
Sync/Async
...
Sync
...
Метод є синхронним чи асинхронним?
Logic
API paragraph not found
Preconditions
No
Global and configurable parameters
Потрібно вказати глобальні та конфігураційні параметри.
Наприклад:
...
Variable
...
Values
...
Description
...
CARE_PLAN_<category>_ICD10_AM_CONDITIONS_ALLOWED
...
Values that matches with dictionaryeHealth/ICD10_AM/condition_codes
Example: “E10.32, E11.92”
...
(Example: CARE_PLAN_CLASS_1_ICD10_AM_CONDITIONS_ALLOWED)
Input parameters
Потрібно вказати вхідні параметри запиту. Наприклад, для GET /patients/composition/job/{{asyncJobId}} вхідний параметр:
...
Input parameter
...
Values
...
Type
...
Description
...
Example
...
asyncJobId
...
String
...
Async Job Object ID
Filters
Потрібно вказати фільтри. Наприклад, для GET /api/medication_requests/{{id}}/dispenses?status=PROCESSED фільтр:
...
Filter
...
Values
...
Type
...
Description
...
Example
...
status
...
String
...
Optional
...
PROCESSED
Request structure*
See on Apiary
Example:
Expand | ||
---|---|---|
| ||
|
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 .
Headers*
Наприклад:
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
api-key:uXhEczJ56adsfh3Ri9SUkc4en
Validate request*
Наприклад:
Validate request using JSON schema
In case validation failed - generate 422 error
Expand | ||
---|---|---|
| ||
|
Request data validation*
Валідація даних
Parameters that are used when processing the request
Configuration parameters
Наприклад: Доступ до методу визначається скоупом covid_certificate:get. Дозвіл на даний скоуп визначається адміністратором Системи шляхом конфігурування скоупів в контексті клієнтів і ролей.
Dictionaries
Потрібно вказати довідники, які використовує метод API
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*
See on Apiary
Example:
Expand | ||
---|---|---|
| ||
|
Post-processing processes*
Що має відбутися в ЦБД після опрацювання та відправлення відповіді, тощо
HTTP status codes*
...
HTTP status code
...
Message
...
What caused the error
...
...
...
...
...
...
Backward compatibility
Сумісність з попередніми версіями методуThe page is not supported. The method requirements can be found hereGet medication requests by search params [API-005-008-002-0146]