Support GTIN Attributes through Orderable Dispensable

Description

This ticket deals with supporting a more mature Dispensable model. Currently, there is only a "dispensingUnit" string that is supported. This creates a fuller model which supports multiple attributes (from GTIN attributes).

This ticket also deals with fixing a limitation of how fulfilling is implemented (). From (https://openlmis.atlassian.net/wiki/spaces/OP/pages/68288572/Medical+Commodities+OpenLMIS+Model+for+GS1):
A TradeItem may fulfill for a CommodityType if:

  • the TradeItem is classified by the CommodityType.

  • AND the CommodityType has an Orderable which has an equivalent Dispensible as the Orderable which the TradeItem has.

This ticket fulfills the second bullet point.

Acceptance Criteria

  • different product types (syringes, vaccines, pharma) - some simple set for now (checkin with to followup on the 3-4 GTIN attributes we should use - esp for vaccine demo data as it is our demo for ideal product model)

  • don't break ref data seed tool (as in how to PUT /api/orderables with different "dispensibles")

  • model dispensable like Orderables and Orderable identifiers (key-value data), and put in inheritance for Object.equals

  • need a consistent contract (e.g. Object.toString) for the product grid: so EPI products show 20 dose and Ibuprofen shows 500mg

Attachments

3

QAlity Plus - Test Management

Checklists

Activity

Show:

Brandon Bowersox-Johnson February 14, 2018 at 5:35 AM

Thanks! I see that related ticket is linked. So I consider this ticket passed QA--moving to Done.

Chongsun Ahn February 13, 2018 at 4:13 AM

Thanks for QAing; this is intentional. Instead of "dispensingUnit", all orderables now have a "displayUnit" for their dispensable, which should be shown instead of what's in the "dispensingUnit". We'll need to change the UI code to reflect this. We didn't put the UI changes as AC in this ticket, so we'll need to create another ticket to do so. I can do that.

Brandon Bowersox-Johnson February 13, 2018 at 1:26 AM

There might be a bug here. I'm showing you what I see in screenshots--specifically that Vaccines do not seem to have a "dispensingUnit" string any more from the API, and in the UI that means Vaccines show up with an empty column in the Requisition grid (screenshots attached).

Please let us know if this is a bug with the new code (should Vaccines have a "dispensingUnit"?) or if it is a bug in demo data or something we should file and address separately?

Josh Zamor February 9, 2018 at 11:15 PM

Looks good to me, moving to QA.

Chongsun Ahn February 7, 2018 at 8:11 PM

Thanks for pointing that out. It should be fixed now.

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

Details

Assignee

Reporter

Components

Sprint

Fix versions

Priority

Time Assistant

Created January 24, 2018 at 11:12 PM
Updated February 14, 2018 at 3:07 PM
Resolved February 14, 2018 at 5:35 AM