From e14fb138c111f99880373af2423c805d95f8a211 Mon Sep 17 00:00:00 2001 From: mahdahar <89adham@gmail.com> Date: Fri, 1 Aug 2025 13:47:24 +0700 Subject: [PATCH] fix error patient index, still go to patients table --- app/Controllers/Patient.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Controllers/Patient.php b/app/Controllers/Patient.php index aec8aca..90f0a84 100644 --- a/app/Controllers/Patient.php +++ b/app/Controllers/Patient.php @@ -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