Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Search party_id by tax_id (tax_id or passport_number) and birth_date for deduplication Party
    1. If found, update object party - Update party WS
    2. If not found, - Create object party 
  2. Update Party.  See specification

    1. The following fields can't be changed:

      1. tax_id (tax_id or passport_number) 
      2. birth_date
    2. If doctor object in ER is null, don't update party.eductions/party.qualifications/party.specialities/party.science_degree. Otherwise update those objects.
  3. Create party WS. See specification
    1. create related entity party-user in PRM 
  4. Chech employee_id in request
    1. if employee_id is exist in request, Update employee.
    2. if  employee_id is not exist, Create employee.
  5. Update employee. See specification
    1. The following fields can't be changed:
      1. employee_type
      2. legal_entity_id
      3. start_date
    2. if employee_type = 'DOCTOR', update doctor object
  6. Create new employee. See specification
    1. 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:

...