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
Specification
Input parameters
See on Apiary
Filters
See on Apiary
Dictionaries
https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1300529210/EMPLOYEE+TYPE COUNTRY
EDUCATION_DEGREE
https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1195278373/SPEC+QUALIFICATION+TYPE https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1195114505/SPECIALITY+TYPE
https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1194852386/SPECIALITY+LEVEL https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1195278373/SPEC+QUALIFICATION+TYPE https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1194328146/PROVIDING+CONDITION https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1190887576/DIVISION+TYPE
/wiki/spaces/EBT/pages/1191149607 https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1199734785/SETTLEMENT+TYPE https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1199898644/STREET+TYPE https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1307344919/LEGAL+ENTITY+TYPE+V2
https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1321467905/OWNER+PROPERTY+TYPE https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1306296336/LEGAL+FORM https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1321533446/PHONE+TYPE
Authorize
Request to process the request using a token in the headers
Request structure
See on Apiary
Headers
Наприклад:
Content-Type:application/json
Request data validation
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 |
Response structure
Example:
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 | Response |
|
422 | Validation failed |