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

Status

Assignee

Chongsun Ahn

Reporter

Josh Zamor

Labels

None

Components

Sprint

None

Fix versions

Priority

Critical
Configure