Configure Adjusted Consumption (N)

Description

As an implementer, I want the option to display (and associate) the "Adjusted Consumption" (N) on the requisition form (via a requisition template for my program/facility) so that users can see the adjusted consumption for the current reporting period. Adjusted consumption takes stockout days. N is used in calculating Average Consumption (P) see OLMIS-924.

NOTE: this calculation is different from 2.0. We are removing the inclusion of F (Number of New Patients)

This is an API ticket task with a sub-task to verify this field works on the UI.

In OpenLMIS as a part of requisition, users at a facility will create Requisition’s for programs .

  • If a facility faces stock out days and it reports it, system will normalize the consumption considering stock out days.

  • If we have any new patients reported for a program, anticipated consumption for the new patients will also be added in Normalized consumption
    Above two -factor will help in calculating Order Qty which will try to avoid stock-outs -and take care of new patients for future.

Definition: Total Quantity Consumed in a period after adjusting for stockout days. This is quantified in dispensing units.

Looking forward: implementors may want to change or use a variant calculation of Monthly Normalized Consumption. We are not planning to implement the additional options (below), rather we are demonstrating how implementors can develop additional options through extension. See OLMIS-1147 for the demonstrated extension example. Removed because the formula should account for the two variations described below.

Calculation
The calculation has two parts: N = (adjusted consumption +quantity for new patients)

Adjusted Consumption is one of two options:

  1. Adjusted Consumption = RoundUp(C * (total days in the period / non-stockout days))

  2. Adjusted Consumption = C, if non-stockout days is zero (cannot divide by zero)

Where:

  • C = consumed quantity in the period

  • X = stockout days in the period

  • Total days in the period = 30 * number of months in the previous period (M)

  • Non-stockout days = Total days in the period - X

*Full equation: adjusted consumption = RoundUp(C * (M * 30) / ((M * 30) - X))*

Quantity for new patients (anticipated new patients) is one of two options:

  1. Quantity for new patients = F, if F is set as "Dispensing units for new patients" (because the user will enter a quantity directly)

  2. Quantity for new patients = F * dispensing units per patient (for the period), if F is set as "New patient count"

Where

  • G = Doses per dispensing unit (should never be zero)

  • Dispensing units per patient = Dispensing units per month * number of months in the period (M)

  • Dispensing units per month = RoundUp(Doses per month / Minimum doses per dispensing unit)

    • Note: since both doses per month and doses per dispensing unit come from the ProgramProduct, the ProgramProduct should be able to give the dispensing units per month; this part of the calculation should be retrieved from the ProgramProduct

  • Minimum doses per dispensing unit = Max(G,1)

Fuller equation: quantity for new patients = F * (RoundUp(Doses per month / Max(G,1)) * M)

-Full equation: N = Roundup((C * (M * 30) / ((M * 30) - X))) + (F * (RoundUp(Doses per month / Max(G,1)) * M))-

Assumptions

  • System will capture either patient count or dispensing units for anticipated new patients for a program, based on the configuration setting on the requisition template. System will calculate adjusted consumption per above, in accordance with this user entry was quantified.

  • Number of character limit and data type validation is same for both the settings of field "F".

  • If "F" is not included in the template configurations, it is stored as 0.

Rounding for M
RoundUp : Always rounds up to the nearest integer : ceiling
Round : Normal rounding to the nearest integer {Floor for <.5 and ceiling for => .5 }

Definitions
Doses: what a patient ingests or receives each time they take or use the med (this might be one pill, one injection, one inhaling (asthma relief), etc), or each time a clinician uses an item (such as a latex glove)
Dispensing Units : how many doses are in the smallest unit that can be given to the patient, or used by a clinician. Patients typically receive individual aspirin (so the dispensing units = 1), or might be a strip or blister card of antibiotic capsules (e.g., dispensing units = 10), or a disc of contraceptives (dispensing units = 31)
(No of doses per month /max( G,1) = Dispensing units per month
(No of doses per month /max( G,1)

Acceptance Criteria
Verify that:

  • in the APIs for configuring a requisition template, this new field can be added into the requisition template (by an admin with permissions to configure the template for their program)

  • if this field is NOT configured/associated to a requisition template, it does not appear on the requisition form

  • the field can be configured with a display order that controls where it appears on the requisition

  • in the APIs for initiating and saving a requisition, if this field is part of the template, then this field appears on the requisitions. Its display order should be based on the requisition template.

  • The field is a calculated field, read only.

  • value in the requsitions is calculated based on the calculation above (upholding the assumptions around F)

  • For this field to be added to the template, variables C and X are also required.

    • Data validation for C and X to be done during the admin template configuration.

  • Variable F is not required to be configured

  • If F isn't used in the template, zero is is used (meaning the second half of the formula is 0).

  • Display order is enforced on the requisition

  • Display order is set on the requisition template

  • UI: For any requisition with this field, the requisition form displays it in the proper display order.

We believe the following two variations can be addressed with the Normalized Consumption default formula

  • JSI built an option to use "Dispensed Quantity + No of New Patients"

    • Notes from on this option: "Yes. interesting is what happened here. This functionality would have been better developed by adding another column, something in the lines of ... "quantity required for new patients". basically, since that column did not exist, users renamed the new patients required label in swahilli to something in those lines ... and entered data. I would implement that separate column - and the formula would be a choice between either considering the new patient data (multiplying the new patient by doses per patient) or taking what the facility asked would be required without any assumption. My Opinion: In some cases, It makes sense to leave the calculation of quantity required for new patients to the person that is doing it. Take an example commodities that are supplied in different quantities for adults and children. If the calculation has to assume adults take twice doses as children or other complex factors have to be accounted for. I think leaving the option for the users to say how much is required is more expressive than how many new patients. And ohh, I also think ... "how much new quantity" is more about supply chain data than "how many new patients" is."

  • JSI built out an option of "(Dispensed x 90) / (90 - Stockout Days)"

    • Notes from on this option: "Yes, Stocked out days is X. Dispensed is C. This formula is only supposed to be applicable if the programs is a quarterly reporting program. For a monthly reporting program, this formula makes no sense. Basically, this formula is trying to calculate normalized consumption by considering stocked out days only. (without taking into account new patients counts). The manual system uses this simplified formula."

100% Done
Loading...

QAlity Plus - Test Management

Checklists

Activity

Paulina BorowaJanuary 16, 2017 at 2:50 PM

All works
More details in test case: https://openlmis.atlassian.net/wiki/x/aACUBg

Weronika CiecierskaJanuary 12, 2017 at 2:40 PM

I fixed it, it's in review.

Paweł AlbeckiJanuary 12, 2017 at 1:00 PM

There are some problems with calculations on UI, please fix it.

Paweł AlbeckiDecember 23, 2016 at 11:46 PM

Yes, completely. Thank you.

Mary Jo KochendorferDecember 23, 2016 at 10:14 PM

I'm glad you asked because it is a bit confusing. M would be the period related to the requisition being filled out by the end user at that moment. Usually in April they are filling out the requisition for March (or previous period). I removed the word previous as to make it a bit clearer. Does that clarify?

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Time tracking

1w 2d 4h logged

Components

Sprint

Fix versions

Priority

Time Assistant

Created August 2, 2016 at 8:21 PM
Updated August 27, 2018 at 10:58 PM
Resolved January 16, 2017 at 2:50 PM