Configure Packs to Ship
Description
Checklists
QAlity Plus - Test Management
Activity
Paulina Borowa November 23, 2016 at 2:33 PM
All works.
More details in test case:
https://openlmis.atlassian.net/wiki/x/fQDSBQ
Nick Reid November 22, 2016 at 7:50 PM
et al — sorry for letting this ticket sit in review for so long
Mary Jo Kochendorfer November 4, 2016 at 10:38 PM
, I don't believe that is accurate. I would say that if the Ordered Quantity is 0, packs to ship should be 0. See the following explanation. If you are saying 2.0 did not follow that logic, please do update it.
The can round to zero attribute determines whether OpenLMIS will round the number of packs to ship down to zero when the reorder quantity is less than one full pack and is less than or equal to the rounding threshold for this product. For our antibiotic example, if the reorder quantity was 6 strips (equal to the rounding threshold), then OpenLMIS would round the order quantity down to zero packs if can round to zeroes true. Conversely, it would round the order quantity up to one if can round to zeroes false. In other words, when can round to zeroes set to false, OpenLMIS will always ship at least one full pack when the reorder quantity is one or more dispensing units. If the reorder quantity is zero dispensing units, then OpenLMIS will ship zero packs, regardless of the value of can round to zero.
Paweł Muchowski November 4, 2016 at 4:43 PM
in v2 when ordered quantity is 0 and round to zero is false packs to ship will be 1.
Should this work the same way in v3?
Mary Jo Kochendorfer October 27, 2016 at 4:52 AM
and/or could you review this ticket and sub-tasks to make sure I have the calculations correct?
Details
Details
Assignee
Reporter
Story Points
Original estimate
Time tracking
Components
Sprint
Fix versions
Priority
Time Assistant
Open Time Assistant
Time Assistant

As an implementer, I want to display the "Packs to Ship" (V) field on the requisition form so that the user can knows how many packs would be order based on the "requested quantity" (displayed as dispensing units) entered.
Acceptance Criteria
Verify that:
sub-tasks are completed
Calculation is completed in the UI
Appropriate APIs exist
Review the rounding rules
Rounding rules: The pack rounding threshold attribute affects how OpenLMIS calculates the number of packs to ship to restock a facility. Note that product inventory and usage are generally reported in ""dispensing units,"" as part of the requisitioning process, where a dispensing unit is the basic unit that a patient is provided when the clinician or pharmacist gives them the product. However the warehouse will ship ""packs"" of a product, and a pack can contain one or more dispensing units. For example, a dispensing unit for an antibiotic might be a strip of 10 capsules, and the corresponding pack could be a box of 24 strips. OpenLMIS performs the initial calculations for the quantity of each product to ship an SDP in terms of dispensing units, rather than doses or packs. OpenLMIS's last step #in these calculations is to round up or round down the number of packs to ship to the SDP. The value of this Rounding Threshold attribute determines when OpenLMIS rounds up or rounds down the number of packs to ship.
Returning to our example of strips of antibiotic capsules, if the rounding threshold is set to 6 for this product, then OpenLMIS will round up the number of packs to ship whenever the calculated order quantity of dispensing units that are beyond full packs is greater than this threshold value. For example, if the reorder quantity for the antibiotic is 52 strips, this would equate to 2 full packs plus 4 additional strips (2 x 24 + 4 = 52). Because the rounding threshold for this product is 6, OpenLMIS will round down the order to 2 packs. Conversely, if the reorder quantity for the antibiotic is 55 strips, this would equate to 2 full packs plus 7 additional strips (2x24 + 7 = 55). Because the rounding threshold for this product is 6, and the 7 additional strips exceeds this threshold, OpenLMIS will round up the order to 3 packs. Remember, packs are the units in which the warehouse ships products. Note also, OpenLMIS rounds up when the extra number of dispensing units is greater than the threshold, not when it is greater than or equal to the threshold.
2. Packs to ship on the requisition is informed by the definition of the product's pack size, pack rounding threshold, and round to zero attributes. Pack size is the number of dispensing units in a pack (aka primary package) where a pack is the indivisible packaging of a product that can be shipped. The pack rounding threshold then works like this: if I say I have 20 pills (each pill a dispensing unit) on hand from a product whose pack is 50 pill bottle of Ibuprofen 500mg, and that product’s pack rounding threshold is 20, then I need to order a new pack. If the threshold was 30, I wouldn’t. If however that rounding threshold results in 0 packs being ordered, like in the previous example, I can toggle the round to zero attribute to be false to ensure that I’m always ordering at least one pack if my pack rounding threshold might leave me with none.
3. Doses per dispensing unit is an attribute of product. Doses per month is an attribute of a Program Product. Program Product’s are an association between the product, program and product category which you can manage on the product’s configuration screen under the Programs Associated section. Dosage in OpenLMIS can be confusing as the way dosaging can be useful tend to be be specific to a Program. e.g. you wouldn’t use doses per dispensing unit for a vaccine product in EPI. In HIV programs however setting these attributes up accurately can help the requisition bump the calculated stock to order when a new patient is added to a pharmaceutical regimen. This “regimen” is not the same system component as that defined by regimen template though, it’s informed by the field number of new patients added on the requisition.