Table of Contents
minLevel1
maxLevel3

...

Request to process the request using a token in the headers

Headers*

Наприклад:

  • Content-Type:application/json

  • Authorization:Bearer c2778f3064753ea70de870a53795f5c9

...

  1. update contract_request.status='SIGNED'

  2. update contract_request.contract_id=contract.id

    Code Block
    UPDATE contract_requests
    SET status = 'SIGNED'
    WHERE id = {:id}

...

Search parent_contract_id in contracts.id.

  1. Get contract.id by parent_contract_id and status='VERIFIED'

    1. fetch all records in contract_employees by contract_id and end_date is null

      1. set for those records end_date=$contract_request.start_date

  2. In case active contract found - terminate by changing status to TERMINATED.

...

  • define medical programs that are not present in the new contract.

  • deactivate all active medical program provision for defined programs within contract number and current legal entity: 

    • set is_active = false

    • set deactivate_reason = AUTO_CONTRACT_TERMINATION

    • set updated_at, updated by
      Note: Status of medical program provision entities for the programs remained in the new contract should not be changed.

...