CMS Demographics Export: ExportEvent.log and AuditLog.log accumulate data with each successive export

Preconditions

N/A

Steps to Reproduce

  • Login and navigate to patient chart

  • Click "Demographics Export"

  • Select all and download

At this point zip file is produced, containing
AuditLog.log
ExportEvent.log
PATIENT_NAME_ID.xml
ReadMe.txt

Now, go back to same or another patient chart and repeat the export steps to download another Zip file.

Expected Result

AuditLog.log and ExportEvent.log in each of the zip files should only show data related to that particular patient

Observed Result

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.

Additional Comments

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.

Activity

Show:
Slobodan Mišković
August 17, 2020, 2:40 AM

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?

Thanks!

Assignee

Unassigned

Reporter

Slobodan Mišković

Labels

None

OSCAR Build Date

2019/03/27

OSCAR Build Tag

OSCAR Pro BC S-20.06.24-163955

Client Browser

Firefox

Client OS

Windows 7

Are you or your organization planning on submitting a fix for this bug in the next 30 days?

No

Validated by Reporter

No

SourceForge Link

None

SourceForge Reporter

None

SourceForge Assigned To

None

SourceForge Date Created

None

SourceForge ID

None

Priority

5 (Default)
Configure