Steps after new bahmni installation
We use Bahmni to demonstrate integration and information flow for patients. Bahmni in turn uses OpenMRS as a EMR, and there are some setups on Bahmni/OpenMRS front that need to be done, following which you can start using Bahmni effectively.
Steps after new Bahmni installation and before sync to HIE
For Bahmni to be able to synchronized data effectively with HIE, the following steps need to performed on Bahmni before the synchronization with HIE begins (Before you put the bdshr-client and tr-client omod to synchronize with HIE). These steps need to be done only once after Bahmni is setup for the first time.
- Disable "superman" user if it is created.
- After Config setup, Before deployment TR omod or before synchronization with TR, do the following
- The answers in any valueset synced from TR for Drug order (dosage forms, routes of administration, etc) must be manually added as set members to the corresponding concept set that Bahmni provides.
The below sqls must be run before we can start synchronizing data from TR and should be run only once.Open "Drug routes" and rename all the members under it (append it with "Retired", so that there are no name conflicts) and retire them. Then, remove all the members in "Drug routes" conceptÂ
Retire default bahmni drug routescreate temporary table toRetire as (select concept_id from concept_set where concept_set=(select concept_id from concept_name where name='Drug Routes' and concept_name_type='FULLY_SPECIFIED')); update concept_name set name = concat(name,' Retired') where concept_id in (select concept_id from toRetire); update concept set retired = 1, date_retired = now(), retire_reason = 'TR concept to be used', retired_by = 1 where concept_id in (select concept_id from toRetire); delete from concept_set where concept_set=(select concept_id from concept_name where name='Drug Routes' and concept_name_type='FULLY_SPECIFIED'); drop table toRetire;
Open "Dosing units" .Rename,Retire and Remove the following concepts from the dosing Units:
Drop,Tablespoon,Teaspoon,Tablet(s),Capsule(s)Retire default bahmni dosing unitscreate temporary table toRetire as (select concept_id from concept_set where concept_set=(select concept_id from concept_name where name='Dosing units' and concept_name_type='FULLY_SPECIFIED')); update concept_name set name = concat(name,' Retired') where concept_id in (select concept_id from toRetire); update concept set retired = 1, date_retired = now(), retire_reason = 'TR concept to be used', retired_by = 1 where concept_id in (select concept_id from toRetire); delete from concept_set where concept_set=(select concept_id from concept_name where name='Dosing units' and concept_name_type='FULLY_SPECIFIED') and concept_id in (select concept_id from toRetire) ; drop table toRetire; select concept_id into @tablet_concept_id from concept_name where name = 'Tablet' and concept_name_type = 'FULLY_SPECIFIED'; update concept_name set name = concat(name,' Retired') where concept_id = @tablet_concept_id; update concept set retired = 1, date_retired = now(), retire_reason = 'TR concept to be used', retired_by = 1 where concept_id = @tablet_concept_id;
- The answers in any valueset synced from TR for Drug order (dosage forms, routes of administration, etc) must be manually added as set members to the corresponding concept set that Bahmni provides.
To Synchronize Concepts from Terminology Registry (TR) :-Â
- Deploy terminology client omod. (The location should be /opt/openmrs/modules for RPM based installation and should be owned by bahmni user.)
- Start the schedulers in the following order
- Start Terminology Feed Retry Task and Concept Reference Term Feed Feed Task. Wait for the sync to finish and failed events if any for ref terms to clear.
- Start Terminology Feed Task. Wait for the sync to finish and failed events if any for concepts to clear.
- Start Medication Feed Task. Wait for the sync to finish and failed events if any for medication to clear.
After sync of concepts from TR is complete (make sure that there are no failed events created in Bahmni related to TR sync). Also, make sure that Step 5 in "Steps after new Bahmni installation and before sync to HIE" is complete.
Add the answers of the coded concept "routes of administration" as members of "drug routes".Â
Add drug routesset @drug_routes_concept_id = 0; set @tr_routes_concept_id = 0; select concept_id into @drug_routes_concept_id from concept_name where name = 'Drug Routes' and concept_name_type = 'FULLY_SPECIFIED'; select concept_id into @tr_routes_concept_id from concept_name where name = 'Route of Administration' and concept_name_type = 'FULLY_SPECIFIED'; delete from concept_set where concept_set = @drug_routes_concept_id; create temporary table toAdd as (select answer_concept, @drug_routes_concept_id as concept_id, '1' as creator, now() as date_created, uuid() as uuid from concept_answer where concept_id = @tr_routes_concept_id); insert into concept_set (concept_id, concept_set, creator, date_created, uuid) select answer_concept, concept_id, creator, date_created, uuid from toAdd; drop table toAdd;
Add the answers of the coded concept "Medication Forms", "Medication package forms", "quantity units" as members of "dosing units".
Add Dose unitsset @drug_dose_units_concept_id = 0; set @tr_medication_forms_concept_id = 0; set @tr_medication_package_forms_concept_id = 0; set @tr_quantity_units_concept_id = 0; select concept_id into @drug_dose_units_concept_id from concept_name where name = 'Dosing Units' and concept_name_type = 'FULLY_SPECIFIED'; select concept_id into @tr_medication_forms_concept_id from concept_name where name = 'Medication Forms' and concept_name_type = 'FULLY_SPECIFIED'; select concept_id into @tr_medication_package_forms_concept_id from concept_name where name = 'Medication Package Forms' and concept_name_type = 'FULLY_SPECIFIED'; select concept_id into @tr_quantity_units_concept_id from concept_name where name = 'Quantity Units' and concept_name_type = 'FULLY_SPECIFIED'; delete from concept_set where concept_set = @drug_dose_units_concept_id; create temporary table toAdd as (select answer_concept, @drug_dose_units_concept_id as concept_id, '1' as creator, now() as date_created, uuid() as uuid from concept_answer where concept_id in (@tr_medication_forms_concept_id, @tr_medication_package_forms_concept_id, @tr_quantity_units_concept_id)); insert into concept_set (concept_id, concept_set, creator, date_created, uuid) select answer_concept, concept_id, creator, date_created, uuid from toAdd; drop table toAdd;
To Synchronize Data to and from SHR and MCI :-Â
- Deploy bdshr client omod. You can get released versions from GitHub. (The location should be /opt/openmrs/modules for RPM based installation and should be owned by bahmni user.)
To populate Locations, Facilities and Providers from HRMÂ
Go to OpenMRS UI -> Manage Schedulers -> and set the LR Sync, FR Sync and PR Sync to start on startup and start off the schedulers.
(If you have a provision to populate the data directly, you can do so and then start the schedulers).- Create Users which are recognized by HIE. (To be done after step 2 is finished).
- Create a user from OpenMRS administration console and provide him the following roles
Doctor, Nurse, RegistrationClerk, EmergencyRegistration, bahmni-document-uploader (or give him privilage-full). - if the user is going to do any clinical assessment like encounter (diagnosis, drug or test order, record observation), then its better that you also register this user as a provider which is synced from PR. To add the user as a provider. --> In admin screen of openmrs goto manage providers and create a new provider for the user or link with a existing provider synced from PR.
Providers synced from PR usually have only digits set in the identifier section of openrmrs provider. You can validate this by going to HRM and looking for a provider with this identifier.Â
- Create a user from OpenMRS administration console and provide him the following roles
Set up patient identifier in Bahmni
Set up prefix for patient identifiers, in Administration -> "Manage Patient Identifier Sources" in openmrs.Â
Identifier type = (patient identifier)- Go to Openmrs -> Administration -> Maintanence -> Settings → SHR  and set Default Patient Identifier Source Id as the source id generated in the above step.
- Create locations identified by HIE. (To be done after step 2 is finished).
- Login Locations for CHW application:Â Â You can do this via OpenMRS Admin interface. Goto Administration->Locations, identify the location and edit it. Assign 'Login Location' and save. Â You will also have to put the appropriate address for the location.
Alternatively, to tag a location as a login location, run the following sqls :-
INSERT INTO location_tag_map(location_id, location_tag_id) VALUES((Select location_id from location where name ='<location name>'), (Select location_tag_id from location_tag where name ='Login Location')); Â or select * from location where uuid=(select internal_id from shr_id_mapping where external_id='facility code'); verify location name from the above result. use the location_id from the above result and execute the below result insert into location_tag_map values($location_id, (select location_tag_id from location_tag where name = 'Login Location'));
Tag the hospital location as "Visit Location". (For a CHW instance, the visit location will be the community clinics. It will be the same as the login locations.)
For all the login locations, the parent location should be configured. The parent location will be the visit location or hospital location. (This is not applicable for CHW as the visit location and login location are the community clinics itself).
- Login Locations for CHW application:Â Â You can do this via OpenMRS Admin interface. Goto Administration->Locations, identify the location and edit it. Assign 'Login Location' and save. Â You will also have to put the appropriate address for the location.
Remove the "Bahmni Diagnosis Status" concept from the "Visit Diagnosis" concept set (If you are using the Diagnosis tab in Bahmni to enter Diagnosis).
DELETE FROM concept_set WHERE concept_id = (SELECT concept_id FROM concept_name WHERE name='Bahmni Diagnosis Status' AND concept_name_type='FULLY_SPECIFIED');
Remove the privilege "app:clinical:deleteDiagnosis" from all user roles.
DELETE FROM role_privilege WHERE privilege = 'app:clinical:deleteDiagnosis';
- Set up global properties -
You can setup the global properties through OpenMRS UI OR you can execute the sqls given below (refer code block :Â Setup Global Properties)- For "concept.causeOfDeath" and "concept.unspecifiedCauseOfDeath"
Go to Openmrs -> Administration -> Maintanence -> Settings → Concept- Cause of Death = {
concept id of locally synced cause of death concept}
Unspecified Cause of Death =Â {
concept id of locally synced unspecified cause of death concept}
- Cause of Death =Â {
- Go to Openmrs -> Administration -> Maintanence -> Settings -> SHR
Default Patient Identifier Source Id = {default patient identifier source }
- Ignore Concept List  = {concept id of concepts that are not be synced with SHR}
- Concept Relationship Type =Â {concept id of locally synced Relationship Type}
- Concept Quantity Units = {concept id of locally synced Quantity Units}
- Concept Immunization Reason = {concept id of locally synced Immunization Reason}
- Concept Immunization Refusal Reason = {concept id of locally synced No Immunization Reason}
- Concept Immunization Status = {concept id of locally synced Immunization Status}
- Concept Procedure Status =Â {concept id of locally synced Procedure Status}
Concept Procedure Outcome =Â {concept id of locally synced Procedure Outcome}
Concept Route of Administration = {concept id of locally synced Route Of Administration}
Concept Medication Forms = {concept id of locally synced Medication Forms}
Concept Medication Package Forms = {concept id of locally synced Medication Package Forms}Â
(You can use the code block for global property to set the concepts only)Setup Global Propertiesupdate global_property set property_value=(select concept_id from concept_name where name='Cause of Death' and concept_name_type='FULLY_SPECIFIED') where property='concept.causeOfDeath'; update global_property set property_value=(select concept_id from concept_name where name='Unspecified cause of death' and concept_name_type='FULLY_SPECIFIED') where property='concept.unspecifiedCauseOfDeath'; Â update global_property set property_value=(select concept_id from concept_name where name='Immunization Reason' and concept_name_type='FULLY_SPECIFIED') where property='shr.concept.immunizationReason'; update global_property set property_value=(select concept_id from concept_name where name='No Immunization Reason' and concept_name_type='FULLY_SPECIFIED') where property='shr.concept.immunizationRefusalReason'; update global_property set property_value=(select concept_id from concept_name where name='Immunization Status' and concept_name_type='FULLY_SPECIFIED') where property='shr.concept.immunizationStatus'; Â update global_property set property_value=(select concept_id from concept_name where name='Procedure Status' and concept_name_type='FULLY_SPECIFIED') where property='shr.concept.procedureStatus'; Â update global_property set property_value=(select concept_id from concept_name where name='Procedure Outcome' and concept_name_type='FULLY_SPECIFIED') where property='shr.concept.procedureOutcome'; update global_property set property_value=(select concept_id from concept_name where name='Route of Administration' and concept_name_type='FULLY_SPECIFIED') where property='shr.concept.routeOfAdministration'; update global_property set property_value=(select concept_id from concept_name where name='Relationship Type' and concept_name_type='FULLY_SPECIFIED') where property='shr.concept.relationshipType'; update global_property set property_value=(select concept_id from concept_name where name='Quantity Units' and concept_name_type='FULLY_SPECIFIED') where property='shr.concept.quantityUnits'; update global_property set property_value=(select concept_id from concept_name where name='Medication Forms' and concept_name_type='FULLY_SPECIFIED') where property='shr.concept.medicationForms'; update global_property set property_value=(select concept_id from concept_name where name='Medication Package Forms' and concept_name_type='FULLY_SPECIFIED') where property='shr.concept.medicationPackageForms';
- For "concept.causeOfDeath" and "concept.unspecifiedCauseOfDeath"
- We need to add "Dispensed" concept to "shr obs ignore list" in global properties.
- Add the following concepts as set members to
- Â Mandatory :Â
- Relationship Type ->Â Family Member History
- Optional :Â
- Immunization Reason ->Â Immunization Incident Group
- No Immunization Reason -> Immunization Incident Group
- Immunization Status->Â Immunization Incident Group
- Procedure Outcome ->Â Â Procedure Template
- Procedure Status-> Procedure Template
select concept_id into @concept_set from concept_name where name='Immunization Incident Group' and concept_name_type='FULLY_SPECIFIED'; select property_value into @concept_id from global_property where property='shr.concept.immunizationReason'; insert into concept_set (concept_id, concept_set,creator,date_created,uuid) values(@concept_id,@concept_set,1,now(),uuid()); select concept_id into @concept_set from concept_name where name='Immunization Incident Group' and concept_name_type='FULLY_SPECIFIED'; select property_value into @concept_id from global_property where property='shr.concept.immunizationRefusalReason'; insert into concept_set (concept_id, concept_set,creator,date_created,uuid) values(@concept_id,@concept_set,1,now(),uuid()); select concept_id into @concept_set from concept_name where name='Immunization Incident Group' and concept_name_type='FULLY_SPECIFIED'; select property_value into @concept_id from global_property where property='shr.concept.immunizationStatus'; insert into concept_set (concept_id, concept_set,creator,date_created,uuid) values(@concept_id,@concept_set,1,now(),uuid()); select concept_id into @concept_set from concept_name where name='Family Member History' and concept_name_type='FULLY_SPECIFIED'; select property_value into @concept_id from global_property where property='shr.concept.relationshipType'; insert into concept_set (concept_id, concept_set,creator,date_created,uuid) values(@concept_id,@concept_set,1,now(),uuid()); select concept_id into @concept_set from concept_name where name='Procedure Template' and concept_name_type='FULLY_SPECIFIED'; select property_value into @concept_id from global_property where property='shr.concept.procedureOutcome'; insert into concept_set (concept_id, concept_set,creator,date_created,uuid) values(@concept_id,@concept_set,1,now(),uuid()); select concept_id into @concept_set from concept_name where name='Procedure Template' and concept_name_type='FULLY_SPECIFIED'; select property_value into @concept_id from global_property where property='shr.concept.procedureStatus'; insert into concept_set (concept_id, concept_set,creator,date_created,uuid) values(@concept_id,@concept_set,1,now(),uuid());
- Â Mandatory :Â
- For local envs only (not to be done for prod), add uncategorized diagnosis to diagnosis set of sets concept as a set member.
- Add immunizations to the coded concept "vaccine".Â
- Change the datatype of the concept "procedure" to coded and add procedures like colposcopy, histopathology etc to it.
- To setup Order Types refer Steps to setup new Openmrs Order Type.
- In CHW to setup Print HID Page need to do the following:-
- Add Print HID Card privilege to the user who should be able to View/Operate "Print Health ID Cards" App.
- Create a role for fieldworkers(CHWs, HAs, CHCPs). This role should be given to all users who are responsible to go on field and register patient(for printing HIDs).
- Put the name of above role into openmrs=>admin=>settings=>users=>fieldWorkerRoleName.
To get OpenELIS & OpenMRS working, you need to do the following.
- Setup OpenELIS
- Login to ELIS (http://192.168.33.18/openelis) - admin/adminADMIN!To create a user in openelis
Go to openelis -> Administration -> Manage Users -> Add.
Create user and Check all the roles available.
 Copy the provider uuid from openmrs for the user.
select uuid from provider where identifier = '<hrm provider id>';
 Go to database :psql -U clinlims clinlims and execute the following sql :-
update system_user set external_id = '<provider uuid from openmrs>' where id = <user id in openelis>;
- Setup OpenMRSPrior Requisites of "Tests" and "Panels"
- Create a concept, (e.g. "Blood Sample") of class - Sample, datatype - N/A, is Set = true. Add it as a member of "Lab Samples" concept. This forms the basis of sample in OpenELIS.
- Create a concept, (e.g. "Hematology Department") of class - Department, datatype - N/A, is set = true. Add it as a member of "Lab Departments" concept. This forms the basis of department in OpenELIS
- To a test/panel to OpenELIS, do the following in OpenMRS
- You should create the test in "Terminology Server".
- Once the "test"/"panel" is synced to Local OpenMRS, you need to add the test/panel as member of "Blood Sample" and "Hematology Department" concepts you created above.
- Once the "test"/"panel" is synced to Local OpenMRS, you need to add the test/panel as member of "All Tests and Panels" concepts you created above.
- Once you have done the above, you can verify that tests have synced to ELIS, by going through menu->"Administration"->Test
- Step up Drugs -
- Make sure to map a concept drug to a dosage form. Â