Purpose
This method is designed to obtain all Employees of the legal entity.
Specification
Logic
Verify the validity of access token
Check user scopes in order to perform this action
Search employees by filters in ws url:
required filters
legal_entity_id (MSP id),
optional filters:
status (employees status APPROVED, DISMISSED). By default used APPROVED
type (employees type DOCTOR, HR, ACCOUNTANT, PHARMACIST, etc). By default returned all types of employees.
limit (limit response size - quantity of employee objects). By default returned 50 objects.
starting_after (cursor to fetch next page)
ending_before (cursor to fetch previous page)
If according to filters employees are not found, WS returns empty data array.
WS returns shortened details, which consist of:
employee and party objects
for DOCTOR and PHARMACIST - additional returns specialities information
pagination data - for tecnical info.
Input parameters
See on Apiary
Filters
See on Apiary
Dictionaries
https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1300529210/EMPLOYEE+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
POSITION /wiki/spaces/EBT/pages/1190887576
Authorize
Request to process the request using a token in the headers
Headers
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
Request data validation
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 = 'employee:read')
Return (403, 'Your scope does not allow to access this resource. Missing allowances: employee:read') in case of invalid scope(s)
Processing
Service returns specified Employees:
Get Employees from
prm.employees
Filter by search params
Filter list above by submitted search parameters
Render a response according to specification with found Employees
Return empty array if no data found.
Response structure
Example:
Post-processing processes
API paragraph not found
HTTP status codes
Backward compatibility
API paragraph not found