Please help on some error between Openmrs and OpenELIS Atomfeed


I recently got some error report in Atomfeed, while trying to order some lab test in Openmrs:

ava.lang.RuntimeException: Patient with uuid ‘034b8a0f-a87c-4abd-81d2-35a9e4e4709c’ not found in ELISjava.lang.RuntimeException: java.lang.RuntimeException: Patient with uuid ‘034b8a0f-a87c-4abd-81d2-35a9e4e4709c’ not found in ELIS at at org.ict4h.atomfeed.client.service.AtomFeedClient.processFailedEvents( at org.bahmni.feed.openelis.feed.job.OpenELISFeedFailedEventsJob.processFailedEvents( at org.bahmni.feed.openelis.feed.job.OpenELISFeedFailedEventsJob.execute( at at org.quartz.simpl.SimpleThreadPool$ Caused by: java.lang.RuntimeException: Patient with uuid ‘034b8a0f-a87c-4abd-81d2-35a9e4e4709c’ not found in ELIS at org.bahmni.feed.openelis.feed.event.EncounterFeedWorker.getPatient( at org.bahmni.feed.openelis.feed.event.EncounterFeedWorker.createSample( at org.bahmni.feed.openelis.feed.event.EncounterFeedWorker.process( at org.bahmni.feed.openelis.feed.event.EncounterFeedWorker.process( at org.ict4h.atomfeed.client.service.AtomFeedClient$FailedEventProcessor.doInTransaction( at org.ict4h.atomfeed.transaction.AFTransactionWorkWithoutResult.execute( at

Please help for solution.

With Regards, Dararith

Hi, Can you reproduce this problem? If yes, how?

Hi Dararith,

Connect to ELIS database, and check the “failed_events” --> select * from failed_events; You also need to analyze the entries in failed_events table by reading the contents in “error_message” column in failed_events table and proceed accordingly, try by resetting the column “Retries” by reducing the value by 1 to begin with and check if the sync succeeds.

If none of the patient records are syncing to ELIS then check the “Markers” table --> select * from markers; Verify if columns “last_read_entry_id” and “feed_uri_for_last_read_entry” have the correct entries for corresponding feed_uri. Postman extension in chrome can be used to check for the latest atomfeeds or specific atomfeeds.

This Wiki link would also help:

1 Like

@darariddh -check that part of the error that says : “Patient with uuid ‘034b8a0f-a87c-4abd-81d2-35a9e4e4709c’ not found in ELIS

-The lab order can’t be synced to OpenELIS since it can’t find the corresponding patient there.

So, you need to find a way the patient can be synced to OpenELIS so that when the lab order gets there, it knows which patient it should be linked too.

-From the registration app, search for the patient and just click the “save” button (…if you don’t know the patient, just search for any patient and replace the uuid in the URL with the one you have in the error message). This should trigger sync for the patient, and when the patient is successfully synced to OpenELIS, reset the retry count for the failing event (…you can do this from the Atomfeed-Console)

@janux -You can perform the following steps to reproduce the error:

  1. Stop bahmni-lab service
  2. Create a new patient
  3. Delete the event in the event_records table that contains the newly created patient (… eg: delete from event_records where object like "%d36437f5-cd59-4cc3-b8c9-fac72d0e0e5f%")
  4. Start bahmni-lab service (…it won’t find the patient event as we’ve deleted it in step #3)
  5. Create a lab order for the newly created patient (…the lab order will fail to sync as it won’t find the patient in OpenELIS)

…hope that helps Cheers

1 Like