Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
reports:purchasing [2024/10/25 23:06] – [Don't Adjust AMC] Mark Glover | reports: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. | + | 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. |
+ | |||
+ | <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: | ||
+ | </ | ||
===== Purchases ===== | ===== Purchases ===== | ||
Line 81: | Line 85: | ||
Some logic behind the calculations involved in this report is described in detail on the [[purchasing: | Some logic behind the calculations involved in this report is described in detail on the [[purchasing: | ||
- | As of version 7.15, mSupply supports a wide array of options for calculating | + | As of version 7.15, mSupply supports a wide array of options for calculating |
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 | + | The historic |
- | This works well if the item was fully stocked for the whole time. It gives too low a number | + | 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**: | ||
+ | </ | ||
=== Adjust by % of days out of stock === | === Adjust by % of days out of stock === | ||
- | This method takes each month' | + | This method takes each historic |
- | We multiply the consumption for the month by (Days in month divided by Days in stock) to get adjusted | + | We multiply the consumption for the month by (Days in month divided by Days in stock) to get an // |
- | Take this example: | + | Take this example |
* 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 |
* 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, | Here, we are attempting to address months with low stock by excluding them from our calculations, | ||
- | 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 '' |
- | 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) '' | ||
+ | </ | ||
=== mSupply' | === mSupply' | ||
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 " | + | * 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 " |
* We also ignore months where the mean stock on hand is less than "% of typical AMC that stock level is considered compromised:" | * We also ignore months where the mean stock on hand is less than "% of typical AMC that stock level is considered compromised:" | ||
* Consider Item A - we have set the "when we calculate consumption there are 3 months that were "fully stocked" | * Consider Item A - we have set the "when we calculate consumption there are 3 months that were "fully stocked" | ||
- | * Now, there' | + | * Now, there' |
- | * But it turns out that the average stock on hand was only 50 - clearly they could never have had " | + | * But it turns out that the average stock on hand was only 50 - clearly they could never have had " |
- | 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 |
+ | |||
+ | |||
+ | |||
+ | |||
+ | Here's a diagram: | ||
+ | |||
+ | < | ||
+ | graph TD | ||
+ | A(Was the Month fully stocked? | ||
+ | A--> | ||
+ | B--> | ||
+ | D--> | ||
+ | classDef OR fill: | ||
+ | class A,B,C,D,E,F OR | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
=============== | =============== | ||
Line 308: | Line 338: | ||
\\ | \\ | ||
\\ | \\ | ||
- | | // Previous: | + | | // Previous: |
---- struct data ---- | ---- struct data ---- | ||
pagestatus.status | pagestatus.status | ||
---- | ---- | ||