...
Steps after new Bahmni installation and before sync to HIE
For Bahmni to be able to syncronized synchronized data effectively with HIE, the following steps need to performed on Bahmni before the syncroniztion 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 syncronizing 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
Code Block language sql title Retire default bahmni drug routes 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)Code Block language sql title Retire default bahmni dosing units 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;
- 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.
...
- 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 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".
Code Block language sql title Add 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".
Code Block language sql title Add Dose 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;
...
- Deploy bdshr client omod. You can get released versions from githubGitHub. (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 :-
Code Block language sql 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).
Code Block language sql 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.
Code Block language sql 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)Code Block language sql title Setup Global Properties 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';
- 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
Code Block language sql 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.
...