6.1 Upgrade Issue

Upgraded to OpenEMR 6.1 and when clicking on a patient, I get this error.

How do you fix it?

Query Error

ERROR: query failed: select pid, id, lname, fname, mname, suffix, providerID, DATE_FORMAT(DOB,’%m/%d/%Y’) as DOB_TS from patient_data where pid = ‘6’ order by lname ASC, fname ASC

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

/var/www/localhost/htdocs/openemr/library/patient.inc at 751:sqlStatement
/var/www/localhost/htdocs/openemr/library/patient.inc at 787:getPatientPID(Array)
/var/www/localhost/htdocs/openemr/src/OeUI/OemrUI.php at 76:getPatientFullNameAsString(6)
/var/www/localhost/htdocs/openemr/interface/patient_file/summary/demographics.php at 266:__construct(Array)

Hi @seddinger Did you run sql_upgrade script? That’s a new LBF field and I’m pretty sure we add to patient table in upgrade script.

Hi Jerry,

Yes, we ran that script during the upgrade to 6.1.0

Thanks,
Samuel Eddinger

It’s there so suggest you run again keeping an eye out for suffix:

#IfMissingColumn patient_data suffix
ALTER TABLE `patient_data` ADD COLUMN `suffix` TINYTEXT;
#EndIf

That worked Jerry, thanks again for your help!!

Samuel Eddinger

1 Like