Please help on some error between Openmrs and OpenELIS Atomfeed

Hello,

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 org.bahmni.feed.openelis.feed.transaction.support.AtomFeedHibernateTransactionManager.executeWithTransaction(AtomFeedHibernateTransactionManager.java:51) at org.ict4h.atomfeed.client.service.AtomFeedClient.processFailedEvents(AtomFeedClient.java:98) at org.bahmni.feed.openelis.feed.job.OpenELISFeedFailedEventsJob.processFailedEvents(OpenELISFeedFailedEventsJob.java:37) at org.bahmni.feed.openelis.feed.job.OpenELISFeedFailedEventsJob.execute(OpenELISFeedFailedEventsJob.java:30) at org.quartz.core.JobRunShell.run(JobRunShell.java:207) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560) 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(EncounterFeedWorker.java:373) at org.bahmni.feed.openelis.feed.event.EncounterFeedWorker.createSample(EncounterFeedWorker.java:224) at org.bahmni.feed.openelis.feed.event.EncounterFeedWorker.process(EncounterFeedWorker.java:170) at org.bahmni.feed.openelis.feed.event.EncounterFeedWorker.process(EncounterFeedWorker.java:152) at org.ict4h.atomfeed.client.service.AtomFeedClient$FailedEventProcessor.doInTransaction(AtomFeedClient.java:251) at org.ict4h.atomfeed.transaction.AFTransactionWorkWithoutResult.execute(AFTransactionWorkWithoutResult.java:6) at org.bahmni.feed.openelis.feed.transaction.support.AtomFeedHibernateTransactionManager.executeWithTransaction(AtomFeedHibernateTransactionManager.java:42)

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: https://bahmni.atlassian.net/wiki/pages/viewpage.action?pageId=37945615

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