LBF add field to Demographics and update error

Hello,
I added a field to the employer section of the Demographics layout.

Seemed to work fine. But when I enter a value while in a patient screen I receive an error message that field does not exist in the employer_data table.

Do I need to alter that table to add the field ? If so how would I preserve the change across updates?

Thanks

====

Query Error

ERROR: insert failed: INSERT INTO employer_data SET name = ‘’, street = ‘’, street_line_2 = ‘’, city = ‘’, state = ‘’, postal_code = ‘’, country = ‘’, DOI = ‘2011-05-01’, pid = ‘2448’, date = NOW()

Error: Unknown column ‘DOI’ in ‘field list’

/var/www/html/openemr-7.0.2/library/patient.inc.php at 1275:sqlInsert
/var/www/html/openemr-7.0.2/interface/patient_file/summary/demographics_save.php at 88:updateEmployerData(2448,Array)

In case someone else con\mes across this problem it was answered in the support category:

Jerry PsjpadgettLeader

(Demo Version Adding field to Demographics Layout not working - #2 by sjpadgett)

You’ll want to remove the prefix em_ from ID i.e em_DOI to just DOI.
The prefix tells save to save to employer_data table instead of patient_data which in your case is better than moding table

1 Like