Master Lists

Master lists are standard lists of items that can only be defined at the central server level.

Viewing Master Lists๐Ÿ”—

Go to Catalogue > Master Lists in the navigation panel:

Navigation sidebar showing Master Lists highlighted under Catalogue

You will see a window like this:

Master Lists page showing available master lists

To view all the items of a master list, simply tap on one:

Master list detail showing items with codes, names and units

Default price lists๐Ÿ”—

A default price list is a master list flagged with is_default_price_list = true. It defines the standard unit prices for items across the system. When a default price list is configured, those prices are used automatically when creating outbound stock transactions โ€” overriding any sell price stored on a stock line.

Discount lists๐Ÿ”—

A related but separate concept is a discount list: a master list that has a discount_percentage > 0. Discount lists reduce the effective price for eligible non-patient customers.

Pricing Logic๐Ÿ”—

When a stock-out line is created (outbound shipment, prescription, or response requisition), the system resolves the price in four steps:

Step 1 โ€” Look up the default price๐Ÿ”—

The system queries master list lines where:

  • The parent master list has is_default_price_list = true
  • The line's item matches the item being dispensed/shipped

If a matching line is found, its price_per_unit becomes the default price. If no match is found, the system falls back to the sell price stored on the stock line.

Step 2 โ€” Check if the customer is a patient๐Ÿ”—

The customer_name_id on the invoice is checked against the patient records.

  • If the customer is a patient: no discount is applied
  • If the customer is not a patient (or no customer is set): proceed to Step 3

Step 3 โ€” Look up a discount๐Ÿ”—

The system queries master lists where:

  • discount_percentage > 0 (i.e., it is a discount list)
  • The item is present in that list

If multiple discount lists apply, the largest discount is used.

Step 4 โ€” Calculate the final price๐Ÿ”—

ScenarioFormula
Default price found, no discountcalculated_price = default_price_per_unit
Default price found, discount foundcalculated_price = default_price_per_unit ร— (1 โˆ’ discount% รท 100)
No default price, no discountsell_price_per_pack = stock_line_sell_price_per_pack
No default price, discount foundsell_price_per_pack = stock_line_sell_price_per_pack ร— (1 โˆ’ discount% รท 100)

Summary of Rules๐Ÿ”—

SituationOutcome
Item is in the default price listdefault_price_per_unit is set from the list
Item is not in the default price listFalls back to stock line sell price
Customer is a patientNo discount applied, regardless of discount lists
Customer is not a patient, in a discount listLargest applicable discount is applied
Customer is not a patient, not in any discount listNo discount applied
No default price + no discountStock line sell price used unchanged
No default price + discount foundDiscount applied to the stock line sell price