Table of Contents |
---|
Method is used for approve or reject employee request.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl -X GET -H 'Content-Type: application/json' 'http://ehealth.nebo15.com/employee_requests/d290f1ee-6c54-4b01-90e6-d701748f0851' |
Create user in Auth
Create user in Auth
Create/Update employee
Method logic:
- Search party_id by tax_id and birth_date for deduplication Party
- If found, update object party - Update party WS
- If not found, - Create object party
Update Party. See specification
The following fields can't be changed:
- tax_id
- Create party WS. See specification
- create related entity party-user in PRM
- Chech employee_id in request
- if employee_id is exist in request, Update employee.
- if employee_id is not exist, Create employee.
- Update employee. See specification
- The following fields can't be changed:
- employee_type
- if employee_type = 'DOCTOR', update doctor object
- The following fields can't be changed:
- Create new employee. See specification
- If employee_type = 'OWNER': deactivate all other records with the employee_type = 'OWNER' for the legal_entity, where new owner is creating:
Code Block | ||
---|---|---|
| ||
update employees e set is_active = false inserted_by = $new_owner_id inserted_at = md5(clock_timestamp() where e.legal_entity_id = $employee_request.legal_entity_id and e.employee_type = 'OWNER' |
Create related entity party-user
Create related entity party-user
Add role
Add user role by invoke service - название метода
...