Bahmni provides addOns that enable and enhance sales, delivery, invoicing features of Odoo. e.g automatic quotation generation, pricing determinations for medications, delivery automation etc. In addition, Bahmni also tries to provide convenient features, optimizations etc, and tries to do so non-intrusively and without changing core Odoo process/workflows.
Before you start registering sale, you should setup and configure your sales settings first.
Go to "Menu / Sales/ Configuration / Settings" and review configuration relevant for products, pricing, customer, sales, shipping etc. For example, you might want to enable "Allow discounts on sales order lines" for discounts settings. Bahmni feature relevant setups and configurations are described contextually below.
These reflect the different Order types from Bahmni Clinical Systems. Currently Bahmni supports syncing of the following Order Types
Orders are processed for matching order types. If a matching order’s “Order type” is not found in Odoo, that particular order will be skipped. You can find out the order type names in OpenMRS database using the following query
$ mysql -uroot -p<password> openmrs > select name from order_type; |
Corresponding the Order Type names discovered above, you need to create corresponding Order Types in Odoo. To do that:
Go to "Menu / Sales / Configuration /Order Types", and create the Order Types if not already present.
Note, the Order Type names must match exactly (casing, spaces etc) correspond to the Order Types defined in OpenMRS.
“Shops” help to specify stock locations by billing stations/counters, also so that the inventory can be managed well in Odoo, and also to define default payment terms and price list association. This is achieved by mapping stock login location to shops. The quotation gets created for the shop (e.g. OPD Billing) that is mapped to the stock location (OPD Pharmacy) from where the drug is delivered/dispensed from.
To define shops, go to "Menu / Sales / Configuration / Shop"
For example, to create a OPD Billing Shop, create as shop as below:
Once you have defined “Order Types” and "Shops", you should then go about configuring what types of orders are processed where and what stock location any drugs/consumables will be delivered from. This is done through Order Type & Shop mapping, and this mapping can be further associated with the orderer's location, i.e where a care provider orders from.
Go to "Menu / Sales / Configuration / Order Type - Shop mapping".
You should start from default mappings and then go about defining more specific maps corresponding to orderer's location.
Add entries as below:
Suppose, you have 2 shops (stations or counters), "OPD Billing", "IPD BIlling" associated with stock locations "OPD Pharmacy", "IPD Pharmacy" respectively, you may want to start as follows.
You can even split the 'Order Types' to be processed by different shops and to be delivered from different locations. For example: You can setup a mapping such that “Drug Order” by a doctor from “Special OPD” login location, should be processed at “Special Billing” shop and delivered from local stock room where “Doctor's Samples Stock”. (And while defining "Special Billing" shop, maybe you have associated a "Discounted Price List" - then a different pricing can be applied)
When a care provider orders drugs, lab tests or radiology tests or procedures, corresponding orders are raised from OpenMRS. While these orders are processed, Bahmni tries to first an Order type matching 'Order Location Name' and 'Order Type', if not then it would identify the first matching mapping for the 'Order Type'.
This is used for synchronizing ordered quantity units from OpenMRS to Odoo.
Order quantity units are specified via the Dosing Units concept set in OpenMRS
First the extended support units must be activated in Odoo by clicking the appropriate setting:
As a system developer role, go to "Menu / Sales / Configuration / Settings" and tick: `Some products may be sold/purchased in different units of measure (advanced)`
Go to "Menu / Sales / Configuration / Syncable Units Mapping".
Create entries that match the OpenMRS quantity units with exactly the concept FSN (in the default locale) and associate to it the equivalent found from Odoo. Create the Odoo unit if needed.
For instance:
Make sure to also update your products units to their stocking unit. Note that they do not have to exactly match the ordering units from OpenMRS, but they must be in the same Unit Of Measure Category, such as Volume, Length, Weight...
For instance:
Odoo provides multiple ways to define sale price(s) of a product. Even at specific product level, you can define different options. A comprehensive guide to pricing is beyond our scope, so only the essence is covered here. You should checkout Odoo webinars for pricing and sales.
Go to “Menu / Sales / Configuration / Settings”, and check pricing options.
In addition, Bahmni allows an addon with which you can define a markup percentage over cost price to arrive at sale price. This feature is applicable for products which have tracking enabled (lots/serial number). While receiving products, sale prices are calculated based on the markup percentage defined for product cost price. See "Price Markup" Section in "Odoo Purchase Configuration". If markup configuration is enabled, within a quotation/sale order, if you select a lot/serial for a product, the markup based sale price will be applied.
Eventually the 'Unit price' that is applied at a line item in a Quotation/Sale order, is arrived in the following order, based on configuration and setup:
By default, whenever a "sale order" is confirmed, Odoo will create “delivery orders” to be processed. Often, there are scenarios, where the dispension happens from the same place as 'billing' (e.g. a pharmacy in a small hospital) and if you would want to simplify and activate through a single workflow, you may choose to enable automatic validation of delivery order.
To do this, go to “Menu / Sale / Configuration / Settings” and enable the configuration element
If the “Validate delivery when order confirmed” is not enabled, then the default process of “Delivery Order” creation is followed, meaning then you will need to go to “Menu / Inventory / Delivery Orders” and manually validate the delivery order for the sale.
In the process above, delivery orders will not be automatically validated if there is not enough stock at the specified stock location mentioned in the “sale order”. If you want to force negative stock in the process, you need to enable the confirmation “Allow negative stock” as shown in the screenshot above. Note, if the product is tracked in lots/Serial No, then on unavailability of stock, this would not be satisfied, and the delivery order will not be marked as 'Done' and will require manual intervention.
Once a order is confirmed, you can click "Create Invoice" button, and Odoo default flow will show different invoicing options .
Once you choose an invoice option, you will have to go through the process of confirming the invoice, and registering payment.
If your implementation does not have different multiple invoicing options like above, then it might make sense for you to skip the invoice options. You can do this by configuring a user level settings.
Go to "Menu / Settings / Users /", edit an user from the list, and under "Technical Settings", check for
Once you have enabled this configuration for a user, then when the user confirms a sale, then it will automate the Invoice option and generation and validation process, and directly take the user to register the payment.
This feature is useful when the care provider himself/herself dispenses medicine during consultation and wants the inventory and payments to be automated as well. This is useful in small or single doctor clinics, where the care provider dispenses medicines, receives payment after the consultation - while in the system automating sale, delivery, order, payment etc
This feature works in conjunction with Bahmni order features in clinical apps, and in relevant for medications and consumables. Whenever a medication is marked as dispensed (e.g. D button against a medication order in Bahmni Clinical) by a provider, depending on configuration and settings, you may automate the following
To do so, you need to enable the following configuration is “Menu / Sales / Configuration / Settings”
Note, this feature does not auto validate delivery of medications if medication is tracked by Lots/Serial No. So such medications delivery orders will be in "Partially Available", "Available" status, and will require manual reconciliation. Also, there is no provision of partial dispense of medications for an order.