how to advance syncing to the last published ATOMFeed page?

Environment Bahmni 0.92. As per this wiki

http://localhost:8052/openelis/ws/feed/patient/recent

shows the last published page by OpenELIS (as publisher) and markers table in OpenMRS (as subscriber) database holds the last synced page from OpenELIS

In our case, most recent page published by OpenELIS (as publisher) is as 55417 (found using the above url …/patient/recent) and markers table in OpenMRS (as subscriber) shows the last synced pagee as 2318.

We do not need to sync the past data from OpenELIS to OpenMRS, so, we set the markers table in OpenMRS side to the most recent published page (55417) of OpenELIS along with the appropriate ATOM feed tag using SQL Update.

We noticed that, after some time markers table in OpenMRS goes back to page 2318 and start syncing from thier instead of most recent page that was set manually

Question

  1. Is there any way to advance the OpenMRS (as subscriber) directly to start syncing only the new data that is to the most recent published page of OpenELIS?
  2. Does OpenMRS, markers table get populated from event_records_offset_marker?

I found the solution to advance the syncing from openelis to openmrs directly to the most recent published page by openlis

  1. stop the openmrs service

  2. get the most recent page and the related tag of the last entry from http://localhost:8052/openelis/ws/feed/patient/recent as highlighted in the image

  3. login to mysql openmrs database

  4. update markers table with the most recent page and the related tag

    update markers set last_read_entry_id = 'tag:atomfeed.ict4h.org:5de9b48a-1093-4cd9-9a6d-ca1c4e9f75f2', feed_uri_for_last_read_entry = 'http://localhost:8052/openelis/ws/feed/patient/55071';
    
  5. Start the openmrs service

Now openmrs will start syncing from the most recent page of openelis

1 Like