Bahmni Connect Deployment Steps

Introduction

To install Bahmni Connect, you need to install the "bahmni" command line tool, which provides various options for installing / configuring Bahmni. You can refer Install Bahmni on CentOS. The difference you see for offline server setup is, You need install bahmni-event-log-service which is used for the pulling the event logs for using the data offline as described here. And bahmni-offline module 


Bahmni Connect Installation

  1. As mentioned earlier bahmni-event-log-service and bahmni-offline modules are necessary for bahmni-offline
  2. To install offline specific components, please add the host entry in respective groups of the inventory file along with other entries such as bahmni-emr, bahmni-reports etc. For example, to install bahmni-event-log-service and bahmni-reports components, the host entry should be present in the bahmni-event-log-service  and bahmni-offline group. You can find sample inventory file here
  3. To run Bahmni Connect, Offline concepts needs to be added into the openmrs database. This can be easily done using the script at https://github.com/Bahmni/event-log-service/blob/master/event-log-service-webapp/src/main/resources/sql-scripts/copyOfflineConcepts.py To this, copy it into the machine where Bahmni has been installed and run python copyOfflineConcepts.py. If any errors occurs which says ImportError: No module named MySQLdb, install pip by sudo easy_install pip followed by sudo pip install MySQL-python. Then run the aforementioned command again to install offline concepts.

  4. Refer( Bahmni Connect Features#2)ConfiguringAddressHierarchyBasedonanImplementation'sNeeds ConfiguringAddressHierarchyBasedonanImplementation'sNeeds to install and configure offline filter cr

  5. Good luck.



Note: Visit Location Migration

If you are migrating Bahmni-offline server from 0.83 version to 0.84, make sure that each visit should be tied to some login location(Refer: Visit Location).

Below query checks whether location_id info available in encounter table for corresponding visits and populate them in visit table. If no visit info in encounter it will those visits to unknown location

UPDATE visit
SET location_id = (SELECT location_id FROM encounter WHERE visit.visit_id = encounter.visit_id GROUP BY encounter.visit_id);

UPDATE visit SET location_id = (SELECT location_id FROM location WHERE name = "Unknown Location" LIMIT 1) WHERE location_id IS NULL;