Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Bahmni uses an Atom Feed based framework created by ThoughtWorks ICT4H team for data synchronization between OpenMRS, OpenELIS and OpenERP (in fact also with Reference Data app). For more information on this read:
The tables used in Atom Feed are:
Table Name | Description |
---|---|
event_records | (PUBLISHER) This tables holds the list of events which are to be published by Atom Feed for others to consume. The category column is used to indicate the event types (like patient, encounter, etc). Note: For the same patient updates there might be multiple rows. So to see unique rows: "select distinct object from event_records where category = 'patient';" |
markers | (CONSUMER) This table holds marker entries to indicate the records which have ALREADY been processed. |
event_records_offset_marker | (CONSUMER) This table holds cached records for faster event process by the CONSUMER. |
failed_events | (CONSUMER) This table holds the list of events which failed and could not be consumed. They are retried later by a different event handler. |
Different Components like OpenMRS, OpenERP and OpenELIS are kept in Sync using the "Atom Feed Based Synchronization". The following is the depiction:
Lets take an example of Drug creation in bahmni. The following are the sequence of events:
- Administrators create Drugs using OpenMRS or using the "CSV Upload" feature on Bahmni's Admin module
- Once the drug is created, an event is published (more technical details in the github links above)
- The "OpenERP atom feed service" contains batch jobs that are scheduled to consume these atom feed events.
- The job then creates an event in OpenERP.