Delete patient gives error related to the ID of the record

Hi mohammad alsharabi,
I face same issue then i added it like this,

elseif($formdir == ‘HIS’){
sqlStatement(“DELETE FROM forms WHERE pid=? AND formdir=‘HIS’”,array($patient_id));
}
elseif($formdir == ‘obstetrics_gynecology’){
sqlStatement(“DELETE FROM forms WHERE pid=? AND formdir=‘obstetrics_gynecology’”,array($patient_id));
}
else {
row_delete(“form_$formdir”, “id = '” . add_escape_custom($formid) . “’”);
}

Thanks
Param
help@capminds.com

1 Like

thanks @Param_CapMinds , thinking this PR is the way to go.