Add MCU participant daily refresh SP

This commit is contained in:
sas.fajri
2026-05-05 09:41:04 +07:00
parent 62254ff40c
commit 8e4a9f50b5
3 changed files with 157 additions and 0 deletions

View File

@@ -569,6 +569,24 @@ class Preregisterv3 extends MY_Controller
$this->sys_error("update mcu_preregister_patients : ".$last_qry);
exit;
}
$qry_sync_patient = $this->db->query(
"CALL cpone.sp_upsert_mcu_patient_by_preregister_id(?)",
array($last_id_x)
);
if (!$qry_sync_patient) {
$last_qry = $this->db->last_query();
$this->db->trans_rollback();
$this->sys_error("call sp_upsert_mcu_patient_by_preregister_id : " . $last_qry);
exit;
}
if (isset($this->db->conn_id) && $this->db->conn_id instanceof mysqli) {
while ($this->db->conn_id->more_results() && $this->db->conn_id->next_result()) {
$dummyResult = $this->db->conn_id->store_result();
if ($dummyResult instanceof mysqli_result) {
$dummyResult->free();
}
}
}
}
}
}