Download - Bahmni Connect
![Page 1: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/1.jpg)
Bahmni Connect +
- Bahmni Team Thoughtworks
![Page 2: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/2.jpg)
No Network connectivity:● Without Bahmni Connect: A health worker, usually active on the field and does not
have access to the internet. They would record patient details/observations for patients on paper and enter it in Bahmni once they are back in the hospital at the end of the day.
● With Bahmni Connect: A health worker can directly enter the observations in the offline app and sync it to the server at the end of the day when there is network.
![Page 3: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/3.jpg)
How does it help?● Data entry is a time taking process. Entering a day’s worth data at the end of the day is
a huge task.● The more the number of hops before data is entered in the system the more error
prone it is. ● Avoids loss of paper records - during the transition of paper records from hospital to
remote area, many times they get lost. ● With paper records, a lot of times duplicate records get created as it is difficult to
search. An offline app helps in search and prevents creation of duplicate records.● Doctors usually start a treatment in hospital but do follow ups in a sub centre. If the
paper record is not available, doctor at the subcenter will not know the details of the treatment going on.
● Entering the data in Connect app (offline) will help them identify the missing (mandatory) information/ erroneous information at the field itself.
● Syncing the Connect app to server ensures that the latest information is present in the Connect app as well as at the main hospital.
![Page 4: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/4.jpg)
Current Features:●Works Offline.●Patient Registration●View the following information on patient
dashboard○Observations○Visits○Treatments○Lab orders○Diagnosis
●Record observations●Push to/ pull from (sync) server
![Page 5: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/5.jpg)
![Page 6: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/6.jpg)
Offline Support through Apps
● Chrome Extension (Bahmni.tar.gz) : Web worker, Indexed DB, Lovefield
![Page 7: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/7.jpg)
With discontinuity of Chrome’s support for Chrome AppsEvaluating options:● Electron● Progressive Web apps (Service workers)
![Page 8: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/8.jpg)
Offline Support through Apps● Android App (Bahmni.apk)
Ionic provides all the functionality that can be found in native mobile development SDKs.Crosswalk
![Page 9: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/9.jpg)
Home Page With Sync button:
![Page 10: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/10.jpg)
Sync Mechanisms
●Initial Sync : App is unusable.●Background Sync : Uses Web workers. Scheduled
at periodic intervals. App is usable.●Manually trigger sync.
![Page 11: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/11.jpg)
Initial Sync:
![Page 12: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/12.jpg)
Background Sync/ Manual Trigger
![Page 13: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/13.jpg)
App Pull
![Page 14: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/14.jpg)
App Pull
●Meta data: Synced to all devices○Configs○Global properties○Reference data○Concepts
●Transactional Data: Synced based on login location○Patient Profiles○Encounters( observations, orders ….)
![Page 15: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/15.jpg)
App Push
Hustle : A javascript queuing and messaging library built on top of IndexedDB.
![Page 16: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/16.jpg)
Sync Strategy● As the number of patients, their encounters, observations would be usually very high, the
storage space on the tab would be a constraint.● Data is usually pulled based on the login location used during login.● For example if a person has logged in for login location 1, data relevant for location 1 is
only pulled.● The way data is mapped to a login location is based on a strategy. The strategy is a java
class which just evaluate the filter for each event.● Strategy is customizable and pluggable.● Out of the box there are 2 strategies
○ LocationBasedOfflineSyncStrategy: Based on the patient address filled in registration form the filter is evaluated.
■ Eg: If a community health worker logs in from “Kampala” , all patient whose address is Kampala would be synced. It uses address hierarchy to map patients to login location
○ IDBasedOfflineSyncStrategy : Based on the patient identifier a patient is mapped to a login location.
■ For eg: Primary identifier has a prefix which represents the village they belong to.
Strategy can be customised and can be plugged in as a global property in OpenMRS
![Page 17: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/17.jpg)
Sync Strategy:
Note: Metadata (configs/global properties/concepts) would be synced to all locations irrespective of login location.
![Page 18: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/18.jpg)
Data Flow:
![Page 19: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/19.jpg)
Components on server side
●Event log Service○Polls Events Records table for new events ○Creates events in event_log with filter for each
event ●Bahmni Offline Sync OMOD
○Loads the strategy configured in global properties
○For every event in event records it evaluates the filter based on the strategy and gives it to Event log service
![Page 20: Bahmni Connect](https://reader035.vdocument.in/reader035/viewer/2022062219/587276fb1a28abc7068b479f/html5/thumbnails/20.jpg)
Demo...