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

Declaration requests tests

Create and approve declaration request

n/n Test CaseTest Case DescriptionTest Case InputsExpected ResultStep by Step ScriptActual result
DR1Declaration request OTP with phone not verified.
  1. Patient - Adult, New
  2. Confidant person - No
  3. Active declarations - No
  4. Authentication method - OTP
  5. Phone number - Not verified
  6. Doctor specialization - Therapist

Validation error - 422

  • Phone number not verified
  1. Create declaration request

DR2Declaration request OTP with phone verified.
  1. Patient - Adult, New
  2. Confidant person - No
  3. Active declarations - No
  4. Authentication method - OTP
  5. Phone number - Verified
  6. Doctor specialization - Therapist

Response - 200

  • No SMS to Patient
  • Declaration request saved to DB in status APPROVED
  1. Create declaration request
  2. Approve declaration request

DR3Declaration request OFFLINE with phone verified.
  1. Patient - Adult, New
  2. Confidant person - No
  3. Active declarations - No
  4. Authentication method - OFFLINE
  5. Phone number - Verified
  6. Doctor specialization - Therapist

Response - 200

  • No sms to Patient
  • two links for documents to upload
  • Declaration request saved to DB in status APPROVED
  1. Create declaration request 
  2. Upload document
  3. Approve declaration request

DR4Declaration request OTP with phone verified and previous authentication method OTP
  1. Patient - Adult, Existing
  2. Confidant person - No
  3. Active declarations - No
  4. Authentication method - OTP
  5. Previous method - OTP
  6. Phone number - Verified, Same
  7. Doctor specialization - Therapist

Response - 200

  • No SMS to Patient
  • Declaration request saved to DB in status APPROVED 
  • Create declaration request
  • Approve declaration request

DR5Declaration request OTP with active declaration
  1. Patient - Adult, Existing
  2. Confidant person - No
  3. Active declarations - Yes
  4. Authentication method - OTP
  5. Previous method - OTP
  6. Phone number - Verified, Same
  7. Doctor specialization - Therapist

Response - 200

  • No SMS to Patient
  • Declaration request saved to DB in status APPROVED
  • Create declaration request
  • Approve declaration request

DR6Declaration request OTP with active declaration and previous authentication method OFFLINE
  1. Patient - Adult, Existing
  2. Confidant person - No
  3. Active declarations - No
  4. Authentication method - OTP
  5. Previous method - OFFLINE
  6. Phone number - Verified
  7. Doctor specialization - Therapist

Response - 200

  • No SMS to Patient
  • links for documents to upload?
  • Create declaration request
  • Approve declaration request

DR7Declaration request OFFLINE with active declaration and previous method OTP
  1. Patient - Adult, Existing
  2. Confidant person - No
  3. Active declarations - Yes
  4. Authentication method - OFFLINE
  5. Previous method - OTP
  6. Phone number - Verified
  7. Doctor specialization - Therapist

Response - 200

  • No SMS to Patient
  • notification
    • authentication_method_current with type and phone number "+38095*****98"
  • Declaration request saved to DB in status APPROVED
  • Create declaration request
  • Approve declaration request

DR8

Клиент через несколько месяцев

достигнет 18 лет. Врач терапевт

  1. Patient - Child, New
  2. Confidant person - No
  3. Active declaration - No
  4. Authentication method - OTP
  5. Phone number - Verified
  6. Doctor specialisation - Therapist

Response - 422

  • Doctor speciality does not meet the patient's age requirement.
  • Create declaration request

DR9

Клиент через несколько месяцев

достигнет 18 лет. Врач терапевт

  1. Patient - Child, New
  2. Confidant person - No
  3. Active declaration - No
  4. Authentication method - OTP
  5. Phone number - Verified
  6. Doctor specialisation - Pediatrician

Response 200

  • End date = birth date + 18 years
  • Create declaration request

DR10Patient will be an adult in several months


  1. Patient - Child, New
  2. Confidant person - No
  3. Active declaration - No
  4. Authentication method - OTP
  5. Phone number - Verified
  6. Doctor specialisation - NOT Therapist

Response - 200

  • No SMS to Patient
  • Declaration request saved to DB in status APPROVED
  • Create declaration request
  • Approve declaration request

DR11

Ошибка валидации статуса declaration

request - №403 (на момент подписания статус реквеста должен быть APPROVE)

  1. Patient - Child, New
  2. Confidant person - No
  3. Active declaration - No
  4. Authentication method - OTP
  5. Phone number - Verified
  6. Declaration request status - NEW
Responce - 403
  • Create declaration request
  • Approve declaration request

DR12Declaration request for Adult and Pediatrician
  1. Patient - Adult, New
  2. Confidant person - No
  3. Active declarations - No
  4. Authentication method - OTP
  5. Phone number - Verified
  6. Doctor specialization - Pediatrician

Response - 422

  • Doctor speciality does not meet the patient's age requirement.
  • Create declaration request

DR13Declaration requests with two REGISTRATION addresses
  1. Patient - Adult, New
  2. Confidant person - No
  3. Active declarations - No
  4. Authentication method - OTP
  5. Phone number - Verified
  6. Doctor specialization - Therapist
  7. Addresses type - REGISTRATION

Response - 422

  • one and only one registration address is required
  • Create declaration request

DR14Declaration request with no phone and auth method OFFLINE
  1. Patient - Adult, New
  2. Confidant person - No
  3. Active declarations - No
  4. Authentication method - OFFLINE
  5. Phone number - Not verified and not exists

Responce - 422

  • Error during MAN interaction. Result from MAN: \"{\\\"type\\\":\\\"internal_error\\\"}\"
  • Create declaration request

DR15Declaration request OTP with previous method OTP and different mobile phone 
  1. Patient - Adult, Old
  2. Confidant person - No
  3. Active declarations - Yes
  4. Authentication method - OTP
  5. Previous method - OTP
  6. phone number - different
  7. Phone number - Verified

Responce - 200

  • notification 
    • authentication_method_current with type and phone number "+38095*****98"
  • verified code for old nunber
  • Declaration request saved to DB in status APPROVED
  • Create declaration request
  • Approve declaration request

DR16Declaration request with patien birth date incorrect
  1. Patient - Adult, New
  2. Confidant person - No
  3. Active declarations - No
  4. Authentication method - OTP
  5. Phone number - Verified
  6. Patient birth date - 2003-02-29

Responce - 422

  • description": "expected \"2003-02-29\" to be a valid ISO 8601 date
  • Create declaration request

DR17Sign declaration
  1. Patient - Adult, New
  2. Confidant person - No
  3. Active declarations - No
  4. Phone number - Verified

Response 200

  • New declaration saved to DB in status SIGN


  • Create declaration request
  • Approve declaration request
  • Get declaration request
  • Sign declaration request

DR18Re-sign declaration with the same patient 
  1. Patient - Adult, Old
  2. Confidant person - No
  3. Active declarations - Yes
  4. Phone number - Verified

Response 200

  • old declaration updated in database with status terminated
  • New declaration request saved to DB in status SIGN
  • Create declaration request
  • Approve declaration request
  • Get declaration request
  • Sign declaration request

DR19Sign declaration in status SIGNED
  1. Patient - Adult, Old
  2. Confidant person - No
  3. Active declarations - Yes, Signed
  4. Phone number - Verified

Response 422

  • validation_failed - incorrect status
  • Create declaration request
  • Approve declaration request
  • Get declaration request
  • Sign declaration request

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