Versions Compared

Key

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

...


...


INNM with 0  expected the value to be > 0 INNM with 0 innm with not active substanceSubstance in innm with not active substance
n/nDescriptionTest Case InputsExpected ResultStep by step ScriptActual Result
CIT1Create INNM Dosage
  1. Authorization = NHS Admin
  2. name - valid
  3. form = valid
  4. innm 
    1. id - active
    2. Numerator unit - true
    3. Numerator value > 0
    4. Denumerator unit - true
    5. Denumerator value > 0
    6. is active - true

Response 200

INNM  Dosages created. Saved to DB

  1. Login as NHS Admin
  2. Create innm Dosage copy
  •   
CIT2Create INNM  Dosage with 0 ingredients
  1. Authorization = NHS Admin
  2. name - valid
  3. form = valid
  4. Innm 
    1. id - active
    2. Numerator unit - true
    3. Numerator value = 0
    4. Denumerator unit - true
    5. Denumerator value = 0
    6. is active - true

Response 422

message: expected the value to be > 0

  1. Login as NHS Admin
  2. Create INNM  Dosage with 0 ingredients
  •   
CIT3Create innm Dosage with not active Innm
  1. Authorization = NHS Admin
  2. name - valid
  3. form = valid
  4. Innm 
    1. id - NOT active
    2. Numerator unit - true
    3. Numerator value > 0
    4. Denumerator unit - true
    5. Denumerator value > 0
    6. is active - true

Response 200

INNMS created. Saved to DB

    1. is active - true

Response 422

message: "Innm in ingredients must be active!"

  • Login as NHS Admin
  • Create
innm copy
  • innm Dosage with not active Innm
  •   
CIT4Create innm Dosage with 2 is_active_subst ingredients
  • Authorization = NHS Admin
  • name - valid
  • form = valid
Substance 
  • Innm 
    1. id - active
    2. Numerator unit - true
    3. Numerator value > 0
    4. Denumerator unit - true
    5. Denumerator value > 0
    6. is active - true
  • Innm 
    1. id - active
    2. Numerator unit - true
    3. Numerator value
=
    1. > 0
    2. Denumerator unit - true
    3. Denumerator value
=
    1. > 0
    2. is active - true

Response 422

message:

"One of ingredients must be is active Innm!"

  1. Login as NHS Admin
  2. Create
  1. innm Dosage with 2 is_active_subst ingredients
  •   
CIT5Create innm Dosage 1 ingredient and is_promary=false
  • Authorization = NHS Admin
  • name - valid
  • form = valid
Substance 
  • Innm 
    1. id -
NOT
    1. active
    2. Numerator unit - true
    3. Numerator value > 0
    4. Denumerator unit - true
    5. Denumerator value > 0
    6. is active -
true
    1. false

Response 422

message: "

One of ingredients must be is active Innm!"

  • Login as NHS Admin
  • Create
  • innm Dosage 1 ingredient and is_primary=false
  •   
CIT6Create innm innm Dosage with 2 ingredients is_active_subst ingredients=true & is_active=false
  • Authorization = NHS Admin
  • name - valid
  • form = valid
  • Substance Innm 
    1. id - active
    2. Numerator unit - true
    3. Numerator value > 0
    4. Denumerator unit - true
    5. Denumerator value > 0
    6. is active - true
    Substance 
  • Innm 
    1. id - active
    2. Numerator unit - true
    3. Numerator value > 0
    4. Denumerator unit - true
    5. Denumerator value > 0
    6. is active - truefalse

Response 422message: "One of ingredients must be is active substance!"201

INNM Dosage created. Saved to DB


  • Login as NHS Admin
  • Create
innm
  • innm Dosage with 2
is_active_subst
  • ingredients
  •   
Create innm 1 ingredient and is_active_substance=false
CIT7Create innm Dosage with 2 ingredients with the same idCreate innm with 2 ingredients is_active=true &
  • Authorization = NHS Admin
  • name - valid
  • form = valid
  • Substance Innm 
    1. id - active
    2. Numerator unit - true
    3. Numerator value > 0
    4. Denumerator unit - true
    5. Denumerator value > 0is active - false

Response 422

message: "One of ingredients must be is active substance!"

  • Login as NHS Admin
  • Create innm 1 ingredient and is_active_substance=false
  •   
    1. is
_
    1. active
=false
  • Authorization = NHS Admin
  • name - valid
  • form = valid
  • Substance 
    1. - true
  • Innm 
    1. id - active, the same
    2. Numerator unit - true
    3. Numerator value > 0
    4. Denumerator unit - true
    5. Denumerator value > 0
    6. is active - true
    Substance 
    1. false
Response 422
  • Login as NHS Admin
  • Create innm Dosage with 2 ingredients with the same id
  •   
CIT8Create innm Dosage not by NHS Admin
  • Authorization = NHS Admin
  • name - valid
  • form = valid
  • Innm 
    1. id - active
    2. Numerator unit - true
    3. Numerator value > 0
    4. Denumerator unit - true
    5. Denumerator value > 0
    6. is active - false

Response 201

INNM created. Saved to DB
    1. true

Response 403

Message: Your scope does not allow to access this resource. Missing allowances: innm_dosage:write

  • Login as NHS Admin
  •   
CIT9Deactivate INNM Dosage
  • Authorization = NHS Admin
  • INNM_Dosage_id - Active
Response 201
  • Login as NHS Admin
  • Create innm with 2 ingredientsDeactivate INNM Dosage
  •   
Create innm with 2 ingredients with the same idCIT10Deactivate not active INNM Dosage
  • Authorization = NHS Admin
  • name - valid
  • form = valid
  • Substance 
    1. id - active
    2. Numerator unit - true
    3. Numerator value > 0
    4. Denumerator unit - true
    5. Denumerator value > 0
    6. is active - true
  • Substance 
    1. id - active, the same
    2. Numerator unit - true
    3. Numerator value > 0
    4. Denumerator unit - true
    5. Denumerator value > 0
    6. is active - false
Response 422
  • INNM_id - NOT Active
Response 404
  • Login as NHS Admin
  • Deactivate not active INNM Dosage
  •   
CIT11Deactivate INNM Dosage with active medication
  • Authorization = NHS Admin
  • Create INNM Dosage
  • Create Medication
  • Deactivate INNM Dosage
Response 404
  • Login as NHS Admin
  • Create innm Dosage to deactivate
  • Create innm with 2 ingredients with the same idmedication to deactivate innm Dosage
  • Deactivate INNM Dosage with active medication
  •