I have been trying to add some new fields to the history layout to collect a bit more info about patient history. I was able to add several fields to existing groups successfully. Then, I wanted to create a new group. I named the group and entered the first field successfully. Then, when I entered a second field, everything went haywire. I received the error message:
ERROR: query failed: ALTER TABLE history_data ADD `` TEXT NOT NULL
Error: Incorrect column name ‘’
Now, if I go back to the patient history and try to updated it, it will not write successfully to the history_data table. Additionally, if I now go to the Demographics layout, the same errors pops up when trying to add new fields to new groups (but I CAN successfully update and save changes to patient demographics). I believe there is something wrong with the layout_options table, since when I look into the actual table, there are two fields that don’t have any values in them (including the field_id, which should not be possible). It might also be a problem with the history_data table, or the communication between the two.
Any ideas for how to fix? I am running version 4.1.1(14). Thanks so much for your time and assistance!
The History and Demographics Layouts are very “touchy” because they are vital components of the application. It is best not to fool with them, unless one is a pro. I crashed the 4.1.1 Demo once, by experimenting in the Demographics Layout.
As suggested by Kevin in the other thread, try to restore the original layouts. Tactically that seems the more likely solution.
If the layouts cannot be restored and the tables cannot be corrected, then restoration with a pre-customization backup and re-entry of post-customization data will have to be contemplated.
After you’ve sorted this problem out, adding Issues (which is easier in 4.1.2(1)), should cause you less grief. Entries in History are hidden for the most part. Family history is not readily available. A thumbnail sketch as another Issue box would be more visible and therefore more useful.
When possible experiment in the corresponding Demo before touching your copy. The Demo is reset every day, therefore if damaged by us, it will “resurrect”. Taking this extra step is better than having Coronary Arterial Spasm seeing your stuff toasted.
Daily backups can never be overly stressed. They truly save one’s bacon!