lh-ehr
lh-ehr copied to clipboard
Cannot Save Patient’s Edited History
A) Outreachy Username: maggie.negm B) Issue Title: Cannot Save Patient’s Edited History C) Report Date: 04/15/2019 D) Sites Affected: Documentation Site E) OS/Browser Used: Chrome and Firefox browsers in Linux OS F) EHR Workflow Module: Patient Profile, Patient/History Lifestyle G) Steps to Reproduce the Issue:
- Go to a patient’s profile.
- Click on the “History” link under the patient’s name.
- Click on the “Edit” button.
- Fill out the form as needed, and then click the “Save” button.
H) Expected Behavior: The patient’s edited history is successfully saved.
I) What Actually Happened: Once the “Save” button is clicked, an error message shows up.
J) Screenshots with Explanation:
In the patient’s profile, click the “History” link.
Once the “Patient History/Lifestyle” module is loaded, click the “Edit” button.
After filling out the forms to edit a patient’s history, click the “Save” button.
The following is the error message that is encountered after hitting “Save”:
K) Estimation of Severity: module's function ceases at this point or crashes/ disables the EHR itself
(This issue was submitted twice before, but both issues are now closed: Issue #881 & Issue #964.)
Error: Unknown column 'usertext11' in 'field list' Seems to reference these two files: /opt/ehr/library/patient.inc at 1490:sqlInsert /opt/ehr/interface/patient_file/history/history_save.php at 42:updateHistoryData(84,Array)
It ends at risk factors. Not sure of what that usertext11 means.
On Tue, Apr 16, 2019 at 2:48 PM Toni Shortsleeve [email protected] wrote:
Error: Unknown column 'usertext11' in 'field list' Seems to reference these two files: /opt/ehr/library/patient.inc at 1490:sqlInsert /opt/ehr/interface/patient_file/history/history_save.php at 42:updateHistoryData(84,Array)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LibreHealthIO/lh-ehr/issues/1467#issuecomment-483666709, or mute the thread https://github.com/notifications/unsubscribe-auth/APl-XiEVjBHiN2Fx2KFw9XIxMyQo80uNks5vhdSlgaJpZM4cxQCg .
Yes @muarachmann According to the other two posts, it should not be calling 'usertext11'. I think it was supposed to be renamed to "riskFactors" or something similar.
usertext11 is a junk chunk of the database. I don't want to go into what it was originally, but it was like a "sample custom field" thing about 20 years ago, and got hijacked by lazy slob devs and used, then hard-coded, and now should die. Same thing happened with some other fields in the patient_data table. I think I am going to do a review, and since the protests from changing that table have died down, I think we need to pare out anything not hard-coded or required, and anything that assumes a field that is not an absolute required field (lots of things need it), then no tool should every enumerate it and just assume the field exists. patient_data table has user-configurable fields, and too many columns anyway. All user-configurable patient_data fields via the Administration/Layout editor should be moved to a second table, and the absolutely required ones should be protected (yet the labels still renamable).
Difficulty is in the demographics display engine (Layout engine). Getting it to look at two tables at once was never really part of the concept.
I understand. Elizabeth had been looking at the ACL with the thought in mind of cleaner namespace. She's supposed to have a wrap-up report to me at the end of the week. Would you like her to work with you on this?
I think Elizabeth should choose her own team, but yes, I would like to be on it, or at least consult in her write-up. The GACL asset/tool in the application is something like 17 years old. Still uses smarty templates, is huge, and does very little in the application. The whole ACL scheme needs refactoring. This is no small thing, but actually implementing to the limit we are using it is quite simple...we never used GACL to any great extent, it has just gummed up development. That Facility ACL PR I have up is part of the ACL functionality we need. Basically, it comes down to Patient, Facility, Context, then feature access. We have a couple of pieces of that concept missing, and the rest out of priority order. Needs a project @Ngai-E
This issue is different. This is just a case of someone requiring fields that may not always exist, instead of asking the database which ones exist first.
Is this the Document install? IF so, then there is probably a bad thingie with the database used for that. This is probably a configuration of Administration/Layout/Demographics. usertext11 no longer exists in the database, and is only called with "ifexists" functions within a couple of old features that cannot be accessed, and need to be deleted (files with "ippf" in them.)
If I remember right, this was a checklist that could checked to add to the patient history. As if he just remembered he was once told he had hypertension, but had ignored it until now. So we want to update the record by checking "hypertension". This is the error that was shown.
So I do agree that it is probably in the function that looks to see if that field exists.