I found a behavior in the Clinical Notes form where the displayed Last Updated timestamp for older notes can change even when that specific note was NOT edited. From a documentation and legal standpoint, this can cause some problems.
form_clinical_notes.last_updated is defined with ON UPDATE CURRENT_TIMESTAMP, and save.php appears to re-save all notes in the form. If another save changes a field such as authorized, MariaDB updates last_updated for those older rows as well.
Example:
Note A created earlier
Note B added later
A save by a different user changes authorized
Note A’s last_updated now reflects the newer save time, even though Note A itself was not edited
This makes last_updated unreliable as a user-facing indication of when that individual Clinical Note was actually created or last intentionally edited.
I noticed this only appeared recently after the 8.0.0 upgrade.
Hi @ninjatx
I seem to recall someone has a PR for notes concerning save. I’ll track author down and see where it’s at.
If not, I find this very concerning and will look into once I get caught up a little.
Verified in production on OpenEMR 8.4.1. Saving an encounter without editing any clinical notes no longer changes their Last Updated timestamps or authorship. The fix is working correctly on my production server. Thank you so much!! @sjpadgett