Table of Contents |
---|
...
- Search party_id by tax_id (tax_id or passport_number) 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 (tax_id or passport_number)
- birth_date
- If doctor object in ER is null, don't update party.eductions/party.qualifications/party.specialities/party.science_degree. Otherwise update those objects.
- if about_myself/working_experience is null or empty string - don't update correspondent fields in parties.
- 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
- legal_entity_id
- start_date
- if employee_type = 'DOCTOR', 'SPECIALIST' or 'ASSISTANT' update doctor object
- if one of next fields were changed:
- first_name
- second_name
- last_name
find contracts with contractor_owner_id=$owner_id and status='VERIFIED'. Set ops.contracts.is_suspended=true
- The following fields can't be changed:
- Create new employee. See specification
If (employee_type = OWNER || employee_type = PHARMACY_OWNER) : deactivate all other records with the employee_type = OWNER
or employee_type = PHARMACY_OWNER for the legal_entity,
where new owner is creating:
...
In case new OWNER was added find contracts with contractor_owner_id=$old_owner_id and status='VERIFIED'.
Set ops.contracts.is_suspended=true
...