Bahmni ERP Connect

Bahmni ERP Connect is the service that integrates OpenMRS (EMR) & OpenELIS (Lab) components to Odoo (ERP). 


Source Code

  1. Feed Integration Service - https://github.com/Bahmni/openerp-atomfeed-service
  2. Packaging - https://github.com/Bahmni/bahmni-package/tree/master/bahmni-erp-connect


Build and install


> cd /mybahmni/
> git clone https://github.com/Bahmni/openerp-atomfeed-service
> git clone https://github.com/Bahmni/bahmni-package

> cd /mybahmni/openerp-atomfeed-service/
# generate the war "openerp-atomfeed-service.war"
> mvn clean install
> cp target/openerp-atomfeed-service.war /mybahmni/bahmni-package/bahmni-erp-connect/resources/
> cd /mybahmni/bahmni-package/bahmni-erp-connect/
> ./gradlew buildrpm

# you might want to bump up the version of the rpm. 
# To do so, you can change "bahmni-package/gradle.properties"

# now copy the rpm to the target machine (vagrant or docker) 
# uninstall previous version of bahmni-erp-connect
# first logon to the target env and switch to su
# assuming that you have the erp-connect rpm available at /tmp/ 
> rpm -e bahmni-erp-connect
> rpm -Uvh /tmp/<bahmni-erp-connect-0.92-1.noarch.rpm>
> service bahmni-erp-connect status

Runtime properties 

Please note, some of the runtime properties configuration (like using APP_PROPERTIES_FILE env variable to indicate external properties file) are only available from 0.92 version. 


  1. Runtime properties are set through "bahmni-erp-connect.conf" which is usually found under "/opt/bahmni-erp-connect/etc/"
  2. The properties exported this way, are set as environment variables everytime "bahmni-erp-connect" starts up. However the properties set this way do not allow properties with dot - for example "scheduler.initial.delay" can not be exported through "bahmni-erp-connect.conf" file. For this you would require this property to be passed either as JVM arguments with "-D" parameters. 
    • java -jar -Dscheduler.start.delay=10000
  3. Alternatively, export a property "APP_PROPERTIES_FILE" in "bahmni-erp-connect.conf"
  4. Obviously, you need to ensure that a properties file with such names are found in that location, and the file can be read by "bahmni" user. 
  5. For list of available properties that can be overridden, see here
On this page