Handling pay-before-services in OpenMRS and Bahmni

Yes we have tried this solution in our QA, Soon we will be using this in prod, will let you know abt production feedback then.

3 Likes

Great stuff, thanks @laxman. Cc @zouchine.

1 Like

Thanks @mksrom and @zouchine for this work, we have tested and it work well even on prod.

What do you think could be done if also the consultation fee is to be paid along with other bills? and yet is not synced as an order in Bahmni

1 Like

Thanks @mupagasi, great to see you are finding this useful.

Proper way to make this work is to rather have the Consultation fee being synced to Odoo, as this is really missing. I haven’t tried really but you could check using the Concept Attribute of saleable = true to make the Obs synced to Odoo.

kindly assist with this 
 been installing the erp api module, but getting this error on the dashboard
 followed the steps mentioned above


Hi @jtukey, did you check OpenMRS’ logs for any errors?

@mksd thanks i checked. The problem was the erp.properties file password
 (odoo password=password instead of password=admin for v. 0.92)
 started the OpenMRS ERP Web API module successfully and a new error has again appeared in relation to customControl.js
 currently stuck on this and will appreciate any help.

Thanks.

Difficult to say, I would think that the error is the displayControl js code.

  1. Check in the developer tools / network tab - whether and what the API call returns.
  2. if you are using the following code, then. put. a breakpoint on this line and debug.

Thanks @angshuonline . Managed to get it working, and it is able to display Billing Status for patients’ invoices. The problem am encountering now, is that it is displaying all billed invoices in odoo in every patient dashboard
 It is not patient specific
 Kindly see the attachments below for 3 different patients dashboards. Thanks.

It would be great for you to share the steps you have followed to resolution. Could you do that?

It is patient specific, but for the wrong patient
 @mksrom any ideas?

Nothing obvious comes to mind without further debugging right now :thinking:. I would need to try this locally.

I have tried to create the saleable boolean concept attribute and assign true to a created boolean concept [pay consultation fee] and placed it on the second page of registration, however it doesn’t sync to odoo after save.

Am I missing some configuration steps?

@mupagasi, I have never tried this really. There must be documentation somewhere to describe the config needed for this to work. Otherwise, maybe reach out on Bahmni Slack and fire your question there, someone there may know.

1 Like

Getting this error I have deployed code in the following places: 1./default-config/openmrs/apps/clinical/dashboard.json

2./default-config/openmrs/apps/customDisplayControl/js/customControl.js /default-config/openmrs/apps/customDisplayControl/views/billingStatus.html /default-config/openmrs/apps/customDisplayControl/views/billingStatusVisit.html

  1. /default-config/openmrs/i18n/clinical/locale_en.json Is there something else that I have missed out? Please do share the steps that how did you deploy “Billing Status”

hi @akhilantotharayil , apologies for the late reply. I followed the following steps:

  1. Put the erp.omod in the /opt/openmrs/modules folder. Ensure the module.allow_web_admin=true is set to true in the openmrs-runtime.properties file.

  2. create the erp.properties file and put it in the /opt/openmrs/ folder. (user-=admin, password=admin)

  3. /default-config/openmrs/i18n/clinical/locale_en.json

  4. /default-config/openmrs/apps/customDisplayControl/js/customControl.js /default-config/openmrs/apps/customDisplayControl/views/billingStatus.html /default-config/openmrs/apps/customDisplayControl/views/billingStatusVisit.html

  5. restart openmrs service

Hope this helps. Thanks.

Can you share the link for erp.omod,openmrs-runtime.properties file and erp.properties file? I am not able to get those links

Check on the following github link i’ve created for you.

Thanks.

How could you solve this error?

1 Like

@jtukey Thanks for this guidance which i have been following closely and as the steps, i am getting tied up in step 3 and 4, kindly beam light on what should be fed on these file locations. Kind Regards Apuda

it is not able to serialize using httpParamSerializer