Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
reports:purchasing [2024/10/25 23:06] – [Don't Adjust AMC] Mark Gloverreports:purchasing [2025/06/06 05:06] (current) – [mSupply's better algorithm] Nick Pendergrast
Line 55: Line 55:
  
 == Report on purchase orders... == == Report on purchase orders... ==
-In the same way, you can also filter your reports on properties of the purchase orders involved: category, status and both purchase order custom fields.  For more information on purchase order categories see [[purchasing:show_po_categories | here]]+In the same way, you can also filter your reports on properties of the purchase orders involved: category, status and both purchase order custom fields.  For more information on purchase order categories see [[purchasing:show_po_categories | here]]
 + 
 +<WRAP info center round 90%> 
 +Please note there is also a //Purchases by suppliers// report that relates stock received to purchase orders made. This is one of the item ledger type reports and details can be foiund on the [[reports:items_and_stock#item_ledger|13.02. Stock and items reports]] page. 
 +</WRAP>
  
 =====  Purchases ===== =====  Purchases =====
Line 81: Line 85:
 Some logic behind the calculations involved in this report is described in detail on the [[purchasing:ordering_from_suppliers#logic_used_for_calculating_purchase_order_quantities|6.01. Ordering stock from suppliers]] page. Some logic behind the calculations involved in this report is described in detail on the [[purchasing:ordering_from_suppliers#logic_used_for_calculating_purchase_order_quantities|6.01. Ordering stock from suppliers]] page.
  
-As of version 7.15, mSupply supports a wide array of options for calculating AMC (Average Monthly Consumption), which is then used to forecast needs and then to calculate a requested order quantity.+As of version 7.15, mSupply supports a wide array of options for calculating forecast Average Monthly Consumption (AMC), which is then used to forecast needs and then to calculate a requested order quantity.
  
 The options are: The options are:
 === Don't Adjust AMC === === Don't Adjust AMC ===
 This has been the default in mSupply up until this point.  This has been the default in mSupply up until this point. 
-The consumption (or //distribution// if not a service delivery point- we're using //consumption// interchangeably here) is summed up for the number of months specified in the lookback field, and divided by the number of months. +The historic consumption is summed up for the number of months specified in the lookback field, and divided by the number of months. 
-This works well if the item was fully stocked for the whole time. It gives too low a number if stock was low or zero.+This works well if the item was fully stocked for the whole time. This method results in the forecast AMC being __too low__ if stock was low or zero in the past. 
 +<WRAP center round important 60%> 
 +**Consumption** vs **Distribution** vs **Issuance**:    Stock may be consumed within the facility for the care of patients, or distributed to other facilities, but for the purposes of the supply chain, whatever a store issues out of stock is 'consumption', and these terms all have the same meaning.  In mSupply, we use the term Consumption. 
 +</WRAP> 
  
 === Adjust by % of days out of stock === === Adjust by % of days out of stock ===
-This method takes each month's consumption, and adjusts it for the number of days in the month the item was out of stock. +This method takes each historic month's consumption, and adjusts it for the number of days in the month the item was out of stock. 
-We multiply the consumption for the month by (Days in month divided by Days in stock) to get adjusted AMC +We multiply the consumption for the month by (Days in month divided by Days in stock) to get an //Adjusted// AMC 
-Take this example:+Take this example for a single month where Item B had nil stock for a period of time:
   * Item B was in stock for 10 days in the month   * Item B was in stock for 10 days in the month
-  * Its consumption was 500+  * Its historic consumption was 500
   * The adjusted AMC is 500 x 31 / 10 = 1,550   * The adjusted AMC is 500 x 31 / 10 = 1,550
  
Line 100: Line 108:
 === Only consider fully stocked months === === Only consider fully stocked months ===
 Here, we are attempting to address months with low stock by excluding them from our calculations, rather than adjusting their consumption. Here, we are attempting to address months with low stock by excluding them from our calculations, rather than adjusting their consumption.
-There is a field shown **% of days in stock to be considered fully stocked** that defaults to "90%" +There is a field shown **% of days in stock to be considered fully stocked** that defaults to ''90%'' 
-Note that you need to set the lookback period long enough that mSupply will be able to find enough fully stocked months to run the calculation. You can also include more months by setting the **% of days in stock to be considered fully stocked** field to  (say) 50%.+<WRAP center round tip 60%> 
 +For this method to work, you need to set the lookback period long enough that mSupply will be able to find enough fully stocked months to run the calculation. You can also include more low stock months by setting the **% of days in stock to be considered fully stocked** field to say) ''50%'' Do this with caution, as there is a real danger that it will result in an underestimate of AMC. 
 +</WRAP> 
 === mSupply's better algorithm === === mSupply's better algorithm ===
 We've tried to come up with a better algorithm here by: We've tried to come up with a better algorithm here by:
   * ignoring months that are in stock for < 33% of days. That is, if the item was in stock for less than 10 days in the month, the consumption on those days is too erratic to draw conclusions about what the consumption for the whole month would have been.           * ignoring months that are in stock for < 33% of days. That is, if the item was in stock for less than 10 days in the month, the consumption on those days is too erratic to draw conclusions about what the consumption for the whole month would have been.        
-  * For months with stock >= 33% of days, Multiply the consumption for the month by Square Root(Days in month/Days in stock) to get adjusted AMC. This adjusts the consumption up due to being out of stock, but by a factor up to 1.7 - so not as big an adjustment as the "Adjust by % of days out of stock" method.+  * For months with stock >= 33% of days, Multiply the consumption for the month by (Days in month/Days in stock) to get adjusted AMC. This adjusts the consumption up due to being out of stock, but by a factor up to 1.7 - so not as big an adjustment as the "Adjust by % of days out of stock" method.
   * We also ignore months where the mean stock on hand is less than "% of typical AMC that stock level is considered compromised:" value you enter. This is a bit complicated, but here's an example:   * We also ignore months where the mean stock on hand is less than "% of typical AMC that stock level is considered compromised:" value you enter. This is a bit complicated, but here's an example:
     * Consider Item A - we have set the "when we calculate consumption there are 3 months that were "fully stocked" - those three months give us an AMC of 1500 per month.     * Consider Item A - we have set the "when we calculate consumption there are 3 months that were "fully stocked" - those three months give us an AMC of 1500 per month.
-    * Now, there's another month that was fully stocked (as in, on all 31 days in the month, there was _some_ stock on hand. +    * Now, there's another month that was fully stocked (as in, on all 31 days in the month, there was //some// stock on hand. 
-    * But it turns out that the average stock on hand was only 50 - clearly they could never have had "normal" consumption, although they did have stock - if the cutoff is set to 100%, we're saying "ignore this month unless the average stock on hand was 1500 - in this case it's 50, so this month isn't used in the AMC calculations+    * But it turns out that the average stock on hand was only 50 - clearly they could never have had "normal" consumption, although they did have stock - if the cut-off is set to 100%, we're saying "ignore this month unless the average stock on hand was 1500 - in this case it's 50, so this month isn't used in the AMC calculations
    
-We then sum the adjusted consumption for all the eligible months & divide by the number eligible months to get the best AMC eva ;-)+We then sum the adjusted consumption for all the eligible months & divide by the number eligible months to get the best forecast AMC eva ;-) 
 + 
 + 
 + 
 + 
 +Here's a diagram: 
 + 
 +<mermaid> 
 +graph TD 
 +    A(Was the Month fully stocked?)-->|Yes|B(Use consumption from these months to calculate typical AMC) 
 +    A-->|NO|C(Ignore these months) 
 +    B-->D(Was there months having <10 days with stock)-->|Yes|E(Ignore these months) 
 +    D-->|No|F(Increase consumption with adjusted AMC to account for days out of stock for these months) 
 +  classDef OR fill:Orange 
 +  class A,B,C,D,E,F OR 
 +</mermaid>   
 + 
 + 
 + 
  
 =============== ===============
Line 308: Line 338:
 \\ \\
 \\ \\
-|  //  Previous:  **[[reports:transactions]]** | | Next: **[[reports:requisitions]]** //  |+|  //  Previous:  **[[reports:transactions]]** | | Next: **[[reports:stocktakes]]** //  |
 ---- struct data ---- ---- struct data ----
 pagestatus.status    : All Good pagestatus.status    : All Good
 ---- ----
  
  • Last modified: 2024/10/25 23:06
  • by Mark Glover