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

Employee Request tests

n/n Test CasesTest Cases DescriptionTest Cases InputsExpected ResultsStep by Step ScriptsActual Result
ER1Register new Doctor employee by Doctor
  • party - New
  • employee_type - Doctor
  • specialities - PEDIATRICIAN

Response 401

  • access_denied - Invalid access token
  1. Get doc authorize token
  2. Authorize scopes 4 doc
  3. Exchange grant token 4 doc
  4. Create employee request

ER2Register new Doctor employee by Owner
  • party - New
  • employee_type - Doctor
  • specialities - PEDIATRICIAN
  • email - your email

Response 200

  • sent link to email "Запрошення до співпраці з eHealth"
  • Employee saved in DB with status APPROVED



  1. Get owner authorize token
  2. Authorize scopes owner
  3. Exchange grant token owner
  4. Create employee request
  5. Pass register steps via link in email

ER3Register old employee by Owner
  • party - Old
  • employee_type - New
  • specialities - no
  • email - your email

Response 200

?

  1. Get owner authorize token
  2. Authorize scopes owner
  3. Exchange grant token owner
  4. Create employee request
  5. Pass register steps via link in email

ER4Create employee request W/O authorization
  • party - New
  • employee_type - Doctor
  • specialities - PEDIATRICIAN
  • Authorization Header - No

Response 401

  • access_denied
  1. Create employee request - W/O authorization

ER5Create employee request for different legal entity 
  • legal_entity_id - New
  • division_id - Old

Response 200

  • Employee created for authorized legal entity 
  1. Get owner authorize token
  2. Authorize scopes owner
  3. Exchange grant token owner
  4. Create employee request by another legal_entity

ER6Create Employee request without the block "Doctor"
  • party - New
  • employee_type - Doctor
  • Doctor - No

Response 422

  • validation_failed
  1. Get owner authorize token
  2. Authorize scopes owner
  3. Exchange grant token owner
  4. Create employee request

ER7Create employee request with incorrect tax number
  • party - New
  • employee_type - Doctor
  • tax_id - 00000000

Response 422

  • validation_failed
  1. Get owner authorize token
  2. Authorize scopes owner
  3. Exchange grant token owner
  4. Create employee request

ER8Create employee request with incorrect employee_type
  • employee_id - Doctor's id
  • employee_type - OWNER
  • Doctor - No

Response 409

  • employee_type doens't match
  1. Get owner authorize token
  2. Authorize scopes owner
  3. Exchange grant token owner
  4. Create employee request

ER9Update DOCTOR via employee request
  • employee_id - Doctor's id
  • employee_type - Doctor
  • tax_id - Doctor's tax_id
  • email - Doctor's email

Response 200

  • updated employee in DB
  1. Get owner authorize token
  2. Authorize scopes owner
  3. Exchange grant token owner
  4. Get Employees doctor
  5. Create employee request

ER10Update dismissed DOCTOR via employee request
  • employee_id - wrong
  • employee_type - Doctor
  • tax_id - Doctor's tax_id
  • email - Doctor's email

Response 409

  • employee is dismissed
  1. Get owner authorize token
  2. Authorize scopes owner
  3. Exchange grant token owner
  4. Get Employees doctor
  5. Create employee request

ER11Create Hr with doctor information
  • party - New
  • employee_type - HR
  • Doctor - Yes

Response 422

  • field doctor is not allowed
  1. Get owner authorize token
  2. Authorize scopes owner
  3. Exchange grant token owner
  4. Create employee request

ER12Create employee with future birth_date
  • party - New
  • employee_type - HR
  • Doctor - No
  • birth_date - future date

Response 422

  • invalid birth_date value
  1. Get owner authorize token
  2. Authorize scopes owner
  3. Exchange grant token owner
  4. Create employee request

ER13Register new Admin employee by Owner
  • party - New
  • employee_type - ADMIN
  • Doctor - No

Response 200

  • sent link to email "Запрошення до співпраці з eHealth"
  • Employee saved in DB with status APPROVED
  1. Get owner authorize token
  2. Authorize scopes owner
  3. Exchange grant token owner
  4. Create employee request

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