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.
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.
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
create 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)
create 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; |
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".
set @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".
set @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 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).
Set up patient identifier in Bahmni
Set up prefix for patient identifiers, in Administration -> "Manage Patient Identifier Sources" in openmrs.
Identifier type = (patient identifier)
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).
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'; |
concept id of locally synced cause of death concept}
Unspecified Cause of Death = {concept id of locally synced unspecified cause of death concept}
Default Patient Identifier Source Id = {default patient identifier source }
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)
update 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'; |
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()); |
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>; |