Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

What is a Lot in v3

A Lot object has the following:

  • String lotCode (required—if the shipment really does not have a code, and only has an expiration date, then users could paste that date into this code field)
  • Date expirationDate (optional)
  • Date manufactureDate (optional)
  • reference to a TradeItem (required) — this object gives us access to the Manufacturer name, etc, which will be helpful for display. (in V2 this was a reference to a product)
  • boolean active flag — potentially a future feature to be able to set a Lot as inactive after it has gone out of circulation; or maybe this is connected to how you archive the lot instead of a DELETE endpoint
  • UUID will get assigned to the Lot in ReferenceData, but it won't be visible to the user

This definition of Lot is similar to v2, with some modifications. See https://github.com/OpenLMIS/open-lmis/blob/master/modules/stock-management/src/main/java/org/openlmis/stockmanagement/domain/Lot.java for V2 domain object.

New Endpoints in ReferenceData

  • GET /api/lots?... - search and return all matching Lots; optionally query by any TradeItemID, expirationDate, and/or lotCode
  • GET /api/lots/{id} - get a single Lot by its UUID, not searching by TradeItem
  • POST /api/lots - create a new Lot with a TradeItemID, lotCode, and optional fields (listed above)
  • PUT / api/lots/{id} - update or replace a Lot by UUID

Permissions

For now, the ability to GET lots is based on the same permissions as ability to get the trade items, namely ____ permission.

The ability to POST and PUT lots is based on _____ permission.

Impact to Existing Endpoints

None. This work involves adding new endpoints into ReferenceData (referencedata-3.1.0), but does not change or break any existing endpoints.

Process to Manage Lots

  1. Lot Management UI screens (view, create, update) - within the Products admin area, in the TradeItem record, some section or modal to see the current Lots and to update any one of them, or add a new Lot
  2. CSV uploads (desired)

Open Questions

  1. Josh, are there any other GS1 fields or naming changes needed?
  2. Is it clear enough how to tell that a TradeItem has no Lots (meaning Stock Service should create stock cards by the trade item, not by Lots)?
    1. Would this be a 404 NOT FOUND from GET /api/lots?tradeItemID=1234&active=true or a 200 with empty response object {}?
  3. If a TradeItem has no Lots, then has StockCards with inventory and adjustments with no Lots, then later on the TradeItem has lots, how does that impact the Stock service?
    1. Proposed solution: For any TradeItem, allow the simultaneous existence of stock cards that have Lots along with stock cards that do not have Lots. We simply need our software to be flexible since Lots might get introduced into the supply chain at different times or in different locations, even after some stock cards and physical inventories exist in the software.
  4. If a TradeItem has Lots and Stock service has inventories and adjustments associated with it, and then all Lots become inactive with no new Lots added, how does that impact the Stock service?
    1. Proposed solution: same as above.
  5. Does Stock Management need an "adjustment" reason to move stock from one lot to another, in cases where it was inaccurate reported? Or in cases where it was previously inventoried with no Lot information but now we want to start tracking it by Lots?
  • No labels