Handling pay-before-services in OpenMRS and Bahmni

Hi guys!

Sharing ideas on how to handle cases where patients need to pay (fully or partially) before services are provided to them.

Here is the client workflow:

  • Patient comes in the hospital, is seen at the registration desk and is redirected to the waiting area for his/her type of visit.
  • Patient is seen by the doctor who may prescribe lab tests, radiology tests, surgical procedures, drugs…
  • A paper prescription is given to the patient.
  • Patient (or a trusted friend or family member) then goes to the cashier to pay the prescribed orders.
  • Cashier first looks up the prices in the price list.
  • Patient is asked to pay the calculated amount. If he/she is unable to pay, the hospital may provide other payment options (loan, extended payment terms, free of charge…)
  • Once cleared, the prescription is stamped and signed.
  • Patient can then use this as a proof of payment/clearance and proceed to getting orders done (retrieve the drugs from the pharmacy or getting the x-rays done etc…)

In Bahmni, when the doctor prescribes an order, it is synced to Odoo and creates a Quotation with prices picked up from the applicable price list.

With Bahmni in place, when the patient would go to the cashier, the cashier would see the ordered Quotation in Odoo. If all is correct, the Quotation is then transformed into a Sales Order and a payment can be received from the patient (or payment options applied) and transform the Sales Order into an Invoice. Invoice or receipt can be printed out as a proof of payment.

We would like to leverage on this so the doctor would be able to confirm at first sight if an order is indeed cleared and he can proceed with delivering care to this patient.

So we are thinking of providing a customisable dashboard widget that lists invoice lines and their corresponding invoice clearing status. The doctor would not need to know any of the details of the patient payment options. Order would only appear to him/her as cleared/approved.

TODOs:

Odoo side:

  1. Define what exactly a cleared order would mean in Odoo
  2. Identify if this is something that can be fetched using the existing Odoo API
  3. If not, create a custom Odoo module to compute this status and expose the resource

OpenMRS side:

  1. OpenMRS module to call the Odoo RPC API to retrieve such status and expose it via a custom OpenMRS resource

Bahmni EMR side:

  1. Display control to show order lines and their clearance status

Additional requirements:

  • Other implementations have a use case where a fee is also applied at registration (@laxman) .
  • This only describes a simple ideal OPD workflow. IPD patients could have more than one Quotation created and cleared. Requirements are not 100% clear on this yet, but IPD is something to keep in mind.

(cc @zouchine @angshuonline, @laxman, @mksd)

4 Likes

@angshuonline, do you think that would suit in the Bahmni Roadmap?

I think so. The work is not complicated. Have you checked the example in the link?

Also in a recent training exercise, we worked out some basic API calls (to OpenERP) and display controls showing cost of services. Maybe that will lead to some more thoughts.

Could you share the training material link again? (the Google Drive link I had did not contain all the documents, I think the Google Docs were missing. I did not find a link in the PAT call notes of that day we talk about it (March 6th))

I don’t know whats wrong with the sharing. Maybe its from my org’s email acc - but for some reason its blocked. I will check tomorrow, otherwise I will share it from my gmail.

I am also thinking that maybe I will create a github pages for such example documentation. or use bahmni WIKI itself.

1 Like

@ekowkoomson1 We had a similar discussion about this? especially for NHIS patients…

@c.antwi Yes we did and it would really be good to see the link @angshuonline is referring to.

Let me know if you can access this doc. Refer to the Example 2

i get the “Access Denied” message (an access request have been sent)

Try again. Although I have given you access, try accessing the doc without signing onto google.

thank you, but accessing without my google account still not possible

The best option is to create github pages. but that will take some time for me.

To give updates on this subject:

We have deployed a first version of the OpenMRS Module ERP that queries the ERP and exposes its data via the OpenMRS API. For now it implements Odoo (but is designed to be extendable to other ERPs) and retrieves only Orders and Invoices. See:

(Thanks @zouchine)

We also have started work on displaying what I call the “patient billing status” which is a list of all ordered items found in the ERP for the patient, and their computed approval status, ie, has it been paid or not. Since it is about adding a widget on the Bahmni patient dashboard, this is Bahmni specific.

@angshuonline, I have created the following ticket for it: https://bahmni.atlassian.net/browse/BAH-832

I have started work on this widget and pushed here:

This is very raw at the moment and distributed via the customDisplayControl framework of the Bahmni Config which is not ideal.

For the next steps, I would need some info on:

  • how this could be merged in Bahmni Apps (with its Jasmine tests)
  • how to use the available Bahmni CSS styles
  • and also find the right layout for this to be the clearest possible to users.

@angshuonline, @binduak, @mksd, @laxman

4 Likes

This is great stuff, thanks @mksrom and @zouchine for your hard work on this.

1 Like

Thanks @mksrom for sharing this, We will check it out at our end as well and will let you know if any feedback cc: @dipakthapa

@laxman, some progress has been made on the above feature. Still the custom widget is available as a Custom Display Control unfortunately (as opposed to a Control brought by Bahmni Apps directly) in one of our client’s config.

Collapsed:

Expanded:

Feel free to have a look and try it if you want to. https://github.com/CRUDEM/bahmni-config-hsc/blob/master/configuration/openmrs/apps/customDisplayControl/js/customControl.js

1 Like

Thanks @mksrom, we will look into this.

This seems to be a very handy solution for many healthcare facilities. An enhancement of this development would be extremely utilitarian to us. As per the charter of public hospitals, there are 2 types of tests-payable and non-payable tests/services. In case of undertaking payable services, patients must pay off fees entirely as a prerequisite for availing the service. Hence, the payment status needs to be dispatched to OpenElis from Odoo for availing any lab services. This requirement has become an exigency for all ensuing OpenMRS deployments in Bangladesh

Thanks @rakib, that’s interesting to know. However we don’t have on our in-house roadmap to do the same exercise with the LIMS as of yet.

Out of curiosity, have you used the custom display control mentioned by @mksrom though? What about you @laxman? We would be curious to read your feedback about it.

No , Sorry to say , We are not using the display control yet. We will be pleased and helpful if you take a step to do our requirements if possible .