Versions Compared

Key

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


n/nDescriptionTest Case InputsExpected ResultStep by Step ScriptActual Result
CM1Create Medication
  1. Authorization = NHS Admin
  2. name - valid
  3. code_atc - valid 
  4. form - valid
  5. Ingredients 
    1. id - active
    2. Numerator unit - true
    3. Numerator value > 0
    4. Denumerator unit - true
    5. Denumerator value > 0
    6. is_active_substance - true
  6. Container
    a. numerator_unit - valid
    b. numerator_value > 0
    c. denumerator_unit" - valid
    d. denumerator_value > 0
  7. Manufacturera. name - validb. country - valid 
  8. package_qty - valid (multiplicity)
  9. package_min_qty > 0
  10. certificate - valid 
  11. certificate_expired_at - valid

Response 200

Medication created. Saved to DB

  1. Login as NHS Admin
  2. Create medication
  •   
CM2Create Medication wrong multiplicity

8. package_qty - valid (multiplicity)

9. package_min_qty > 0

Response 409 

  • Only a multiplicity package quantity for the minimum package quantity medication
  1. Login as NHS Admin
  2. Create medication
  •   
CM3Create Medication wrong "form"

4. form - invalid

Response 422
  1. Login as NHS Admin
  2. Create medication
  •   
CM4Create Medication with 2 ingredients and both is_active_substance=true

5. {id - active,

    is_active_substance - true}

Response 422

  • One and only one ingredient must be active
  1. Login as NHS Admin
  2. Create medication
  •   
CM5Create Medication with 1 ingredient and  is_active_substance=false

5. id - active

    is_active_substance - false

Response 422

  • One and only one ingredient must be active
  1. Login as NHS Admin
  2. Create medication
  •   
CM6Create Medication with 2 same ingredients (id1=id2)

5. id - active

    id - active 

Response 422

  • Ingredient id duplicated
  1. Login as NHS Admin
  2. Create medication
  •   
CM7Create Medication using medication id 5. id - active and id={type=MEDICATION}.idResponse 422
  1. Login as NHS Admin
  2. Create medication
  •   
CM8Create Medication using substance id 5. id - active and id=substances.idResponse 422
  1. Login as NHS Admin
  2. Create medication
  •   
CM9Create Medication with wrong denum dosage 
$.ingredients[].dosage.denumerator_unit != 
$.container.numerator_unit
Response 422
  1. Login as NHS Admin
  2. Create medication
  •   
CM10Create Medication NOT by NHS admin
  1. Authorization != NHS Admin
Response 402 
  1. Login not as NHS Admin
  •   
CM11Create Medication with inactive INNMIngredients 
  1. id - inactive
Response 422
  1. Login as NHS Admin
  2. Create medication

CM12Deactivate Medicationmedication_id - activeResponse 200
  1. Login as NHS Admin
  2. Deactivate Medication
  •  
CM13Deactivate not active Medicationmedication_id - inactiveResponse 200
  1. Login as NHS Admin
  2. Deactivate Medication
  •