Before you start using Connect (as PWA or Android App), you must setup the synchronization strategy first.
In Openmrs go to Advanced Settings and set sync strategy property
bahmniOfflineSync.strategy with org.bahmni.module.bahmniOfflineSync.strategy.LocationBasedSyncStrategy.
update address_hierarchy_entry set user_generated_id=<user_generated_id> where address_hierarchy_entry_id=<id>; |
Sample user generated ids
select address_hierarchy_entry_id , name, level_id , parent_id , user_generated_id from address_hierarchy_entry; |
In OpenMRS navigate to Manage Locations and add address to login location. Only the patients whose address matches with address of login location will sync to connect device.
In OpenMRS go to Manage Person Attribute Types and add new person attribute type called addressCode.
In OpenMRS, "Administration => Visits => Manage Visit Types", create a visit type with name "FIELD".
In OpenMRS, "Administration => Encounters => Manage Encounter Types" and create an encounter type with name "Field".
Add the below config in registration.app.json file
"addressHierarchy": { "showAddressFieldsTopDown": true }, "defaultVisitType": "FIELD" |
bahmni -i local concat-configs |
bahmni -i local create-connect-artifacts |