Error when deleting an encounter

I have upgraded the system from version 5.0.2 to 7.0.2.getting this error when trying to delete an encounter.“There was an OpenEMR SQL Escaping ERROR of the following string form_progressNote” .