Table of Contents | ||||
---|---|---|---|---|
|
...
Page Properties | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|
Preconditions
Contract should be created on MSP/Pharmacy side
...
Verify the validity of access token
in case of error return 401 ('Access denied')
Check user scope contract_request:create in order to perform this action
in case of error generate 401 response ('Invalid scopes')
Headers
Наприклад:
Content-Type:application/json
...
contract request number structure XXXX-1234-5678-C , where:
XXXX - series: numbers + only some letters (A, E, H, K, M, P, T, X)
1234-5678 - randomly generated numbers and letters A, E, H, K, M, P, T, X.
contract_number is in request
in case error return 409, "Contract number should be in payload"
check there is a contract with such contract_number
in case of error return 422 error ('Contract with such contract number does not exist')
contrat status = VARIFIED
in case of error return 409 error ('Can not update terminated contract')
Contract.is_suspended = false
in case error 409, "suspended contract should be updated by contractor_owner"
Check only next fields are different from contract
nhs_signer_id
nhs_signer_base
nhs_contract_price (for capitation contracts only)
nhs_payment_method
issue_city
Misc
assignee_id
in case error return 422, "Not allowed to change field $.field"
Validate end_date:
if $contract_number and $end_date is passed in request:
the year of $end_date must be greater or equal then the $start_date
in case of error return 422 ('The year of end_date should be one year greater or equal to start_date')
the $end_date should be less than $end_date from the previous contract equal or greater than today and less than or equal to three month from $end_date the previous contract
in case of error return 422 ('The end_date should may be equal or greater than of the previous contract today and less than or equal to three monthsmonth from end_date the previous contract')
if $contract_number w/o $end_date is passed in request:
$end_date is taken from the previous contract.
Processing
Search pending contract requests
...
Get url for contract request upload.
ParameterSourceaction 'GET' bucket 'CONTRACT_REQUEST' resource_id : CONTRACT_REQUEST_ID resource_name : CONTRACT_REQUEST_APPROVED timestamp :TIMESTAMP Upload signed contract request to media storage
...