Versions Compared

Key

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


n/n Test CaseTest Case DescriptionTest Case InputsExpected ResultStep by Step ScriptActual Result
EPR1Pharmacy_owner registers new employee with employee_type 'Pharmacist' and with valid accreditation category 
  • status - "NEW",
  • employee_type - "PHARMACIST"
  • party
    • name - valid
    • birth_date - valid (18+)
    • documents - valid
    • tax_id - valid 
    • phones - valid
  • educations - valid 
  • speciality_type - PHARMASICT 
  • ACCREDITATION_CATEGORY - is not null 

Response 200

  • Employee saved in DB with status APPROVED
  1. Get Pharmacy_owner authorize token
  2. Authorize scopes owner
  3. Exchange grant token Pharmacy_owner
  4. Create employee request
  5. Pass register steps via link in email


  •   
EPR2Pharmacy_owner registers new employee with employee_type 'Pharmacist' and with empty accreditation category 
  • status - "NEW",
  • employee_type - "PHARMACIST"
  • party
    • name - valid
    • birth_date - valid (18+)
    • documents - valid
    • tax_id - valid 
    • phones - valid
  • educations - valid 
  • speciality_type - PHARMASICT 
  • ACCREDITATION_CATEGORY - null 

Response

????

  1. Get Pharmacy_owner authorize token
  2. Authorize scopes Pharmacy_owner
  3. Exchange grant token owner
  4. Create employee request
  5. ????

  •   This point has to be clarified



EPR3Pharmacy_owner registers new adult employee with employee_type 'HR
  • status - "NEW",
  • employee_type - "HR"
  • party
    • name - valid
    • birth_date - valid (18+)
    • documents - valid
    • tax_id - valid 
    • phones - valid

Response 200

  • Employee saved in DB with status APPROVED
  1. Get Pharmacy_owner authorize token
  2. Authorize scopes Pharmacy_owner
  3. Exchange grant token owner
  4. Create employee request
  5. Pass register steps via link in email


  •   
EPR4Pharmacy_owner registers new not adult employee with employee_type 'HR' and not valid birth date
  • status - "NEW",
  • employee_type - "HR"
  • party
    • name - valid
    • birth_date - not valid
    (<18)
    • documents - valid
    • tax_id - valid 
    • phones - valid
Response 422
  1. Get Pharmacy_owner authorize token
  2. Authorize scopes Pharmacy_owner
  3. Exchange grant token owner
  4. Create employee request
  •   
EPR5Pharmacy_owner registers himself as new employee with employee_type 'HR'
  • status - "NEW",
  • employee_type - "HR"
  • party
    • name - valid
    • birth_date - valid (18+)
    • documents - valid
    • tax_id - valid 
    • phones - valid
  • education is null

Response 200

  • Employee saved in DB with status APPROVED
  1. Get Pharmacy_owner authorize token
  2. Authorize scopes Pharmacy_owner
  3. Exchange grant token owner
  4. Create employee request
  5. Pass register steps via link in email
  •   
EPR6HR registers new employee with employee_type PHARMACIST with 
  • speciality_type - PHARMACIST2
  • status - "NEW",
  • employee_type - "PHARMACIST"
  • party
    • name - valid
    • birth_date - valid (18+)
    • documents - valid
    • tax_id - valid 
    • phones - valid
  • educations - valid 
  • speciality_type - PHARMACIST2
  • Position - P15

Response 200

  • Employee saved in DB with status APPROVED
  1. Get HR authorize token
  2. Authorize scopes hr
  3. Exchange grant token HR
  4. Create employee request
  5. Pass register steps via link in email
  •   
EPR7HR registers new employee with employee_type PHARMACY_OWNER
  • status - "NEW",
  • employee_type - "PHARMACY_OWNER"
  • name - valid
  • birth_date - valid 
  • documents - valid
  • tax_id - valid 
  • phones - valid
  • educations - valid 

Response 422??

validation_failed

409

  • Forbidden to create PHARMACY_OWNER
  1. Get HR authorize token
  2. Authorize scopes hr
  3. Exchange grant token HR
  4. Create employee request
  •   
EPR8PHARMACY_OWNER registers new employee with employee_type PHARMACY_OWNER
  • status - "NEW",
  • employee_type - "PHARMACY_OWNER"
  • party
    • name - valid
    • birth_date - valid 
    • documents - valid
    • tax_id - valid 
    • phones - valid
  • educations - valid 

Response 422??

validation_failed

409

  • Forbidden to create PHARMACY_OWNER
  1. Get Pharmacy_owner authorize token
  2. Authorize scopes Pharmacy_owner
  3. Exchange grant token owner
  4. Create employee request
  •   
