Before you start using Connect (as PWA or Android App), you must setup the synchronization strategy first.
Steps
Set LocationSync strategy in Openmrs global property.
In In Openmrs go to Advanced Settings and set sync strategy property
bahmniOfflineSyncbahmniOfflineSync.strategy with org.bahmni.module.bahmniOfflineSync.strategy.LocationBasedSyncStrategy.
Set up address hierarchy levels and address hierarchy entries.
1. Refer this link Configure Address Hierarchy to setup address hierarchy levels and adding address hierarchy entries using CSV upload.
...
Code Block | ||
---|---|---|
| ||
select address_hierarchy_entry_id , name, level_id , parent_id , user_generated_id from address_hierarchy_entry; |
Specify address for login location.
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.
Add Patient Attribute called addressCode.
In Openmrs go to Manage Person Attribute Types and add new person attribute type called addressCode.
Configure new visit type called FIELD and new encounter type called Field.
Configure showAddressFieldsTopDown and default Visit type.
Add the below config in registration.app.json file
Code Block | ||
---|---|---|
| ||
"addressHierarchy": {
"showAddressFieldsTopDown": true
}
"defaultVisitType": "FIELD" |
...
Generate concatenated configs
Code Block | ||
---|---|---|
| ||
bahmni -i local concat-configs |
Create patient zip files
...
Code Block | ||
---|---|---|
| ||
bahmni -i local create-connect-artifacts |
...