Check which user deleted the enrollments in Tracker Capture

In the tracker app, someone accidentally delete the enrollments in program stages. Is there any way to see who deleted the enrollments? is there any logs maintained?

NGINX access shows fews logs about deletion but how can i verify which patient was deleted with this info?

Hi @sthrohit,

Welcome to the community! Could you please provide the following information to help us understand your case?

  • Which version of dhis2 are you using?
  • Do you have allowAuditLog property set to true on your tracker program? If so, you can see the enrollment log by using the endpoint /api/audits/enrollment.json?startDate=2018-03-01&endDate=2018-04-24.

By default, enrollments are soft-deleted. If you haven’t performed hard deletion using /maintenance endpoint, it’s not lost, so you still have a chance to recover it. You might want to try this endpoint: /api/enrollments/includeDeleted=true&ou=DiszpKrYNg8&trackedEntityInstance=$instanceId

1 Like

Hi @sthrohit.

It is not clear to me if you want to check the user that deleted (from your first question) or the patient that was deleted or the enrollment.

Anyway, you can see which was the user if you match that nginx log with the dhis2.log. So take the time from the nginx log and the match it with the dhis2.log

Hi Gintare,
I am using 2.33.3 version of dhis & haven’t set allowAuditLog though might be true by default as you said.

hello Jaime,
How can i access dhis2.log?

Also, how can see if the audit History is enabled/not ?

You can find them, by default, in your Tomcat folder