Versions Compared

Key

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


n/ndescriptioninputsexpected result
actual result
CCR1Create Contract Request
  • token
  • json include
    • contractor_employee_divisions
    • external_contractors
    • external_contractors_flag
200, created contract request

200, 

  • there is no validation for external_contractors.legal_entity_id
CCR2Create contract request without external_contractors_flag and with external_contractors
  • token
  • json include
    • contractor_employee_divisions
    • external_contractors
422, external_contractors_flag422, Invalid external_contractor_flag
CCR2.1Create contract request with external_contractors_flag and with empty external_contractors
  • token
  • "external_contractor_flag": true,
    "external_contractors": [],
422, array shouldn't be empty422 
CCR2.2Create contract request with external_contractors_flag =false and without external_contractors
  • token
  • "external_contractor_flag": false
200200,
CCR2.3Create contract request with external_contractors in division which doesn't belong to contract divisions
  • token
  • "external_contractor": incorrect division
422, The division is not belong to contractor_divisions422
CCR2.4Create contract request with employee_divisions with division which doesn't belong to contract divisions
  • token
  • "contractor_employee_divisions": incorrect division
422, The division is not belong to contractor_divisions422
CCR3Create Contract Request with doctor_token
  • doctor_token
  • json 
403, invalid access token403, Your scope does not allow to access this resource. Missing allowances: contract_request:create
CCR4Create contract request without scope
  • owner_token
403403, Your scope does not allow to access this resource. Missing allowances: contract_request:create
CCR5Create contract request with contractor_owner from other legal entity
  • another contractor_owner
  • json
403422, Contractor owner must be active within current legal entity in contract request
CCR6Create contract request with DISMISSED contractor_owner
  • contractor_owner - is_active=false or status='DISMISSED'
422422
CCR7Create contract request with info from nhs side
  • json
422422, schema does not allow additional properties
CCR8contract request with invalid start_datestart_date='2020-01-01'422

422,

Start date must be within this or next year


CCR8.1contract request with invalid start_datestart_date=today-1422

422,

Start date must be greater than create date

CCR9contract request with invalid end_date"start_date": "2019-05-08",
"end_date": "2020-04-20",
422

422,

The year of start_date and and date must be equal

CCR9.1contract request with invalid end_date

end_date<start_date:

"start_date": "2019-05-06",
"end_date": "2019-04-20",

422,End date must be greater than start date422
CCR10Contractor_employee_division with dismissed doctorcontractor_employee_divisions.employee_id.status='DISMISSED'422, employee422, Employee must be active DOCTOR
CCR11Contractor_employee_division with inactive divisioncontractor_employee_divisions.division_id.status=INACTIVE422, division422, Division must be active and within current legal_entity
CCR12Contractor_employee_division with doctor and different division

contractor_employee_divisions:

  • employee_id doesn't match division_id
200200
CCR13Update contract using contract_numberactive contract by contract_number, all fields filled according to business rules200

200

CCR14Update contract using contract_number that doesn't exist contract_number that doesn't exist422 422, Contract with such contract number does not exist
CCR15Update contract using terminated contract_numberterminated contract by contract_number422422, There is no active contract with such contract_number
CCR16Update contract without contractor_employee_divisions contractor_employee_divisions blank422422, required property contractor_employee_divisions was not present
CCR17Update contract within start_date start_date422 422, Start date can't be updated via Contract Request
CCR18Update contract within end_date end_date422 422, End date can't be updated via Contract Request
CCR19Create Contract Request within same dates as existing contract request
  • start_date & end_date as start_date and end_date existing NEW/APPROVED request
  • 200,
  • previous request is terminated
  • 200
CCR20Create Contract Request within same dates as existing contract request
  • start_date & end_date as start_date and end_date existing SIGNED request
200, previous request in status=SIGNED200, previous request in status=SIGNED
CCR21Create Contract Request signed by not matching token DRFO
  • invalid DS


reimbursement contracts
CCR22Create reimbursement CR type
  • token
  • json include
200
CCR23create reimbursement CR by MSP
  • msp owner token
  • json include
    • type reimbursement
409

409

"message":"Contract type \"REIMBURSEMENT\" is not allowed for legal_entity with type \"MSP\"

CCR24create capitation CR by Pharmacy
  • pharmacy owner token
  • json include
    • type capitation
422200
CCR25create reimbursement CR by Pharmacy
  • pharmacy owner token
  • json capitation contract
422422
CCR26create reimbursement CR by Pharmacy with wrong contract number 
  • pharmacy owner token
  • json include
    • "contract_number":"яяяя-яяяя-яяяя",
422

422

 "description":"string does not match pattern \"^\\\\d{4}-[\\\\dAEHKMPTX]{4}-[\\\\dAEHKMPTX]{4}$\"

CCR27create reimbursement CR by Pharmacy with contract number not exists in DB
  • pharmacy owner token
  • json include
    • "contract_number":"1000-0MMM-M000"
422

422

"message":"Verified contract with such contract number does not exist"

CCR28create reimbursement CR with wrong contractor_owner_id
  • pharmacy owner token
  • json include
    • wrong contractor_owner_id 
422

422

"description":"Contractor owner must be active within current legal entity in contract request"

CCR29create reimbursement CR with capitation previous_request_idcapitation previous_request_id 422"message":"Previous request doesn't belong to legal entity"
CCR30create reimbursement CR with correct previous_request_id
  • token
  • json include

200

contract request created

422

"message":"previous_request_id does not exist"

CCR31create reimbursement CR with inactive contractor_division id
  • token
  • json include
"contractor_divisions":[
"1959e679-2bc4-4448-898a-351a0d37fea3"
]
422"description":"Division is not active"
CCR32create reimbursement CR with wrong contractor_division id
  • token
  • json include
"contractor_divisions":[
"21b0b9e2-8516-4b64-84b4-96cdf2f2b219"
]
422

422

"description":"Division must be active and within current legal_entity"

CCR33create reimbursement CR with exists id
  • token
  • json
200500
CCR34create reimbursement CR with several contractor_division id
  • token
  • json
200`200
CCR35create reimbursement CR with start_date < today
422

422

{"description":"Start date must be greater than current date"

CCR36create reimbursement CR with start_date > end_date
422

422

{"description":"end_date should be equal or greater than start_date"

CCR37create reimbursement CR with contract number <> type
  • pharmacy owner token
  • json include
    • contract_number from capitation contract id
409409