EPR9PHARMACY_OWNER registers new employee with employee_type PHARMACIST and without personal details
  • status - "NEW",
  • employee_type - "PHARMACIST"
  • party - null
  • speciality_type - PHARMASICT 

Response Response 422

  • validation_failed
  1. Get Pharmacy_owner authorize token
  2. Authorize scopes Pharmacy_owner
  3. Exchange grant token owner
  4. Create employee request
  •   
EPR10PHARMACY_OWNER registers new employee with employee_type PHARMACIST and without education
  • status - "NEW",
  • employee_type - "PHARMACIST"
  • party
    • name - valid
    • birth_date - valid (18+)
    • documents - valid
    • tax_id - valid 
    • phones - valid
  • educations is null

Response 200

  • Employee saved in DB with status APPROVED
  1. Get Pharmacy_owner authorize toke
  2. Authorize scopes Pharmacy_owner
  3. Exchange grant token owner
  4. Create employee request
  •   now education is mandatory for pharmacist, but this point has to be clarified.
EPR11HR registers new employee with employee_type PHARMACIST with 
  • speciality_type - FAMILY_DOCTOR
  • status - "NEW",
  • employee_type - "PHARMACIST"
  • name - valid
  • birth_date - valid (18+)
  • documents - valid
  • tax_id - valid 
  • phones - valid
  • educations - valid 
  • speciality_type - FAMILY_DOCTOR 

Response 422

  • validation_failed
  1. Get HR authorize token
  2. Authorize scopes HR
  3. Exchange grant token owner
  4. Create employee request
  •   
EPR12PHARMACIST registers new employee with employee_type PHARMACIST
  • status - "NEW",
  • employee_type - "PHARMACIST"
  • party
    • name - valid
    • birth_date - valid (18+)
    • documents - valid
    • tax_id - valid 
    • phones - valid
  • educations - valid 
  • speciality_type - PHARMASICT 

Response 403

Your scope does not allow to access this resource

  1. Get PHARMACIST authorize token
  2. Authorize scopes PHARMACIST
  3. Exchange grant token owner
  4. Create employee request
  •   
EPR13Register old employee PHARMACIST by PHARMACY_OWNER with same personal info as PHARMACIST
  • employee_type - "PHARMACIST"
  • party - old:
    • name - valid (as before)
    • birth_date - valid (18+) (as before)
    • documents - valid (as before)
    • tax_id - valid (as before)
    • phones - valid (as before)
  • educations - valid (as before)
  • speciality_type - PHARMASICT
Response 200
  • pharmacist updated in DB
  • Get PHARMACY_OWNER authorize token
  • Authorize scopes PHARMACY_OWNER
  • Exchange grant token owner
  • Create employee request
  • Create employee request
  •   
EPR14HR updates info in personal details part for old PHARMACIST employee 
  • employee_type - "PHARMACIST"
  • party -
    • name - new
    • birth_date - valid (18+) (as before)
    • documents - valid (as before)
    • tax_id - valid (as before)
    • phones - valid (as before)

Response 201

  • employee updated in DB
  • employee_ID is not changed in DB
  • Get HR authorize token
  • Authorize scopes HR
  • Exchange grant token owner
  • Create employee request
  • Update employee request
  •   
 EPR15PHARMACIST updates info in personal details part for old PHARMACIST employee 

employee_type - "PHARMACIST"

party -

name - new

birth_date - valid (18+) (as before)

documents - valid (as before)

tax_id - valid (as before)

phones - valid (as before)

Response 403

Get HR authorize token

Authorize scopes HR

Exchange grant token owner

Create employee request

Update employee request

  •   
EPR16Pharmacy_owner updates info in personal details part for old Pharmacy_owner employee 

employee_type - "Pharmacy_owner"

party -

name - new

birth_date - valid (18+) (as before)

documents - valid (as before)

tax_id - valid (as before)

phones - new

Response 201

PHARMACY_OWNER updated in DB

employee_ID is not changed in DB

Get owner authorize token

Authorize scopes owner

Exchange grant token owner

Create employee request

Update employee request

  •   
EPR17HR deactivates PHARMACISTstatus - DISMISSED

  •   
EPR18PHARMACY_OWNER registers new employee with employee_type PHARMACIST not in his cliniclegal_entity_id  - different

  •   
ERP19PHARMACY_OWNER deactivates old employee with employee_type PHARMACIST not in his clinic

legal_entity_id  - different

status - DISMISSED



  •   
ERP20HR deactivates division
Response 200
  •