diff --git a/application/controllers/mockup/fo/resultemailv7/Patient.php b/application/controllers/mockup/fo/resultemailv7/Patient.php index 32e34c3f..358c8356 100644 --- a/application/controllers/mockup/fo/resultemailv7/Patient.php +++ b/application/controllers/mockup/fo/resultemailv7/Patient.php @@ -418,7 +418,8 @@ class Patient extends MY_Controller $extra_params[] = '%' . $name . '%'; } if ($nolab != '') { - $extra_where .= ' AND toh.T_OrderHeaderLabNumber LIKE ?'; + $extra_where .= ' AND (toh.T_OrderHeaderLabNumber LIKE ? OR tse.T_SendEmailPatientName LIKE ?)'; + $extra_params[] = '%' . $nolab . '%'; $extra_params[] = '%' . $nolab . '%'; } if ($company > 0) {