Table of Contents | ||||
---|---|---|---|---|
|
...
Request to process the request using a token in the headers
Headers*
Наприклад:
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
...
update contract_request.status='SIGNED'
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.
Get contract.id by parent_contract_id and status='VERIFIED'
fetch all records in contract_employees by contract_id and end_date is null
set for those records end_date=$contract_request.start_date
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.
...