ЕСОЗ - публічна документація
[DRAFT] Search parties [API-005-007-003-0117]
Сторінка знаходиться в процесі розробки. Інформація на ній може бути застарілою.
https://e-health-ua.atlassian.net/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)
- 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
- 9.2 Validate query params
- 9.3 Prepare response
- 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 | [DRAFT] Search parties [API-005-007-003-0117] |
Guideline ID | GUI-0011 |
Author | @ |
Document version | 1 |
Document status | DRAFT |
Date of creation | ХХ.ХХ.ХХХХ (дата фінальної версії документа – RC або PROD) |
Date of update | ХХ.ХХ.ХХХХ (дата зміни версії) |
Method API ID | API-005-007-003-0117 |
Microservices (namespace) | IL |
Component | Employees |
Component ID | COM-005-007 |
Link на API-специфікацію | https://ehealthmisapi1.docs.apiary.io/#reference/public.-portal-and-reports/parties/search-parties |
Resource | {{host}}/api/stats/parties |
Scope | відсутній за замовченням |
Protocol type | REST |
Request type | GET |
Sync/Async | Sync |
Public/Private | Public |
Purpose
This API is designed to search parties (doctors) on public portal and patient cabinet
Key features:
Returns only parties who have at least one employee with type DOCTOR, SPECIALIST or ASSISTANT
Logic
N/A
Configuration parameters
N/A
Dictionaries
EMPLOYEE_TYPE
COUNTRY
EDUCATION_DEGREE
SPEC_QUALIFICATION_TYPE
SPECIALITY_TYPE
SPECIALITY_LEVEL
SPEC_QUALIFICATION_TYPE
PROVIDING_CONDITION
+DIVISION_TYPE
+ADDRESS_TYPE
SETTLEMENT_TYPE
STREET_TYPE
LEGAL_ENTITY_TYPE_V2
OWNER_PROPERTY_TYPE
LEGAL_FORM
PHONE_TYPE
Input parameters
Input parameter | Mandatory | Type | Description | Example | |
---|---|---|---|---|---|
1 |
|
|
|
|
|
2 |
|
|
|
|
|
Request structure
See on API-specification
Headers
Request data validation
Authorize
Request to process the request using a token in the headers
Validate query params
Validate location - must be provided none of them or all four (location_north, location_south, location_west, location_east)
In case of error - generate 422 error
Prepare response
Get parties who has at least one employee with type DOCTOR, SPECIALIST or ASSISTANT
Outer join employee roles, healthcare services and divisions on (employees.id = employee_roles.employee_id and employee_roles.healthcare_service_id = healthcare_service.id and healthcare_service.division_id = divisions.id)
Filter result by query params
Query param | Source |
---|---|
employee_type | employees.employee_type |
full_name | parties.first_name + parties.second_name + parties.last_name (The same way as it works on search employees) |
speciality | healthcare_services.speciality_type |
division_id | healthcare_services.division_id |
division_name | divisions.name |
area | division_addresses |
region | division_addresses |
settlement | division_addresses |
location_* | divisions.location Must be within the given coordinates |
Processing
N/A
Response structure examples
See on API-specification
HTTP status codes
Response code | HTTP Status code | Message | Internal name | Description | |
---|---|---|---|---|---|
1 | Базові | ||||
2 |
| 200 | Response |
|
|
3 |
| 422 |
| Validation failed |
|
4 | Специфічні | ||||
5 |
|
|
|
|
|
Post-processing processes
N/A
Technical modules where the method is used
ЕСОЗ - публічна документація