diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 32d9969..97419aa 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -32,10 +32,12 @@ $routes->group('admin', ['filter' => 'role:1'], function($routes) { $routes->group('doctor', ['filter' => 'role:2'], function($routes) { $routes->get('/', 'Doctor::index'); + $routes->get('modal_specimen', 'Doctor::modal_specimen'); }); $routes->group('analyst', ['filter' => 'role:3'], function($routes) { $routes->get('/', 'Analyst::index'); + $routes->get('modal_specimen', 'Analyst::modal_specimen'); }); $routes->group('cs', ['filter' => 'role:4'], function($routes) { diff --git a/app/Controllers/Admin.php b/app/Controllers/Admin.php index 95008a9..db43355 100644 --- a/app/Controllers/Admin.php +++ b/app/Controllers/Admin.php @@ -66,11 +66,11 @@ class Admin extends BaseController { 'isprinted'=> $row['ODR_ISPRINTED'] ?? 0, 'ispending'=> $row['ODR_ISPENDING'] ?? 0, 'ishardcopy'=> $row['ODR_NFLAGHARDCOPY'] ?? 0, - 'isval' => $row['ISVAL'] ?? 0, - 'isval1' => $row['ISVAL1'] ?? 0, - 'isval2' => $row['ISVAL2'] ?? 0, + 'isvaltd' => $row['ISVAL'] ?? 0, + // 'isval1' => $row['ISVAL1'] ?? 0, + // 'isval2' => $row['ISVAL2'] ?? 0, 'isdelete' => $isDelete, - 'val' => $row['VAL'] ?? 0, + 'valcounter' => $row['VAL'] ?? 0, 'val1user' => $row['VAL1USER'] ?? '-', 'val2user' => $row['VAL2USER'] ?? '-', ]; diff --git a/app/Controllers/Analyst.php b/app/Controllers/Analyst.php index 3c89f5a..1966ab2 100644 --- a/app/Controllers/Analyst.php +++ b/app/Controllers/Analyst.php @@ -3,9 +3,113 @@ namespace App\Controllers; class Analyst extends BaseController { - public function index() - { - return view('analyst/index'); + public function index() { + $today = date('Y-m-d'); + $date1 = $this->request->getVar('date1') ?? $today; + $date2 = $this->request->getVar('date2') ?? $today; + + $db = \Config\Database::connect(); + $sql = "SELECT * from GDC_CMOD.dbo.V_DASHBOARD_DEV + where COLLECTIONDATE between '$date1 00:00' and '$date2 23:59' and ODR_DDATE between '$date1 00:00' and '$date2 23:59'"; + $query = $db->query($sql); + $results = $query->getResultArray(); + + // === Variabel counter === + $CPending = 0; $CPColl = 0; $CColl = 0; $CPRecv = 0; + $CRecv = 0; $CInc = 0; $CPenV = 0; $CFin = 0; $CFinV = 0; + $CTotal = 0; + + $dataList = []; + + foreach ($results as $row) { + $reqdate = ''; + if (!empty($row['REQDATE'])) { + $reqdate = date('Y-m-d H:i', strtotime($row['REQDATE'])); + } + $patname = $row['Name'] ?? ''; + $sp_accessnumber = $row['SP_ACCESSNUMBER'] ?? ''; + $hostordernumber = $row['HOSTORDERNUMBER'] ?? ''; + $stats = $row['STATS'] ?? ''; + $tests = $row['TESTS'] ?? ''; + $isDelete = $row['ISDELETE'] ?? 0; + + // Bersihkan test string + $test = str_replace(['(', ')', ',', 'FA'], '', $tests); + + if (!is_numeric($test) && $isDelete == 0) { + switch ($stats) { + case 'Pend': $statscode = 1; $CPending++; break; + case 'PartColl':$statscode = 2; $CPColl++; break; + case 'Coll': $statscode = 3; $CColl++; break; + case 'PartRecv':$statscode = 4; $CPRecv++; break; + case 'Recv': $statscode = 5; $CRecv++; break; + case 'Inc': $statscode = 6; $CInc++; break; + case 'PenV': $statscode = 7; $CPenV++; break; + case 'Fin': $statscode = 8; $CFin++; break; + case 'FinV': $statscode = 9; $CFinV++; break; + default: $statscode = 0; break; + } + $CTotal++; + // Simpan ke array + $dataList[] = [ + 'statscode' => $statscode, + 'reqdate' => $reqdate, + 'patname' => $patname, + 'sp_accessnumber' => $sp_accessnumber, + 'hostordernumber' => $hostordernumber, + 'reff' => $row['REFF'] ?? '', + 'doc' => $row['DOC'] ?? '', + 'tests' => $row['TESTS'] ?? '', + 'stats' => $stats, + 'odr_cresult_to' => $row['ODR_CRESULT_TO'], + 'isprinted'=> $row['ODR_ISPRINTED'] ?? 0, + 'ispending'=> $row['ODR_ISPENDING'] ?? 0, + 'ishardcopy'=> $row['ODR_NFLAGHARDCOPY'] ?? 0, + 'isvaltd' => $row['ISVAL'] ?? 0, + // 'isval1' => $row['ISVAL1'] ?? 0, + // 'isval2' => $row['ISVAL2'] ?? 0, + 'isdelete' => $isDelete, + 'valcounter' => $row['VAL'] ?? 0, + 'val1user' => $row['VAL1USER'] ?? '-', + 'val2user' => $row['VAL2USER'] ?? '-', + ]; + + } + } + + // === Total counter === + $counter = [ + 'pending' => $CPending, + 'collect' => $CPColl+$CColl, + 'recv' => $CPRecv+$CRecv, + 'incomplete' => $CInc+$CPenV, + 'complete' => $CFin+$CFinV, + 'total' => $CTotal, + /* + 'partialCollected' => $CPColl, + 'collected' => $CColl, + 'partialReceived' => $CPRecv, + 'received' => $CRecv, + 'incomplete' => $CInc, + 'pendingValidation' => $CPenV, + 'final' => $CFin, + 'finalValidation' => $CFinV, + */ + ]; + + $data['dataList'] = $dataList; + $data['counter'] = $counter; + $data['date1'] = $date1; + $data['date2'] = $date2; + + // dd($results); + + + return view('analyst/index', $data); + } + + public function modal_specimen() { + return view('analyst/modal_specimen'); } } diff --git a/app/Controllers/Auth.php b/app/Controllers/Auth.php index 9ce77c2..40139d9 100644 --- a/app/Controllers/Auth.php +++ b/app/Controllers/Auth.php @@ -19,11 +19,22 @@ class Auth extends BaseController { $user = $query->getRowArray(); if ($user && !empty($user['PASSWORD']) && password_verify($password, $user['PASSWORD'])) { + + // Role untuk url + switch ((int)$user['USERLEVEL']) { + case 1: $role = 'admin'; break; + case 2: $role = 'doctor'; break; + case 3: $role = 'analyst'; break; + case 4: $role = 'cs'; break; + default: $role = ''; break; + } + // Simpan session $session->set([ 'isLoggedIn' => true, 'userid' => (string) $user['USERID'], 'userlevel' => (int) $user['USERLEVEL'], + 'userrole' => (string) $role, ]); // Redirect sesuai level dari data didatabase diff --git a/app/Controllers/CustomerService.php b/app/Controllers/CustomerService.php index 818994c..21fba42 100644 --- a/app/Controllers/CustomerService.php +++ b/app/Controllers/CustomerService.php @@ -3,9 +3,109 @@ namespace App\Controllers; class CustomerService extends BaseController { - public function index() - { - return view('cs/index'); + public function index() { + $today = date('Y-m-d'); + $date1 = $this->request->getVar('date1') ?? $today; + $date2 = $this->request->getVar('date2') ?? $today; + + $db = \Config\Database::connect(); + $sql = "SELECT * from GDC_CMOD.dbo.V_DASHBOARD_DEV + where COLLECTIONDATE between '$date1 00:00' and '$date2 23:59' and ODR_DDATE between '$date1 00:00' and '$date2 23:59'"; + $query = $db->query($sql); + $results = $query->getResultArray(); + + // === Variabel counter === + $CPending = 0; $CPColl = 0; $CColl = 0; $CPRecv = 0; + $CRecv = 0; $CInc = 0; $CPenV = 0; $CFin = 0; $CFinV = 0; + $CTotal = 0; + + $dataList = []; + + foreach ($results as $row) { + $reqdate = ''; + if (!empty($row['REQDATE'])) { + $reqdate = date('Y-m-d H:i', strtotime($row['REQDATE'])); + } + $patname = $row['Name'] ?? ''; + $sp_accessnumber = $row['SP_ACCESSNUMBER'] ?? ''; + $hostordernumber = $row['HOSTORDERNUMBER'] ?? ''; + $stats = $row['STATS'] ?? ''; + $tests = $row['TESTS'] ?? ''; + $isDelete = $row['ISDELETE'] ?? 0; + + // Bersihkan test string + $test = str_replace(['(', ')', ',', 'FA'], '', $tests); + + if (!is_numeric($test) && $isDelete == 0) { + switch ($stats) { + case 'Pend': $statscode = 1; $CPending++; break; + case 'PartColl':$statscode = 2; $CPColl++; break; + case 'Coll': $statscode = 3; $CColl++; break; + case 'PartRecv':$statscode = 4; $CPRecv++; break; + case 'Recv': $statscode = 5; $CRecv++; break; + case 'Inc': $statscode = 6; $CInc++; break; + case 'PenV': $statscode = 7; $CPenV++; break; + case 'Fin': $statscode = 8; $CFin++; break; + case 'FinV': $statscode = 9; $CFinV++; break; + default: $statscode = 0; break; + } + $CTotal++; + // Simpan ke array + $dataList[] = [ + 'statscode' => $statscode, + 'reqdate' => $reqdate, + 'patname' => $patname, + 'sp_accessnumber' => $sp_accessnumber, + 'hostordernumber' => $hostordernumber, + 'reff' => $row['REFF'] ?? '', + 'doc' => $row['DOC'] ?? '', + 'tests' => $row['TESTS'] ?? '', + 'stats' => $stats, + 'odr_cresult_to' => $row['ODR_CRESULT_TO'], + 'isprinted'=> $row['ODR_ISPRINTED'] ?? 0, + 'ispending'=> $row['ODR_ISPENDING'] ?? 0, + 'ishardcopy'=> $row['ODR_NFLAGHARDCOPY'] ?? 0, + 'isvaltd' => $row['ISVAL'] ?? 0, + // 'isval1' => $row['ISVAL1'] ?? 0, + // 'isval2' => $row['ISVAL2'] ?? 0, + 'isdelete' => $isDelete, + 'valcounter' => $row['VAL'] ?? 0, + 'val1user' => $row['VAL1USER'] ?? '-', + 'val2user' => $row['VAL2USER'] ?? '-', + ]; + + } + } + + // === Total counter === + $counter = [ + 'pending' => $CPending, + 'collect' => $CPColl+$CColl, + 'recv' => $CPRecv+$CRecv, + 'incomplete' => $CInc+$CPenV, + 'complete' => $CFin+$CFinV, + 'total' => $CTotal, + /* + 'partialCollected' => $CPColl, + 'collected' => $CColl, + 'partialReceived' => $CPRecv, + 'received' => $CRecv, + 'incomplete' => $CInc, + 'pendingValidation' => $CPenV, + 'final' => $CFin, + 'finalValidation' => $CFinV, + */ + ]; + + $data['dataList'] = $dataList; + $data['counter'] = $counter; + $data['date1'] = $date1; + $data['date2'] = $date2; + + // dd($results); + + + return view('cs/index', $data); } } diff --git a/app/Controllers/Doctor.php b/app/Controllers/Doctor.php index e8f4aa4..9896980 100644 --- a/app/Controllers/Doctor.php +++ b/app/Controllers/Doctor.php @@ -3,9 +3,113 @@ namespace App\Controllers; class Doctor extends BaseController { - public function index() - { - return view('doctor/index'); + public function index() { + $today = date('Y-m-d'); + $date1 = $this->request->getVar('date1') ?? $today; + $date2 = $this->request->getVar('date2') ?? $today; + + $db = \Config\Database::connect(); + $sql = "SELECT * from GDC_CMOD.dbo.V_DASHBOARD_DEV + where COLLECTIONDATE between '$date1 00:00' and '$date2 23:59' and ODR_DDATE between '$date1 00:00' and '$date2 23:59'"; + $query = $db->query($sql); + $results = $query->getResultArray(); + + // === Variabel counter === + $CPending = 0; $CPColl = 0; $CColl = 0; $CPRecv = 0; + $CRecv = 0; $CInc = 0; $CPenV = 0; $CFin = 0; $CFinV = 0; + $CTotal = 0; + + $dataList = []; + + foreach ($results as $row) { + $reqdate = ''; + if (!empty($row['REQDATE'])) { + $reqdate = date('Y-m-d H:i', strtotime($row['REQDATE'])); + } + $patname = $row['Name'] ?? ''; + $sp_accessnumber = $row['SP_ACCESSNUMBER'] ?? ''; + $hostordernumber = $row['HOSTORDERNUMBER'] ?? ''; + $stats = $row['STATS'] ?? ''; + $tests = $row['TESTS'] ?? ''; + $isDelete = $row['ISDELETE'] ?? 0; + + // Bersihkan test string + $test = str_replace(['(', ')', ',', 'FA'], '', $tests); + + if (!is_numeric($test) && $isDelete == 0) { + switch ($stats) { + case 'Pend': $statscode = 1; $CPending++; break; + case 'PartColl':$statscode = 2; $CPColl++; break; + case 'Coll': $statscode = 3; $CColl++; break; + case 'PartRecv':$statscode = 4; $CPRecv++; break; + case 'Recv': $statscode = 5; $CRecv++; break; + case 'Inc': $statscode = 6; $CInc++; break; + case 'PenV': $statscode = 7; $CPenV++; break; + case 'Fin': $statscode = 8; $CFin++; break; + case 'FinV': $statscode = 9; $CFinV++; break; + default: $statscode = 0; break; + } + $CTotal++; + // Simpan ke array + $dataList[] = [ + 'statscode' => $statscode, + 'reqdate' => $reqdate, + 'patname' => $patname, + 'sp_accessnumber' => $sp_accessnumber, + 'hostordernumber' => $hostordernumber, + 'reff' => $row['REFF'] ?? '', + 'doc' => $row['DOC'] ?? '', + 'tests' => $row['TESTS'] ?? '', + 'stats' => $stats, + 'odr_cresult_to' => $row['ODR_CRESULT_TO'], + 'isprinted'=> $row['ODR_ISPRINTED'] ?? 0, + 'ispending'=> $row['ODR_ISPENDING'] ?? 0, + 'ishardcopy'=> $row['ODR_NFLAGHARDCOPY'] ?? 0, + 'isvaltd' => $row['ISVAL'] ?? 0, + // 'isval1' => $row['ISVAL1'] ?? 0, + // 'isval2' => $row['ISVAL2'] ?? 0, + 'isdelete' => $isDelete, + 'valcounter' => $row['VAL'] ?? 0, + 'val1user' => $row['VAL1USER'] ?? '-', + 'val2user' => $row['VAL2USER'] ?? '-', + ]; + + } + } + + // === Total counter === + $counter = [ + 'pending' => $CPending, + 'collect' => $CPColl+$CColl, + 'recv' => $CPRecv+$CRecv, + 'incomplete' => $CInc+$CPenV, + 'complete' => $CFin+$CFinV, + 'total' => $CTotal, + /* + 'partialCollected' => $CPColl, + 'collected' => $CColl, + 'partialReceived' => $CPRecv, + 'received' => $CRecv, + 'incomplete' => $CInc, + 'pendingValidation' => $CPenV, + 'final' => $CFin, + 'finalValidation' => $CFinV, + */ + ]; + + $data['dataList'] = $dataList; + $data['counter'] = $counter; + $data['date1'] = $date1; + $data['date2'] = $date2; + + // dd($results); + + + return view('doctor/index', $data); + } + + public function modal_specimen() { + return view('doctor/modal_specimen'); } } diff --git a/app/Views/admin/index.php b/app/Views/admin/index.php index bda7129..fa7bcef 100644 --- a/app/Views/admin/index.php +++ b/app/Views/admin/index.php @@ -7,7 +7,7 @@ section('content') ?>
-
Dashboard
+
Dashboard,
Hi, @@ -114,10 +114,15 @@ +
- Printed + + Printed
+ Eng + + @@ -126,27 +131,37 @@ - - - - - - - - - + + + get('userid'); + $val1 = $row['val1user']; + $val2 = $row['val2user']; + + $valButton = (($val1 === '-') || ($val2 === '-')) && ($user !== $val1 && $user !== $val2); + $unvalButton = ($val1 !== '-') || ($val2 !== '-'); + ?> + + + + + + +
2 :
- - - - -
- Ind - Eng - Pdf
-
+ + + + + + + +
- + + + + diff --git a/app/Views/admin/modal_request.php b/app/Views/admin/modal_request.php index 291f015..c0bb9e9 100644 --- a/app/Views/admin/modal_request.php +++ b/app/Views/admin/modal_request.php @@ -2,6 +2,7 @@
val : -
+
diff --git a/app/Views/analyst/index.php b/app/Views/analyst/index.php index 36034d5..bcd314f 100644 --- a/app/Views/analyst/index.php +++ b/app/Views/analyst/index.php @@ -1,172 +1,285 @@ - extend('_layouts/main.php') ?> section('title') ?> - Analyst Glenlis +Analyst Glenlis endSection() ?> section('content') ?> - -
-
-
-
-
-

- -

-
-
-
'> -
-
- Date : -
- -
- -
- -
-
- -
- -
- -
- -
- -
- -
-
-
-
-
-
- -
-

- -

-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- -
-
-
-
-
-
+
+
+
Dashboard,
+
+ Hi, + +
+
+ +
+
+
'> +
+
+ Date : +
+ +
+ +
+ +
-
+ +
+ +
+ +
+ +
+ +
+
+
+
+
+ + + + + + +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SOrder DatetimePatient NameNo LabNo RegisterReffDoctorTestsResult ToValidationStatus
+
+ + Printed
+ Eng + +
+ + + + + + + + + + get('userid'); + $val1 = $row['val1user']; + $val2 = $row['val2user']; + + $valButton = (($val1 === '-') || ($val2 === '-')) && ($user !== $val1 && $user !== $val2); + $unvalButton = ($val1 !== '-') || ($val2 !== '-'); + ?> + + + + + + + +
1 :
2 :
+ + + + + + + +
+
+
+
+ + + + + + +
endSection() ?> section('script') ?> + + + endSection() ?> \ No newline at end of file diff --git a/app/Views/analyst/modal_request.php b/app/Views/analyst/modal_request.php new file mode 100644 index 0000000..c0bb9e9 --- /dev/null +++ b/app/Views/analyst/modal_request.php @@ -0,0 +1,40 @@ +
+
val : -
+
+ + +
+
+ +
+ +
+ + \ No newline at end of file diff --git a/app/Views/analyst/modal_specimen.php b/app/Views/analyst/modal_specimen.php new file mode 100644 index 0000000..faeef90 --- /dev/null +++ b/app/Views/analyst/modal_specimen.php @@ -0,0 +1,106 @@ +
+ +
+
+
Patient
+
: {{patientIdentity.name}}
+
+
+
Age
+
: {{patientIdentity.age}} years
+
+
+
Gender
+
: {{patientIdentity.gender}}
+
+
+ +
+
+
Lab#
+
: {{accessnumber}}
+
+
+
MR#
+
: {{patientIdentity.rm}}
+
+
+
KTP
+
: {{patientIdentity.ktp}}
+
+
+ +
+ +
+
+
+ Tube +
+ + + + + + + + + + + + + + + + + + + + + + + {{#samples}} + + + + + + + + + {{/samples}} + + + + + + +
Sample CodeSample NameCollectedReceivedAction
Collection
All + + + + +
{{sampcode}}{{name}} + + + + + + + + + + +
+
+ +
+
+
+
\ No newline at end of file diff --git a/app/Views/analyst/modal_unvalidate.php b/app/Views/analyst/modal_unvalidate.php new file mode 100644 index 0000000..790953c --- /dev/null +++ b/app/Views/analyst/modal_unvalidate.php @@ -0,0 +1,16 @@ +
+
+

Unvalidate

+
+
+ + '> + +
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/app/Views/cs/index.php b/app/Views/cs/index.php index 41d64e2..1133dd2 100644 --- a/app/Views/cs/index.php +++ b/app/Views/cs/index.php @@ -1,172 +1,285 @@ - extend('_layouts/main.php') ?> section('title') ?> - Customer Service Glenlis +Customer Service Glenlis endSection() ?> section('content') ?> - -
-
-
-
-
-

- -

-
-
-
'> -
-
- Date : -
- -
- -
- -
-
- -
- -
- -
- -
- -
- -
-
-
-
-
-
- -
-

- -

-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- -
-
-
-
-
-
+
+
+
Dashboard,
+
+ Hi, + +
+
+ +
+
+
'> +
+
+ Date : +
+ +
+ +
+ +
-
+ +
+ +
+ +
+ +
+ +
+
+
+
+
+ + + + + + +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SOrder DatetimePatient NameNo LabNo RegisterReffDoctorTestsResult ToValidationStatus
+
+ + Printed
+ Eng + +
+ + + + + + + + + + get('userid'); + $val1 = $row['val1user']; + $val2 = $row['val2user']; + + $valButton = (($val1 === '-') || ($val2 === '-')) && ($user !== $val1 && $user !== $val2); + $unvalButton = ($val1 !== '-') || ($val2 !== '-'); + ?> + + + + + + + +
1 :
2 :
+ + + + + + + +
+
+
+
+ + + + + + +
endSection() ?> section('script') ?> + + + endSection() ?> \ No newline at end of file diff --git a/app/Views/cs/modal_request.php b/app/Views/cs/modal_request.php new file mode 100644 index 0000000..c0bb9e9 --- /dev/null +++ b/app/Views/cs/modal_request.php @@ -0,0 +1,40 @@ +
+
val : -
+
+ + +
+
+ +
+ +
+ + \ No newline at end of file diff --git a/app/Views/cs/modal_specimen.php b/app/Views/cs/modal_specimen.php new file mode 100644 index 0000000..faeef90 --- /dev/null +++ b/app/Views/cs/modal_specimen.php @@ -0,0 +1,106 @@ +
+ +
+
+
Patient
+
: {{patientIdentity.name}}
+
+
+
Age
+
: {{patientIdentity.age}} years
+
+
+
Gender
+
: {{patientIdentity.gender}}
+
+
+ +
+
+
Lab#
+
: {{accessnumber}}
+
+
+
MR#
+
: {{patientIdentity.rm}}
+
+
+
KTP
+
: {{patientIdentity.ktp}}
+
+
+ +
+ +
+
+
+ Tube +
+ + + + + + + + + + + + + + + + + + + + + + + {{#samples}} + + + + + + + + + {{/samples}} + + + + + + +
Sample CodeSample NameCollectedReceivedAction
Collection
All + + + + +
{{sampcode}}{{name}} + + + + + + + + + + +
+
+ +
+
+
+
\ No newline at end of file diff --git a/app/Views/cs/modal_unvalidate.php b/app/Views/cs/modal_unvalidate.php new file mode 100644 index 0000000..790953c --- /dev/null +++ b/app/Views/cs/modal_unvalidate.php @@ -0,0 +1,16 @@ +
+
+

Unvalidate

+
+
+ + '> + +
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/app/Views/doctor/index.php b/app/Views/doctor/index.php index f3eaf10..b5d6cc5 100644 --- a/app/Views/doctor/index.php +++ b/app/Views/doctor/index.php @@ -1,172 +1,285 @@ - extend('_layouts/main.php') ?> section('title') ?> - Doctor Glenlis +Doctor Glenlis endSection() ?> section('content') ?> - -
-
-
-
-
-

- -

-
-
-
'> -
-
- Date : -
- -
- -
- -
-
- -
- -
- -
- -
- -
- -
-
-
-
-
-
- -
-

- -

-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- -
-
-
-
-
-
+
+
+
Dashboard,
+
+ Hi, + +
+
+ +
+
+
'> +
+
+ Date : +
+ +
+ +
+ +
-
+ +
+ +
+ +
+ +
+ +
+
+
+
+
+ + + + + + +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SOrder DatetimePatient NameNo LabNo RegisterReffDoctorTestsResult ToValidationStatus
+
+ + Printed
+ Eng + +
+ + + + + + + + + + get('userid'); + $val1 = $row['val1user']; + $val2 = $row['val2user']; + + $valButton = (($val1 === '-') || ($val2 === '-')) && ($user !== $val1 && $user !== $val2); + $unvalButton = ($val1 !== '-') || ($val2 !== '-'); + ?> + + + + + + + +
1 :
2 :
+ + + + + + + +
+
+
+
+ + + + + + +
- + endSection() ?> section('script') ?> + + + endSection() ?> \ No newline at end of file diff --git a/app/Views/doctor/modal_request.php b/app/Views/doctor/modal_request.php new file mode 100644 index 0000000..c0bb9e9 --- /dev/null +++ b/app/Views/doctor/modal_request.php @@ -0,0 +1,40 @@ +
+
val : -
+
+ + +
+
+ +
+ +
+ + \ No newline at end of file diff --git a/app/Views/doctor/modal_specimen.php b/app/Views/doctor/modal_specimen.php new file mode 100644 index 0000000..faeef90 --- /dev/null +++ b/app/Views/doctor/modal_specimen.php @@ -0,0 +1,106 @@ +
+ +
+
+
Patient
+
: {{patientIdentity.name}}
+
+
+
Age
+
: {{patientIdentity.age}} years
+
+
+
Gender
+
: {{patientIdentity.gender}}
+
+
+ +
+
+
Lab#
+
: {{accessnumber}}
+
+
+
MR#
+
: {{patientIdentity.rm}}
+
+
+
KTP
+
: {{patientIdentity.ktp}}
+
+
+ +
+ +
+
+
+ Tube +
+ + + + + + + + + + + + + + + + + + + + + + + {{#samples}} + + + + + + + + + {{/samples}} + + + + + + +
Sample CodeSample NameCollectedReceivedAction
Collection
All + + + + +
{{sampcode}}{{name}} + + + + + + + + + + +
+
+ +
+
+
+
\ No newline at end of file diff --git a/app/Views/doctor/modal_unvalidate.php b/app/Views/doctor/modal_unvalidate.php new file mode 100644 index 0000000..790953c --- /dev/null +++ b/app/Views/doctor/modal_unvalidate.php @@ -0,0 +1,16 @@ +
+
+

Unvalidate

+
+
+ + '> + +
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/public/js/admin/request.js b/public/js/admin/request.js index 89c03e5..2fa29b3 100644 --- a/public/js/admin/request.js +++ b/public/js/admin/request.js @@ -75,7 +75,22 @@ console.log("Success Response:", data); $(`#val1user-${accessnumber}`).text("1 : "); $(`#val2user-${accessnumber}`).text("2 : "); - $(`#valBtn-${accessnumber}`).prop('disabled', false); + + // ganti tombol UNVALIDATE -> VALIDATE + $(`#btnContainer-${accessnumber}`).html(` + + `); + + // $(`#unvalBtn-${accessnumber}`).hide(); + // $(`#valBtn-${accessnumber}`).prop('disabled', false); + // $(`#valBtn-${accessnumber}`).remove(); + }) .catch(error => { console.error("Fetch Error:", error); @@ -94,7 +109,29 @@ body: JSON.stringify({ userid:`${userid}` }) }).then(response => { $(`#validateModal`).modal('hide'); - $(`#valBtn-${accessnumber}`).prop('disabled', true); + // $(`#valBtn-${accessnumber}`).prop('disabled', true); + // $(`#valBtn-${accessnumber}`).hide(); + + // $(`#unvalBtn-${accessnumber}`).after(` + // + // `); + // ganti tombol val → unval + $(`#btnContainer-${accessnumber}`).html(` + + `); + response.json().then(data => { console.log("Success:", data); if(data.val === 1){ $(`#val1user-${accessnumber}`).text("1 : "+data.userid || '1 :'); } diff --git a/public/js/admin/specimen.js b/public/js/admin/specimen.js index 4963a39..4cdf9a1 100644 --- a/public/js/admin/specimen.js +++ b/public/js/admin/specimen.js @@ -47,7 +47,7 @@ function commentValue() { const input = prompt("Masukkan Komentar :"); } -function detailShow() { +function detailShow(userrole) { { const modal = document.getElementById('detailModal'); const modalContent = document.getElementById('specimenModalContent'); @@ -58,7 +58,7 @@ function detailShow() { "

Loading data...

"; try { $.getJSON(`${BASE_URL}/api/specimen/${access}`, function(data) { - $.get(`${BASE_URL}/admin/modal_specimen`, function(tpl) { + $.get(`${BASE_URL}/${userrole}/modal_specimen`, function(tpl) { data.samples = data.samples.map(s => ({ ...s, is_coll: s.colstatus == 1, @@ -75,4 +75,4 @@ function detailShow() { }); }); } -} \ No newline at end of file +}