ERROR: query failed: INSERT INTO issue_encounter ( pid, list_id, encounter ) VALUES (?,?,?)

image
Above error occurs when I save an Encounter with Allergies, Problems, Medications


[Sample Patient Data. No PHI]

OpenEMR 7.0.0 Installed on Ubuntu Server with MySQL database. Latest Patch has been applied.

Hi Arun Kumar,
Sometime issuelist id value is empty so this error throw.You can change code below like this in interface\forms\newpatient\save.php file
You can resolve the issue.

if (!empty($_POST[‘issues’]) && is_array($_POST[‘issues’]))
{
sqlStatement("DELETE FROM issue_encounter WHERE " .
“pid = ? AND encounter = ?”, array($pid, $encounter));
foreach ($_POST[‘issues’] as $issue) {
if($issue!=’’){
$query = “INSERT INTO issue_encounter ( pid, list_id, encounter ) VALUES (?,?,?)”;
sqlStatement($query, array($pid, $issue, $encounter));
}
}
}

Thanks
Param
help@capminds.com

Hi @learnhl7-arun , if you can reproduce the issue on a demo and would like to start an issue on github detailing the steps you took that would be great.