FHM09062601IBL - load_klinik: tangkap SQL error di tests query untuk debug

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
sas.fajri
2026-06-12 13:38:04 +07:00
parent 83045fac9a
commit d0547e38bb

View File

@@ -4792,7 +4792,7 @@ GROUP BY T_SampleStationID ";
$rst['companies'] = $row_company ? [$row_company] : [];
// Tests dari order_detail_order — format identik registration_v37 selectPx
$detail_rows = $this->db_smartone->query(
$qry_detail = $this->db_smartone->query(
"SELECT odo.*,
spm.px_type,
spm.nat_test AS spm_nat_test,
@@ -4804,7 +4804,12 @@ GROUP BY T_SampleStationID ";
WHERE odo.orderDetailOrderOrderID = ? AND odo.orderDetailOrderIsActive = 'Y'
ORDER BY odo.orderDetailOrderID ASC",
[$row_header['orderID']]
)->result_array();
);
if (!$qry_detail) {
$this->sys_error_db("tests query: " . $this->db_smartone->error()['message'], $this->db_smartone);
exit;
}
$detail_rows = $qry_detail->result_array();
$tests = [];
foreach ($detail_rows as $d) {