Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Version published after converting to the new editor

Table of Contents

Specification

...

  1. Verify the validity of access token
    1. in case of error return 401 ('Access denied')
  2. Check user scope contract_request:termiante in order to perform this action
    1. in case of error generate 401 response ('Invalid scopes')

Validate User

  1. Extract party_id (associated with user_idfrom token.

    1. Check party_id=party.contractor_owner_id
      1. in case of error return 403 "User is not allowed to perform this action"

...

Response

mapping


field
value
statusTERMINATED
status_reason$.status_reason
updated_atnow()
updated_by$.user_id


Auto termination

  • Fetch all contract_request with start_date<now().
  • for REIMBURSEMENT contracts
    • - find contracts in status NHS_SIGNED and nhs_signed < today -`REIMBURSEMENT_CONTRACT_REQUEST_AUTOTERMINATION_PERIOD_DAYS`
  • for CAPITATION contracts
    • - find contracts in status NHS_SIGNED and nhs_signed < today -`CAPITATION_CONTRACT_REQUEST_AUTOTERMINATION_PERIOD_DAYS`

Set status and status reason for such contract request as below:


field
value
statusTERMINATED
status_reason$.auto_expired
updated_atnow()
updated_by

$.user_id


Add status to event manager

...