Versions Compared

Key

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

Test Case #: 924


Test Case Name: Configure Average Consumption

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:25.01.2017

Short description

  • an implementer (who is an authorized API user) can configure this field to appear in the Requisition template for their program
  • an implementer (who is an authorized API user) can configure it with a field label string
  • P is available to be associated with a requisition template by program
  • can be assigned a display order in the requisition form
  • average consumption is based on a period moving-average window of adjusted consumption (N) from most recent period(s)
    • (N t0 + N t-1 + N t-2 + N t-(n-1)) / ( n )
  • user defines "n" (to indicate how many periods will be averaged)
  • "n" cannot be 1 or 0, must be greater than or equal to 2
  • "n" must have a value if (P) is selected to be displayed/included in the template
  • n = number of periods
  • t = indicates relative period (t0 = current reporting period)

For data entry, if not enough periods exist, compute based on the following:

  • if no previous periods, and there is only t0 ; use P = N (instead of the formula above)
  • if one previous period, so t0 and t-1 ; use P = Roundup( (N t0 + N t-1) / 2)
  • if more than one previous period, just compute the average of what periods are available (even if less than the defined "n")

                                                                                                                                                   


Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

  Add column "Average Consumption" to the Requisition Template                                                                             Column is added to the requisition Template.                                                                                                                

2

Initiate requisition and verify if the column is available.

After initiation, Average Consumption column is visible .

 

3

 Remove the column "Average Consumption" from Requisition Template (unselect the checkbox).

 

 

4

 initiate a new requisition and check if column is not displayed.

 

 

5

Change the display order for "Average Consumption" and:

  • check if for old requisition, the order display is still the same
  • check for new, initiated requisition if the order display is changed

 

 

6


Set the n=1 in requisitionTemplate for Family Planning.

 

 

It's not possible to save the Requisition Template when number of periods to average is set to 1.

 

7

Set the n=0 or leave it empty in requisitionTemplate for Family Planning.


It's not possible to save the Requisition Template when number of periods to average is set to 0 or leave it empty.

OR

 

8

Set the n =2  and save the changes in Family Planning.                       

 

 

9Initiate a new requisition and calculate the Average Consumption.


The Average Consumption is calculated properly (45+11)/2 = 28

The AverageConsumption is the average of the Adjusted Consumption from last periods. The Adjustment Consumption is the multiplying of Total Consumed Quantity and Total Stockout Days from current period.


The Adjusted Consumption from last period(July) is set to 45.


10Set the n=5.


11

Initiate a new requisition and calculate the Average Consumption (the previous periods should contain all needed values)

The Average Consumption has been calculated properly. Average Consumption is set to 15.4 (11+5+4+33+24)/5 = 15.4

When n=5 and Adjusted COnsumption for product with productCode C600 is set to:

  • N= 11 for August

  • N=5 for September

  • N=4 for October

  • N=33 for November

  • N=24 for December (current period)

12Initiate a new requisition, calculate the Adjusted Consumption, submit requisition and skip the requisition.

13Initiate another new requisition and check

14


 

 

Post – conditions: