Order Quantity needs to be stored in Packs

Description

Order Quantity needs to be expressed in packs, not dispensing units, because you cannot fulfill at the dispensing unit level. You must take into consideration the packsize/netcontent, rounding thresholds and roundtozero rules (i.e. the packs to ship conversion).

We can display the order quantity in dispensing units but it must be divisible by the netcontent within these screens. In the requisition screen users can request any level of dispensing units but we then use the rounding threshold to determine the order quantity (just like "packs to ship").

For example, 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.

This ticket outlines the scope of what needs to be updated.

  • order object

    • When convert to order happens, the Approved Quantity (in dispensing units) needs to use the "packs to ship" calculation --> which uses the Rounding Threshold and CanRoundtoZero rules to express the Approved Quantity in packs which then maps to the Order Quantity

  • viewing orders

    • Order Quantity is expressed in Packs/Vials

  • printing a single order (PDF, HTML, csv)

    • Order Quantity displayed in packs

    • The column "Pack" should be renamed to "Packs" (this duplicates order quantity and was removed)

    • It can also display the dispensing units but it must be calculated off of the Order Quantity in packs (NOT the Approved Quantity in dispensing units). EG if Requested Quantity is 15 units and Approved Quantity is 15 units, but the product is in packs of 10, then the Order should have 2 packs of 10, meaning the order should contain 20 Dispensing Units (not 15).

  • fulfilling orders (shipments)

    • Order Quantity and Fill Quantities default display should be expressed in packs/vials (not dispensing units)

    • IF fill quantities are expressed in dispensing units, it must be divisible by the netcontent. You cannot fulfill a quantity of 4 dispensing units if the netcontent is 10.
      https://openlmis.atlassian.net/browse/OLMIS-3853 implements the 'toggle' between expressing quantities in dispensing units (doses) and packsize (vials). We will need to add validations to make sure fill quantities expressed in dispensing units are divisible by the netcontent

  • printing pick/pack list

    • Order quantity is in packs

  • pod

    • default display should be expressed in packs/vials (not dispensing units) since you cannot reject a dispensing unit (a dose) but you can reject one vial.

  • printing pod

Acceptance Criteria

  • When a requisition is converted to an order, the order quantity in an order line item is in packs using the "packs to ship calculation" (described in the order object above)

  • When viewing an order, printing an order, the order quantity is in packs

  • When fulfilling an order (shipments) and printing a pick/pack list, the order and fill quantities are in packs

  • For the POD and its printing, the shipped quantities are in packs - ACC concerning printing PODs can't be verified at the moment, as the feature is not available yet

Status

Assignee

Sebastian Brudziński

Reporter

Mary Jo Kochendorfer

Labels

None

Story Points

5

Time tracking

30h

Components

Sprint

None

Fix versions

Priority

Blocker