When flag `USE_DEDUPLICATION_MODEL` turn on on IL, we have new logic.
n/n Test Case | Test Case Description | Test Case Inputs | Expected Result | Step by Step Script | Actual result |
---|---|---|---|---|---|
DR1 | Patient's declaration request dr.1 and declaration dr.2 in one employee with tax_id |
| Declaration dr.1 status - new Declaration dr.2 status - new |
| |
Declaration dr.1 status - approved Declaration dr.2 status - new |
| ||||
DR2 | Patient's declaration request dr.1 and declaration dr.2 in different employeewith tax_id |
| Declaration dr.1 status - from new to cancelled Declaration dr.2 status - new |
| |
Declaration dr.1 status - from approved to cancelled Declaration dr.2 status - new |
| ||||
DR3 | Patient's declaration request dr.1 and declaration dr.2 in one employee w/o tax_id |
| Declaration dr.1 - status new Declaration dr.2 - status new |
| |
Declaration dr.1 - status approved Declaration dr.2 - status new |
| ||||
DR4 | Patient's declaration request dr.1 and declaration dr.2 in different employee w/o tax_id |
| Declaration dr.1 - status from new to cancelled Declaration dr.2 - status new |
| |
Declaration dr.1 - status from approved to cancelled Declaration dr.2 - status new |
| ||||
DR5 | Declaration request OTP with auth.phone = conf.phone |
| Response - 200 | Create declaration request | |
DR6 | Declaration request OTP with auth.phone != conf.phone |
| Validation error - 422
| Create declaration request | |
DR7 | Declaration request tax_id id not null and related with bd and gender |
| Response - 200 | Create declaration request | |
DR8 | Declaration request tax_id id not null and is not related with bd and gender |
| Validation error - 422
| Create declaration request | |
| |||||
|
Create decl request with to w/o person.id
n/n Test Case | Test Case Description | Test Case Inputs | Expected Result | Step by Step Script | Actual result |
---|---|---|---|---|---|
DR1 | Create declaration request OTP w/o person.id and this person don't have any decl | Patient - NEW Active declarations -No Authentication method -OTP | Response - 200 decl request status - new | Create declaration request dr.1 | |
DR2 | Create declaration request OFFLINE w/o person.id and this person don't have any decl | Patient - NEW Active declarations -No Authentication method -OTP | Response - 200 decl request status - new | Create declaration request dr.1 | |
DR3 | Create declaration request OTP w/o person.id, but this person have tax_id and phone as other person | Patient - NEW Active declarations -No Authentication method -OTP dr.tax_id and dr.auth_phone as in any active person | Response - 422 Such person exists. Update this person | Create declaration request dr.1 | |
DR4 | Create declaration request OTP with person.id, but this person don't have any decl | Patient - NEW Active declarations -No Authentication method -OTP dr.tax_id and dr.auth_phone not in any active person | Response - 422 such person can't be updated. New person should be created instead | Create declaration request dr.1 | |
DR5 | Create declaration request OTP/OFFLINE w/o person.id and this person have same parametrs as other person | Patient - NEW Active declarations -No dr.tax_id, dr.auth_phone, dr.doc_number, dr.last_name, dr.first_name is same as in other person | Response - 422 Such person exists. Update this person | Create declaration request dr.1 | |
DR6 | Create declaration request OTP dr.2 with person.id(have same tax_id and auth.phone | Patient - | |||
OLD Active declarations -Yes Authentication method -OTP DR2.person.id = d1.person_id DR2.person.tax_id = d1.tax_id DR2.person.auth_phone = d1.auth_phone | Response - 200 On decl request dr.2 in il.declaration_request.mpi = d1.person_id | Create declaration request d.1 Approved declaration request d.1 Sign declaration request d1 Create declaration request dr.2 | |||
DR7 | Create declaration request OTP dr.2 w/ | ||||
o person.id(have same tax_id and auth.phone | Patient - | ||||
OLD Active declarations -Yes Authentication method -OTP DR2.person.id = d1.person_id DR2.person.tax_id = d1.tax_id DR2.person.auth_phone = d1.auth_phone | Validation error - 422 Such person exists. Update this person | Create declaration request d.1 Approved declaration request d.1 Sign declaration request d1 Create declaration request dr.2 | |||
DR8 | Approved declaration request OTP dr.2 with person.id(have same tax_id and auth.phone | Patient - | |||
OLD Active declarations -Yes Authentication method -OTP DR2.person.id= d1.person_id DR2.person.tax_id = d1.tax_id DR2.person.auth_phone = d1.auth_phone | Responce - 200 verified code for old | ||||
number Declaration request | |||||
dr2 status APPROVED | Create declaration request d.1 Approved declaration request d.1 Sign declaration request d1 Create declaration request dr.2 Approved declaration request dr.1 | ||||
DR9 | Sign declaration request OTP dr.2 with person.id (have same tax_id and auth.phone | Patient -Adult Active declarations -Yes Authentication method - OTP DR2.person.id= d1.person_id DR2.person.tax_id = d1.tax_id DR2.person.auth_phone = d1.auth_phone | Responce - 200 Declaration request dr2 status SIGN. Create new d2, d1.status = terminated dr2.person_id = d1.person_id | Create declaration request d.1 Approved declaration request d.1 Sign declaration request d1 Create declaration request dr.2 Approved declaration request dr.1 Sign declaration request dr.2 | |
DR10 | Create declaration request OFFLINE dr.2with person.id(have same person information) | Patient -OLD Active declarations -Yes Authentication method - OFFLINE DR2.person.id = d1.person_id DR2.person.tax_id = d1.tax_id DR2.person.doc_number = d1.doc_number DR2.person.last_name = d1.last_name DR2.person.first_name = d1.fisrt_name | Response - 200 On decl request dr.2 in il.declaration_request.mpi = d1.person_id | Create declaration request d.1 Approved declaration request d.1 Sign declaration request d1 Create declaration request dr.2 | |
DR11 | Create declaration request OFFLINE dr.2w/o person.id(have same person information) | Patient -OLD Active declarations -Yes Authentication method - OFFLINE DR2.person.id = d1.person_id DR2.person.tax_id = d1.tax_id DR2.person.doc_number = d1.doc_number DR2.person.last_name = d1.last_name DR2.person.first_name = d1.fisrt_name | Validation error - 422 Such person exists. Update this person | Create declaration request d.1 Approved declaration request d.1 Sign declaration request d1 Create declaration request dr.2 | |
DR12 | Create declaration request OTP dr.2 with person.id(too many modifiable parameters) | Patient - OLD Active declarations -Yes Authentication method -OTP DR2.person.id = d1.person_id DR2.person.tax_id != d1.tax_id DR2.person.auth_phone != d1.auth_phone DR2.person.doc_number != d1.doc_number) | Validation error - 422 such person can't be updated. New person should be created instead | Create declaration request d.1 Approved declaration request d.1 Sign declaration request d1 Create declaration request dr.2 |