ЕСОЗ - публічна документація

Tests of `Declaration request` v3, search Person v.3

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


  1. Patient - Adult, New
  2. Tax_id - Yes
  3. Active declarations - No
  4. DR.1 LE = DR. 2 LE
  5. DR.1 Empl = DR. 2 Empl
  6. DR.1 tax_id = DR.2 tax_id
  7. DR.1 doc.number != DR.2 doc.number

Declaration dr.1 status - new

Declaration dr.2 status - new

  1. Create declaration request dr.1
  2. Create declaration request dr.2

Declaration dr.1 status - approved

Declaration dr.2 status - new

  1. Create declaration request dr.1
  2. Approved declaration request dr.1
  3. Create declaration request dr.2

DR2Patient's declaration request dr.1 and declaration dr.2 in different employeewith tax_id
  1. Patient - Adult, New
  2. Tax_id - Yes
  3. Active declarations - No
  4. DR.1 LE != DR. 2 LE
  5. DR.1 Empl != DR. 2 Empl
  6. DR.1 tax_id = DR.2 tax_id
  7. DR.1 doc.number = DR.2 doc.number

Declaration dr.1 status - from new to cancelled

Declaration dr.2 status - new

  1. Create declaration request dr.1
  2. Create declaration request dr.2

Declaration dr.1 status - from approved to cancelled

Declaration dr.2 status - new

  1. Create declaration request dr.1
  2. Approved declaration request dr.1
  3. Create declaration request dr.2

DR3Patient's declaration request dr.1 and declaration dr.2 in one employee w/o tax_id
  1. Patient - Adult, New
  2. Tax_id - No
  3. Active declarations - No
  4. DR.1 LE = DR. 2 LE
  5. DR.1 Empl = DR. 2 Empl
  6. DR.1 first_name = DR. 2 first_name
  7. DR.1 last_name = DR. 2 last_name
  8. DR.1 birth_date = DR. 2 birth_date
  9. DR.1 doc.number != DR.2 doc.number

Declaration dr.1 - status new

Declaration dr.2 - status new

  1. Create declaration request dr.1
  2. Create declaration request dr.2

Declaration dr.1 - status approved

Declaration dr.2 - status new

  1. Create declaration request dr.1
  2. Approved declaration request dr.1
  3. Create declaration request dr.2

DR4Patient's declaration request dr.1 and declaration dr.2 in different employee w/o tax_id
  1. Patient - Adult, New
  2. Tax_id - No
  3. Active declarations - No
  4. DR.1 LE != DR. 2 LE
  5. DR.1 Empl != DR. 2 Empl
  6. DR.1 first_name = DR. 2 first_name
  7. DR.1 last_name = DR. 2 last_name
  8. DR.1 birth_date != DR. 2 birth_date
  9. DR.1 doc.number = DR.2 doc.number

Declaration dr.1 - status from new to cancelled

Declaration dr.2 - status new

  1. Create declaration request dr.1
  2. Create declaration request dr.2

Declaration dr.1 - status from approved to cancelled

Declaration dr.2 - status new

  1. Create declaration request dr.1
  2. Approved declaration request dr.1
  3. Create declaration request dr.2

DR5

Declaration request OTP with auth.phone = conf.phone
  1. Patient - Adult, New
  2. Confidant person - Yes
  3. Authentication method - OTP
  4. Phone number - Verified
  5. Person auth_phone = confidant person phone
Response - 200Create declaration request



DR6Declaration request OTP with auth.phone != conf.phone
  1. Patient - Adult, New
  2. Confidant person - Yes
  3. Authentication method - OTP
  4. Phone number - Verified
  5. Person auth_phone != confidant person phone

Validation error - 422

  • "Confidant person should use own phone for authentication"
Create declaration request
DR7Declaration request tax_id id not null and related with bd and gender
  1. Patient - Adult, New
  2. Confidant person - Yes
  3. Phone number - Verified
  4. Person.tax_id is related with birth_date and gender
  5. Conf_person.tax_id is related with birth_date and gender
Response - 200Create declaration request
DR8Declaration request tax_id id not null and is not related with bd and gender
  1. Person.tax_id is related with birth_date and gender
  2. Conf_person.tax_id is not related with birth_date and gender
Validation error - 422
  • Person's tax ID is not valid

Create declaration request



  1. Person.tax_id is not related with birth_date and gender
  2. Conf_person.tax_id is related with birth_date and gender
  1. Person.tax_id is not related with birth_date and gender
  2. Conf_person.tax_id is not related with birth_date and gender

 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
DR1Create declaration request OTP w/o person.id and this person don't have any declPatient - NEW
Active declarations -No
Authentication method -OTP
Response - 200
decl request status - new
Create declaration request dr.1
DR2Create declaration request OFFLINE w/o person.id and this person don't have any declPatient - NEW
Active declarations -No
Authentication method -OTP
Response - 200
decl request status - new
Create declaration request dr.1
DR3Create declaration request OTP w/o person.id, but this person have tax_id and phone as other personPatient - 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
DR4Create declaration request OTP with person.id, but this person don't have any declPatient - 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
DR5Create declaration request OTP/OFFLINE w/o person.id and this person have same parametrs as other personPatient - 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
DR6Create declaration request OTP dr.2 with person.id(have same tax_id and auth.phonePatient - 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

DR7Create declaration request OTP dr.2 w/o person.id(have same tax_id and auth.phonePatient - 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

DR8Approved declaration request OTP dr.2 with person.id(have same tax_id and auth.phonePatient -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

DR9Sign declaration request OTP dr.2 with person.id (have same tax_id and auth.phonePatient -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

DR10Create 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

DR11Create 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

DR12Create 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

ЕСОЗ - публічна документація