Read about OpenEMR's Response to the COVID-19 Pandemic at https://www.open-emr.org/covid19/

SQL error when adding a patient's functional and cognitive status

Using OpenEMR 5.0.2 on Debian, I get an SQL error when adding a patient’s functional and cognitive status.

In a past encounter > clinical > functional and cognitive status > add some details and I get the followng every time:

"Query Error

ERROR: query failed: INSERT INTO form_functional_cognitive_status SET id = ?, pid = ?, groupname = ?, user = ?, encounter = ?, authorized = ?, activity = '?, code = ?, codetext = ?, description= ?, date = ?

Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘0’, code = ‘181007’, codetext = ‘Hemorrhagic bronchopneu’ at line 7

[…]/interface/forms/functional_cognitive_status/save.php at 80:sqlStatement"

There’s nothing in the OpenEMR log but I see the above in the Apache error log.

Can anyone help me to understrand what’s going wrong please?
Thanks

hi @PeteBoyd, see the typo 'before the ? after activity = ?

thank you for reporting, submitted PR

I see yes. Thank you for fixing. I’ve applied the fix to my own copies of OpenEMR.

1 Like