Login and navigate to patient chart
Click "Demographics Export"
Select all and download
At this point zip file is produced, containing
Now, go back to same or another patient chart and repeat the export steps to download another Zip file.
AuditLog.log and ExportEvent.log in each of the zip files should only show data related to that particular patient
AuditLog.log in the second export repeats same data as the first export plus audit data from the second export.
ExportEvent.log counts in the second export include counts from first export as well. That is, if first patient had 5 labs, and second patient had 3 labs, ExportEvent.log in second zip file will show 8, even though the CMS file in the same zip will only contain the 3 labs that belong to appropriate patient.
These audit log lines and export event count keep accumulating with each subsequent export. I did notice that if export is then tried few days later that first export of the day is "normal", so eventually something gets reset, but I haven't discovered a workaround to make these counts reset "on-demand". Of course, they should be reset automatically for each new export.
Is there a way to prevent AuditLog from being included in the exported Zip file? I can live with ExportEvent.log counts being inaccurate, but AuditLog growing to tens and hundreds of megabytes is more problematic when doing lots of exports in a row...
I realize that this may be an older build, so maybe some of this has been addressed, I don't have access to newer running version. But worth noting that ExportEvent.log counts accumulating seems to have been a problem for years now that I look at past export data.
So I did a bit of digging in the code, and my guess is that the following patch would fix the problem of AuditLog.log growing with every export. (this is against latest kai-stable-15 branch)
I don’t have experience with Java/JSP, but as I understand it, DemographicExportAction4.execute is invoked by the webserver every time single chart or demographic set export is requested. But the DemographicExportAction4 object is kept in memory, that is, not re-instantiated on every request, which leads to auditLog persisting all the entries between requests as well.
There could be other state that should be cleared between requests that should also be cleared. Perhaps there is a quick way to annotate the code so that we always get a fresh copy of DemoExportAction4? Alternatively, it probably makes sense to move all the business logic out of DemographicExportAction4 into a class that the Action would instantiate on every invocation?