fix error patient index, still go to patients table

This commit is contained in:
mahdahar 2025-08-01 13:47:24 +07:00
parent d615bd72b6
commit e14fb138c1

View File

@ -24,7 +24,7 @@ class Patient extends Controller {
$startDate = $this->request->getVar('startDate');
$endDate = $this->request->getVar('endDate');
$builder = $this->db->table('patients');
$builder = $this->db->table('Patient');
if ($name !== null) {
$sql = "LOWER(CONCAT_WS(' ', IFNULL(prefix,''), IFNULL(name_first,''), IFNULL(name_middle,''), IFNULL(name_last,''), IFNULL(name_maiden,''), IFNULL(suffix,'')))";
@ -63,7 +63,7 @@ class Patient extends Controller {
} catch (\Exception $e) {
// Error Server Mengembalikan 500
return $this->failServerError('Something went wrong');
return $this->failServerError('Something went wrong.');
}
}
@ -72,7 +72,7 @@ class Patient extends Controller {
try {
$builder = $this->db->table('Patients');
$builder = $this->db->table('Patient');
$patient = $builder->where('PatientID', $id)->get()->getRowArray();
// Data pasien tidak ada mengembalikan - success 200