merge main to zakaprinter
This commit is contained in:
commit
87dca8e44c
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@
|
||||
!.gitignore
|
||||
!env
|
||||
!cmod.sql
|
||||
!cmod.bak
|
||||
@ -6,6 +6,13 @@ use CodeIgniter\Router\RouteCollection;
|
||||
* @var RouteCollection $routes
|
||||
*/
|
||||
|
||||
// Pages
|
||||
$routes->get('/', 'Pages::dashboard_index');
|
||||
$routes->get('/userroles/', 'Pages::userroles_index');
|
||||
$routes->get('/users/', 'Pages::users_index');
|
||||
$routes->get('/changePass/', 'Pages::changePass');
|
||||
$routes->get('/dictTests/', 'Pages::dictTests_index');
|
||||
|
||||
// Tubes
|
||||
$routes->get('/tubes/collect/(:any)/(:any)', 'Tubes::collect/$1/$2');
|
||||
$routes->get('/tubes/collectAll/(:any)', 'Tubes::collectAll/$1');
|
||||
@ -25,11 +32,6 @@ $routes->get('/users/', 'Pages::users_index');
|
||||
$routes->get('/changePass/', 'Pages::changePass');
|
||||
|
||||
$routes->get('/dashboard/viewAccess/(:any)', 'Dashboard::viewAccess/$1');
|
||||
// Dashboard
|
||||
$routes->get('/api/dashboard/index', 'Dashboard::index');
|
||||
|
||||
// DICT_TESTS
|
||||
$routes->get('/dict_tests/', 'Dict_tests::index');
|
||||
|
||||
// Auth
|
||||
$routes->get('/auth/logout', 'Auth::logout');
|
||||
@ -37,6 +39,9 @@ $routes->get('/auth/loginTD', 'Auth::loginTD');
|
||||
$routes->match(['get','post'], '/auth/login', 'Auth::login');
|
||||
$routes->match(['get','post'], '/auth/setpass/(:any)', 'Auth::setpass/$1');
|
||||
|
||||
// API - Dashboard
|
||||
$routes->get('/api/dashboard/index', 'Dashboard::index');
|
||||
|
||||
// API - Userroles
|
||||
$routes->get('/api/userroles/index', 'Userroles::index');
|
||||
$routes->get('/api/userroles/detail/(:any)', 'Userroles::detail/$1');
|
||||
@ -47,3 +52,9 @@ $routes->get('/api/users/index', 'Users::index');
|
||||
$routes->get('/api/users/detail/(:any)', 'Users::detail/$1');
|
||||
$routes->post('/api/users/savePass/(:any)', 'Users::savePass/$1');
|
||||
$routes->post('/api/users/saveRole/(:any)', 'Users::saveRole/$1');
|
||||
|
||||
// API - DictTests
|
||||
$routes->POST('/api/dictTests/search', 'DictTests::search');
|
||||
$routes->POST('/api/dictTests/save', 'DictTests::save');
|
||||
$routes->get('/api/dictTests/index', 'DictTests::index');
|
||||
$routes->get('/api/dictTests/detail/(:any)', 'DictTests::detail/$1');
|
||||
|
||||
@ -18,9 +18,10 @@ class Auth extends BaseController {
|
||||
$data['password'] = $password;
|
||||
|
||||
$db = \Config\Database::connect();
|
||||
$sql = "SELECT u.USERID, u.USERNAME, u.USERINITIALS, u1.PASSWORD
|
||||
$sql = "SELECT u.USERID, u.USERNAME, u1.PASSWORD, ur.USERROLECODE
|
||||
FROM USERS u
|
||||
left join cmod.dbo.CM_USERS u1 on u.USERID=u1.USERID
|
||||
left join cmod.dbo.CM_USERROLES ur on u1.USERROLEID=ur.USERROLEID
|
||||
WHERE u.USERID='$userid'";
|
||||
$query = $db->query($sql);
|
||||
$result = $query->getResultArray();
|
||||
@ -29,7 +30,7 @@ class Auth extends BaseController {
|
||||
$qpassword = $row['PASSWORD'];
|
||||
$userid = $row['USERID'];
|
||||
$username = $row['USERNAME'];
|
||||
$userinitials = $row['USERINITIALS'];
|
||||
$userrole = $row['USERROLECODE'];
|
||||
// if pass empty then first login / reset password
|
||||
$data['password']=$password;
|
||||
$data['qpassword']=$qpassword;
|
||||
@ -48,7 +49,7 @@ class Auth extends BaseController {
|
||||
}
|
||||
$sessiondata = [
|
||||
'userid' => $userid,
|
||||
'userinitials' => $userinitials,
|
||||
'userrole' => $userrole,
|
||||
'username' => $username,
|
||||
];
|
||||
session()->set( $sessiondata );
|
||||
|
||||
@ -40,8 +40,9 @@ when not exists (select 1 from SP_TUBES st where st.SP_ACCESSNUMBER=sr.SP_ACCESS
|
||||
when exists (select 1 FROM cmod.dbo.CM_TUBES T where T.ACCESSNUMBER=sr.SP_ACCESSNUMBER ) then
|
||||
case
|
||||
when exists (select 1 from SP_TUBES st where st.SP_ACCESSNUMBER=sr.SP_ACCESSNUMBER and st.TUBESTATUS=4 ) then 'PartRecv'
|
||||
when exists (select 1 from cmod.dbo.CM_TUBES T where T.ACCESSNUMBER=sr.SP_ACCESSNUMBER and T.COLLSTATUS=0 ) then 'PartColl'
|
||||
else 'Coll'
|
||||
when not exists (select 1 from cmod.dbo.CM_TUBES T where T.ACCESSNUMBER=sr.SP_ACCESSNUMBER and T.COLLSTATUS=0 ) then 'Coll'
|
||||
when exists (select 1 from cmod.dbo.CM_TUBES T where T.ACCESSNUMBER=sr.SP_ACCESSNUMBER and T.COLLSTATUS=1 ) then 'PartColl'
|
||||
else 'Pend'
|
||||
end
|
||||
else 'Pend'
|
||||
end STATS
|
||||
|
||||
77
app/Controllers/DictTests.php
Normal file
77
app/Controllers/DictTests.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
namespace App\Controllers;
|
||||
|
||||
use CodeIgniter\RESTful\ResourceController;
|
||||
|
||||
class DictTests extends ResourceController {
|
||||
protected $format = 'json';
|
||||
|
||||
public function index() {
|
||||
$db = \Config\Database::connect();
|
||||
$sql = "select TESTCODE, TEXT1, TEXT2 from cmod.dbo.CM_DICT_TESTS";
|
||||
$query = $db->query($sql);
|
||||
$results = $query->getResultArray();
|
||||
$data['dictTests'] = $results;
|
||||
|
||||
return $this->respond($data, 200);
|
||||
}
|
||||
|
||||
public function search() {
|
||||
$db = \Config\Database::connect();
|
||||
$testcode = $this->request->getPost('testcode');
|
||||
$shorttext = $this->request->getPost('shorttext');
|
||||
$sql = "select dt.TESTCODE, dt.SHORTTEXT, cdt.TEXT1, cdt.TEXT2, cdt.UNIT, cdt.REFFTEXT from DICT_TESTS dt
|
||||
left join cmod.dbo.CM_DICT_TESTS cdt on dt.TESTCODE=cdt.TESTCODE";
|
||||
// Initialize a WHERE clause
|
||||
$where= '';
|
||||
|
||||
// Check if either testcode or shorttext is provided
|
||||
if (!empty($testcode) || !empty($shorttext)) {
|
||||
$where= ' WHERE ';
|
||||
if (!empty($testcode)) { $where .= "dt.TESTCODE like '%$testcode%'"; }
|
||||
if (!empty($shorttext)) {
|
||||
if (!empty($testcode)) { $where .= ' OR '; }
|
||||
$where .= "LOWER(dt.SHORTTEXT) LIKE '%$shorttext%'";
|
||||
}
|
||||
}
|
||||
$sql .= $where;
|
||||
$query = $db->query($sql);
|
||||
$results = $query->getResultArray();
|
||||
$data['dictTests'] = $results;
|
||||
|
||||
return $this->respond($data, 200);
|
||||
}
|
||||
|
||||
public function detail($testcode) {
|
||||
$data = array();
|
||||
$db = \Config\Database::connect();
|
||||
$sql = "select * from cmod.dbo.CM_DICT_TESTS where TESTCODE='$testcode'";
|
||||
$query = $db->query($sql);
|
||||
$results = $query->getResultArray();
|
||||
if(isset($results[0])) { $data = $results[0]; }
|
||||
return $this->respond($data, 200);
|
||||
}
|
||||
|
||||
public function save() {
|
||||
$update = $this->request->getPost('update');
|
||||
$testcode = $this->request->getPost('testcode');
|
||||
$text1 = $this->request->getPost('text1');
|
||||
$text2 = $this->request->getPost('text2');
|
||||
$unit = $this->request->getPost('unit');
|
||||
$refftext = $this->request->getPost('refftext');
|
||||
|
||||
$db = \Config\Database::connect();
|
||||
$sql = "INSERT INTO cmod.dbo.CM_DICT_TESTS (TESTCODE, TEXT1, TEXT2, REFFTEXT, LOGDATE ) VALUES ('$testcode', '$text1', '$text2', '$refftext' GETDATE())";
|
||||
$sql = "UPDATE cmod.dbo.CM_DICT_TESTS set TEXT1='$text1', TEXT2='$text2', REFFTEXT='$refftext', LOGDATE=GETDATE() where TESTCODE='$testcode'";
|
||||
|
||||
if( $db->query($sql) ) {
|
||||
return $this->respond(['message' => 'Save Success'],201);
|
||||
} else {
|
||||
$response = [
|
||||
'errors' => $db->errors(),
|
||||
'message' => 'Invalid Inputs'
|
||||
];
|
||||
return $this->fail($response , 409);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -39,4 +39,8 @@ class Pages extends BaseController {
|
||||
}
|
||||
return view('changePass');
|
||||
}
|
||||
|
||||
public function dictTests_index() {
|
||||
return view('dictTests_index');
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,251 +0,0 @@
|
||||
<?= $this->extend('layouts/main.php') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
tr { cursor: pointer; }
|
||||
</style>
|
||||
|
||||
<div class="d-flex justify-content-between p-0">
|
||||
<div class="custom-card">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-orange">
|
||||
<h5 class="m-0"><i class="bi bi-clock-history"></i></h5>
|
||||
</div>
|
||||
<div class="col-9 text-end pe-3">
|
||||
<h2 class="m-0 custom-card-title">345</h2>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="text-orange">
|
||||
<h3 class="custom-card-text m-0 p-0 text-orange">Pending</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-peach">
|
||||
<h5 class="m-0"><i class="bi bi-tv"></i></h5>
|
||||
</div>
|
||||
<div class="col-9 text-end pe-3">
|
||||
<h2 class="m-0 custom-card-title">333</h2>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="text-peach">
|
||||
<h3 class="custom-card-text m-0 p-0 text-peach">Part. Collect</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-pink">
|
||||
<h5 class="m-0"><i class="bi bi-collection"></i></h5>
|
||||
</div>
|
||||
<div class="col-9 text-end pe-3">
|
||||
<h2 class="m-0 custom-card-title">542</h2>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="text-pink">
|
||||
<h3 class="custom-card-text m-0 p-0 text-pink">Collected</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-soft-blue">
|
||||
<h5 class="m-0"><i class="bi bi-file-medical"></i></h5>
|
||||
</div>
|
||||
<div class="col-9 text-end pe-3">
|
||||
<h2 class="m-0 custom-card-title">436</h2>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="text-soft-blue">
|
||||
<h3 class="custom-card-text m-0 p-0 text-soft-blue">Part. Rcv.</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-blue">
|
||||
<h5 class="m-0"><i class="bi bi-journal-medical"></i></h5>
|
||||
</div>
|
||||
<div class="col-9 text-end pe-3">
|
||||
<h2 class="m-0 custom-card-title">567</h2>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="text-blue">
|
||||
<h3 class="custom-card-text m-0 p-0 text-blue">Received</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-grey">
|
||||
<h5 class="m-0"><i class="bi bi-calendar3-week"></i></h5>
|
||||
</div>
|
||||
<div class="col-9 text-end pe-3">
|
||||
<h2 class="m-0 custom-card-title">321</h2>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="text-grey">
|
||||
<h3 class="custom-card-text m-0 p-0 text-grey">Inprocess</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-soft-green">
|
||||
<h5 class="m-0"><i class="bi bi-check2"></i></h5>
|
||||
</div>
|
||||
<div class="col-9 text-end pe-3">
|
||||
<h2 class="m-0 custom-card-title">432</h2>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="text-soft-green">
|
||||
<h3 class="custom-card-text m-0 p-0 text-soft-green">Part. Val.</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-green">
|
||||
<h5 class="m-0"><i class="bi bi-clipboard-check"></i></h5>
|
||||
</div>
|
||||
<div class="col-9 text-end pe-3">
|
||||
<h2 class="m-0 custom-card-title">321</h2>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="text-green">
|
||||
<h3 class="custom-card-text m-0 p-0 text-green">Validated</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-0">
|
||||
<div class="body-card">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_aneh" class="table">
|
||||
<thead>
|
||||
<tr >
|
||||
<th>Order</th>
|
||||
<th>MR</th>
|
||||
<th>Patient</th>
|
||||
<th>Request</th>
|
||||
<th>Hosp</th>
|
||||
<th>Loc</th>
|
||||
<th>Doc</th>
|
||||
<th>Test</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal1">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-orange text-center align-middle">Pending</td>
|
||||
</tr>
|
||||
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal2">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-peach text-center align-middle">Partial Collect</td>
|
||||
</tr>
|
||||
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal3">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-pink text-center align-middle">Full Collect</td>
|
||||
</tr>
|
||||
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal4">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-soft-blue text-center align-middle">Partial Receive</td>
|
||||
</tr>
|
||||
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal5">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-blue text-center align-middle">Full Receive</td>
|
||||
</tr>
|
||||
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal6">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-grey text-center align-middle">Inprocess</td>
|
||||
</tr>
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal7">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-soft-green text-center align-middle">Partial Validation</td>
|
||||
</tr>
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal8">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-green text-center align-middle">Complete Validation</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('script') ?>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tabel_aneh').DataTable({
|
||||
order: [] // Menonaktifkan pengurutan saat awal
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
@ -2,87 +2,7 @@
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
|
||||
<div class="d-flex justify-content-between p-0">
|
||||
<div class="custom-card" data-filtertype="1">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-orange"> <h5 class="m-0"><i class="bi bi-clock-history"></i></h5> </div>
|
||||
<div class="col-9 text-end pe-3"> <h2 class="m-0 custom-card-title">345</h2> </div>
|
||||
</div>
|
||||
<hr class="text-orange">
|
||||
<h3 class="custom-card-text m-0 p-0 text-orange">Pending</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card" data-filtertype="2">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-peach"> <h5 class="m-0"><i class="bi bi-tv"></i></h5> </div>
|
||||
<div class="col-9 text-end pe-3"> <h2 class="m-0 custom-card-title">333</h2> </div>
|
||||
</div>
|
||||
<hr class="text-peach">
|
||||
<h3 class="custom-card-text m-0 p-0 text-peach">Part. Collect</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card" data-filtertype="3">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-pink"> <h5 class="m-0"><i class="bi bi-collection"></i></h5> </div>
|
||||
<div class="col-9 text-end pe-3"> <h2 class="m-0 custom-card-title">542</h2></div>
|
||||
</div>
|
||||
<hr class="text-pink">
|
||||
<h3 class="custom-card-text m-0 p-0 text-pink">Collected</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card" data-filtertype="4">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-soft-blue"> <h5 class="m-0"><i class="bi bi-file-medical"></i></h5> </div>
|
||||
<div class="col-9 text-end pe-3"> <h2 class="m-0 custom-card-title">436</h2> </div>
|
||||
</div>
|
||||
<hr class="text-soft-blue">
|
||||
<h3 class="custom-card-text m-0 p-0 text-soft-blue">Part. Rcv.</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card" data-filtertype="5">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-blue"> <h5 class="m-0"><i class="bi bi-journal-medical"></i></h5> </div>
|
||||
<div class="col-9 text-end pe-3"> <h2 class="m-0 custom-card-title">567</h2> </div>
|
||||
</div>
|
||||
<hr class="text-blue">
|
||||
<h3 class="custom-card-text m-0 p-0 text-blue">Received</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card" data-filtertype="6">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-grey"> <h5 class="m-0"><i class="bi bi-calendar3-week"></i></h5> </div>
|
||||
<div class="col-9 text-end pe-3"> <h2 class="m-0 custom-card-title">321</h2> </div>
|
||||
</div>
|
||||
<hr class="text-grey">
|
||||
<h3 class="custom-card-text m-0 p-0 text-grey">Inprocess</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card" data-filtertype="7">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-soft-green"> <h5 class="m-0"><i class="bi bi-check2"></i></h5> </div>
|
||||
<div class="col-9 text-end pe-3"> <h2 class="m-0 custom-card-title">432</h2> </div>
|
||||
</div>
|
||||
<hr class="text-soft-green">
|
||||
<h3 class="custom-card-text m-0 p-0 text-soft-green">Part. Val.</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-card" data-filtertype="8">
|
||||
<div class="custom-card-content">
|
||||
<div class="row p-0 d-flex justify-content-between">
|
||||
<div class="col-3 text-start text-green"> <h5 class="m-0"><i class="bi bi-clipboard-check"></i></h5> </div>
|
||||
<div class="col-9 text-end pe-3"> <h2 class="m-0 custom-card-title">321</h2></div>
|
||||
</div>
|
||||
<hr class="text-green">
|
||||
<h3 class="custom-card-text m-0 p-0 text-green">Validated</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id='stats' class="d-flex justify-content-between p-0">
|
||||
</div>
|
||||
|
||||
<div class="card border-0">
|
||||
@ -123,8 +43,35 @@ function index() {
|
||||
url: url,
|
||||
method: 'GET',
|
||||
success: function(response) {
|
||||
// counter jaka yang ngerjakan
|
||||
/*
|
||||
// counter
|
||||
*/
|
||||
$("#stats").html("");
|
||||
var stats = ['Pend', 'PartColl', 'Coll', 'PartRecv', 'Recv', 'Inc', 'PartVal', 'Comp'];
|
||||
var statcolor = ['text-orange', 'text-peach', 'text-pink', 'text-soft-blue', 'text-blue', 'text-grey', 'text-soft-green', 'text-green'];
|
||||
var staticon = ['bi-clock-history','bi-tv', 'bi-collection', 'bi-file-medical', 'bi-journal-medical', 'bi-calendar3-week', 'bi-check2', 'bi-clipboard-check'];
|
||||
var stattext = ['Pending', 'Part Collected', 'Collected', 'Part Received', 'Received', 'Incomplete', 'Part Validated', 'Validated'];
|
||||
var count = response['count'];
|
||||
var statcontent = '';
|
||||
stats.forEach ( (item, index) => {
|
||||
//console.log(item + ' ' + index);
|
||||
if(!count[item]) { count[item] = 0; }
|
||||
statcontent += '<div class="custom-card" data-filtertype="'+index+'">' +
|
||||
'<div class="custom-card-content">' +
|
||||
'<div class="row p-0 d-flex justify-content-between">' +
|
||||
'<div class="col-3 text-start '+statcolor[index]+'"> <h5 class="m-0"><i class="bi '+staticon[index]+'"></i></h5> </div>' +
|
||||
'<div class="col-9 text-end pe-3"> <h2 class="m-0 custom-card-title">'+count[item]+'</h2> </div>' +
|
||||
'</div>' +
|
||||
'<hr class="text-orange">' +
|
||||
'<h3 class="custom-card-text m-0 p-0 '+statcolor[index]+'">'+ stattext[index] +'</h3>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
});
|
||||
$("#stats").html(statcontent);
|
||||
|
||||
/*
|
||||
// table
|
||||
*/
|
||||
$("#table-body").html("");
|
||||
var data = response['data'];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
@ -134,50 +81,48 @@ function index() {
|
||||
patname = data[i].NAME;
|
||||
hon = data[i].HOSTORDERNUMBER;
|
||||
tests = data[i].TESTS;
|
||||
stats = data[i].STATS;
|
||||
if(stats == 'Pend') {
|
||||
statsTD = "<td role='button' class='bg-orange text-center align-middle' onclick='viewAccess("+accessnumber+")'>Pending</td>";
|
||||
stat = data[i].STATS;
|
||||
if(stat == 'Pend') {
|
||||
bgcolor = 'bg-orange';
|
||||
datafilter = "data-filterrow='0'";
|
||||
stattext = 'Pending';
|
||||
} else if(stat == 'PartColl') {
|
||||
bgcolor = 'bg-peach';
|
||||
datafilter = "data-filterrow='1'";
|
||||
} else if(stats == 'PartColl') {
|
||||
statsTD = "<td role='button' class='bg-peach text-center align-middle' onclick='viewAccess("+accessnumber+")'>Partial Collected</td>";
|
||||
stattext = 'Part Collected';
|
||||
} else if(stat == 'Coll') {
|
||||
bgcolor = 'bg-pink';
|
||||
datafilter = "data-filterrow='2'";
|
||||
} else if(stats == 'Coll') {
|
||||
statsTD = "<td role='button' class='bg-pink text-center align-middle' onclick='viewAccess("+accessnumber+")'>Collected</td>";
|
||||
datafilter = "data-filterrow='3'";
|
||||
} else if(stats == 'PartRecv') {
|
||||
statsTD = "<td role='button' class='bg-soft-blue text-center align-middle' onclick='viewAccess("+accessnumber+")'>Partial Received</td>";
|
||||
stattext = 'Collected';
|
||||
} else if(stat == 'PartRecv') {
|
||||
bgcolor = 'bg-soft-blue';
|
||||
datafilter = "data-filterrow='2'";
|
||||
stattext = 'Part Received';
|
||||
} else if(stat == 'Recv') {
|
||||
bgcolor = 'bg-blue';
|
||||
datafilter = "data-filterrow='4'";
|
||||
} else if(stats == 'Recv') {
|
||||
statsTD = "<td role='button' class='bg-blue text-center align-middle' onclick='viewAccess("+accessnumber+")'>Received</td>";
|
||||
stattext = 'Received';
|
||||
} else if(stat == 'Inc') {
|
||||
bgcolor = 'bg-grey';
|
||||
datafilter = "data-filterrow='5'";
|
||||
} else if(stats == 'Inc') {
|
||||
statsTD = "<td role='button' class='bg-soft-green text-center align-middle' onclick='viewAccess("+accessnumber+")'>Incomplete</td>";
|
||||
stattext = 'Incomplete';
|
||||
} else if(stat == 'PartVal') {
|
||||
bgcolor = 'bg-soft-green';
|
||||
datafilter = "data-filterrow='6'";
|
||||
} else if(stats == 'PartVal') {
|
||||
statsTD = "<td role='button' class='bg-soft-green text-center align-middle' onclick='viewAccess("+accessnumber+")'>Partial Validated</td>";
|
||||
stattext = 'Part Validated';
|
||||
} else if(stat == 'Comp') {
|
||||
bgcolor = 'bg-green';
|
||||
datafilter = "data-filterrow='7'";
|
||||
} else if(stats == 'Comp') {
|
||||
statsTD = "<td role='button' class='bg-green text-center align-middle' onclick='viewAccess("+accessnumber+")'>Validated</td>";
|
||||
datafilter = "data-filterrow='8'";
|
||||
stattext = 'Validated';
|
||||
}
|
||||
let datarow = '<tr class="align-middle" ' + datafilter + ' >' +
|
||||
'<td>' + colldate + '</td> <td>' + patnumber + '</td> <td>' + accessnumber + '</td> <td>' + patname + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
|
||||
statsTD + '</tr>';
|
||||
"<td role='button' class='"+bgcolor+" text-center align-middle' onclick='viewAccess("+accessnumber+")'>"+stattext+"</td>" + '</tr>';
|
||||
$("#table-body").append(datarow);
|
||||
}
|
||||
$('#myTable').DataTable();
|
||||
},
|
||||
error: function(response) { console.log(response.responseJSON); }
|
||||
});
|
||||
}
|
||||
|
||||
function viewAccess(access) {
|
||||
let url = '<?=base_url();?>dashboard/viewAccess/'+access;
|
||||
$('.modal-content').load(url, function(){
|
||||
$('#modal').modal('show');
|
||||
});
|
||||
}
|
||||
|
||||
// datatable filter
|
||||
const filterButton = document.querySelectorAll("[data-filtertype]");
|
||||
const table = document.querySelector("#myTable");
|
||||
const tr = table.getElementsByTagName("tr");
|
||||
@ -213,5 +158,16 @@ filterButton.forEach((button) => {
|
||||
|
||||
});
|
||||
});
|
||||
},
|
||||
error: function(response) { console.log(response.responseJSON); }
|
||||
});
|
||||
}
|
||||
|
||||
function viewAccess(access) {
|
||||
let url = '<?=base_url();?>dashboard/viewAccess/'+access;
|
||||
$('.modal-content').load(url, function(){
|
||||
$('#modal').modal('show');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,601 +0,0 @@
|
||||
<div class="modal modal-lg fade" id="modal1" aria-hidden="true" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-orange">
|
||||
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request #1222</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-borderless">
|
||||
<thead class="align-top text-start">
|
||||
<tr>
|
||||
<th>Nama</th>
|
||||
<th>:</th>
|
||||
<td>Zakiya Miksha</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Order Date</th>
|
||||
<th>:</th>
|
||||
<td>2024-10-12 23:37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Medical Record</th>
|
||||
<th>:</th>
|
||||
<td>AJI909S</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Request Number</th>
|
||||
<th>:</th>
|
||||
<td>1232233112</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Hospital</th>
|
||||
<th>:</th>
|
||||
<td>2211212121</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Location</th>
|
||||
<th>:</th>
|
||||
<td>R09</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Doc</th>
|
||||
<th>:</th>
|
||||
<td>Dr. Andes Wakawaka</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Test</th>
|
||||
<th>:</th>
|
||||
<td>Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood
|
||||
Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean
|
||||
Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>:</th>
|
||||
<td><span class="badge bg-orange">Pending</span></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Understood</button>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- M-2 -->
|
||||
<div class="modal modal-lg fade" id="modal2" aria-hidden="true" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-peach">
|
||||
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request #1222</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-borderless">
|
||||
<thead class="align-top text-start">
|
||||
<tr>
|
||||
<th>Nama</th>
|
||||
<th>:</th>
|
||||
<td>Zakiya Miksha</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Order Date</th>
|
||||
<th>:</th>
|
||||
<td>2024-10-12 23:37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Medical Record</th>
|
||||
<th>:</th>
|
||||
<td>AJI909S</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Request Number</th>
|
||||
<th>:</th>
|
||||
<td>1232233112</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Hospital</th>
|
||||
<th>:</th>
|
||||
<td>2211212121</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Location</th>
|
||||
<th>:</th>
|
||||
<td>R09</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Doc</th>
|
||||
<th>:</th>
|
||||
<td>Dr. Andes Wakawaka</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Test</th>
|
||||
<th>:</th>
|
||||
<td>Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood
|
||||
Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean
|
||||
Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>:</th>
|
||||
<td><span class="badge bg-peach">Partial Collect</span></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal modal-lg fade" id="modal3" aria-hidden="true" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-pink">
|
||||
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request #1222</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-borderless">
|
||||
<thead class="align-top text-start">
|
||||
<tr>
|
||||
<th>Nama</th>
|
||||
<th>:</th>
|
||||
<td>Zakiya Miksha</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Order Date</th>
|
||||
<th>:</th>
|
||||
<td>2024-10-12 23:37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Medical Record</th>
|
||||
<th>:</th>
|
||||
<td>AJI909S</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Request Number</th>
|
||||
<th>:</th>
|
||||
<td>1232233112</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Hospital</th>
|
||||
<th>:</th>
|
||||
<td>2211212121</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Location</th>
|
||||
<th>:</th>
|
||||
<td>R09</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Doc</th>
|
||||
<th>:</th>
|
||||
<td>Dr. Andes Wakawaka</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Test</th>
|
||||
<th>:</th>
|
||||
<td>Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood
|
||||
Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean
|
||||
Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>:</th>
|
||||
<td><span class="badge bg-pink">Full Collect</span></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- M-4 -->
|
||||
<div class="modal modal-lg fade" id="modal4" aria-hidden="true" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-soft-blue">
|
||||
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request #1222</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-borderless">
|
||||
<thead class="align-top text-start">
|
||||
<tr>
|
||||
<th>Nama</th>
|
||||
<th>:</th>
|
||||
<td>Zakiya Miksha</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Order Date</th>
|
||||
<th>:</th>
|
||||
<td>2024-10-12 23:37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Medical Record</th>
|
||||
<th>:</th>
|
||||
<td>AJI909S</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Request Number</th>
|
||||
<th>:</th>
|
||||
<td>1232233112</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Hospital</th>
|
||||
<th>:</th>
|
||||
<td>2211212121</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Location</th>
|
||||
<th>:</th>
|
||||
<td>R09</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Doc</th>
|
||||
<th>:</th>
|
||||
<td>Dr. Andes Wakawaka</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Test</th>
|
||||
<th>:</th>
|
||||
<td>Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood
|
||||
Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean
|
||||
Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>:</th>
|
||||
<td><span class="badge bg-soft-blue">Partial Receive</span></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- M-5 -->
|
||||
<div class="modal modal-lg fade" id="modal5" aria-hidden="true" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-blue">
|
||||
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request #1222</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-borderless">
|
||||
<thead class="align-top text-start">
|
||||
<tr>
|
||||
<th>Nama</th>
|
||||
<th>:</th>
|
||||
<td>Zakiya Miksha</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Order Date</th>
|
||||
<th>:</th>
|
||||
<td>2024-10-12 23:37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Medical Record</th>
|
||||
<th>:</th>
|
||||
<td>AJI909S</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Request Number</th>
|
||||
<th>:</th>
|
||||
<td>1232233112</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Hospital</th>
|
||||
<th>:</th>
|
||||
<td>2211212121</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Location</th>
|
||||
<th>:</th>
|
||||
<td>R09</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Doc</th>
|
||||
<th>:</th>
|
||||
<td>Dr. Andes Wakawaka</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Test</th>
|
||||
<th>:</th>
|
||||
<td>Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood
|
||||
Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean
|
||||
Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>:</th>
|
||||
<td><span class="badge bg-blue">Full Receive</span></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- M-6 -->
|
||||
<div class="modal modal-lg fade" id="modal6" aria-hidden="true" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-grey">
|
||||
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request #1222</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-borderless">
|
||||
<thead class="align-top text-start">
|
||||
<tr>
|
||||
<th>Nama</th>
|
||||
<th>:</th>
|
||||
<td>Zakiya Miksha</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Order Date</th>
|
||||
<th>:</th>
|
||||
<td>2024-10-12 23:37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Medical Record</th>
|
||||
<th>:</th>
|
||||
<td>AJI909S</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Request Number</th>
|
||||
<th>:</th>
|
||||
<td>1232233112</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Hospital</th>
|
||||
<th>:</th>
|
||||
<td>2211212121</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Location</th>
|
||||
<th>:</th>
|
||||
<td>R09</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Doc</th>
|
||||
<th>:</th>
|
||||
<td>Dr. Andes Wakawaka</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Test</th>
|
||||
<th>:</th>
|
||||
<td>Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood
|
||||
Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean
|
||||
Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>:</th>
|
||||
<td><span class="badge bg-grey">Inprocess</span></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- M-7 -->
|
||||
<div class="modal modal-lg fade" id="modal7" aria-hidden="true" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-soft-green">
|
||||
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request #1222</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-borderless">
|
||||
<thead class="align-top text-start">
|
||||
<tr>
|
||||
<th>Nama</th>
|
||||
<th>:</th>
|
||||
<td>Zakiya Miksha</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Order Date</th>
|
||||
<th>:</th>
|
||||
<td>2024-10-12 23:37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Medical Record</th>
|
||||
<th>:</th>
|
||||
<td>AJI909S</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Request Number</th>
|
||||
<th>:</th>
|
||||
<td>1232233112</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Hospital</th>
|
||||
<th>:</th>
|
||||
<td>2211212121</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Location</th>
|
||||
<th>:</th>
|
||||
<td>R09</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Doc</th>
|
||||
<th>:</th>
|
||||
<td>Dr. Andes Wakawaka</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Test</th>
|
||||
<th>:</th>
|
||||
<td>Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood
|
||||
Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean
|
||||
Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>:</th>
|
||||
<td><span class="badge bg-soft-green">Partial Validation</span></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- M-8 -->
|
||||
<div class="modal modal-lg fade" id="modal8" aria-hidden="true" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-green">
|
||||
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request #1222</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-borderless">
|
||||
<thead class="align-top text-start">
|
||||
<tr>
|
||||
<th>Nama</th>
|
||||
<th>:</th>
|
||||
<td>Zakiya Miksha</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Order Date</th>
|
||||
<th>:</th>
|
||||
<td>2024-10-12 23:37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Medical Record</th>
|
||||
<th>:</th>
|
||||
<td>AJI909S</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Request Number</th>
|
||||
<th>:</th>
|
||||
<td>1232233112</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Hospital</th>
|
||||
<th>:</th>
|
||||
<td>2211212121</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Location</th>
|
||||
<th>:</th>
|
||||
<td>R09</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Doc</th>
|
||||
<th>:</th>
|
||||
<td>Dr. Andes Wakawaka</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Test</th>
|
||||
<th>:</th>
|
||||
<td>Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood
|
||||
Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean
|
||||
Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>:</th>
|
||||
<td><span class="badge bg-green">Complete Validation</span></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,111 +0,0 @@
|
||||
<table id="tabel_aneh" class="table">
|
||||
<thead>
|
||||
<tr >
|
||||
<th>Order</th>
|
||||
<th>MR</th>
|
||||
<th>Patient</th>
|
||||
<th>Request</th>
|
||||
<th>Hosp</th>
|
||||
<th>Loc</th>
|
||||
<th>Doc</th>
|
||||
<th>Test</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal1">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-orange text-center align-middle">Pending</td>
|
||||
</tr>
|
||||
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal2">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-peach text-center align-middle">Partial Collect</td>
|
||||
</tr>
|
||||
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal3">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-pink text-center align-middle">Full Collect</td>
|
||||
</tr>
|
||||
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal4">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-soft-blue text-center align-middle">Partial Receive</td>
|
||||
</tr>
|
||||
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal5">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-blue text-center align-middle">Full Receive</td>
|
||||
</tr>
|
||||
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal6">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-grey text-center align-middle">Inprocess</td>
|
||||
</tr>
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal7">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-soft-green text-center align-middle">Partial Validation</td>
|
||||
</tr>
|
||||
<tr class="table-row" data-bs-toggle="modal" data-bs-target="#modal8">
|
||||
<td class="text-start">2024-10-12 23:37</td>
|
||||
<td class="text-start">AJI909S</td>
|
||||
<td class="text-start">Zakiya Miksha</td>
|
||||
<td class="text-start">1232233112</td>
|
||||
<td class="text-start">2211212121</td>
|
||||
<td class="text-start">R09</td>
|
||||
<td class="text-start">312</td>
|
||||
<td class="text-start">Complete Blood Count (CBC): Hemoglobin (Hb), Hematocrit (Hct), Red Blood Cells (RBC), White Blood Cells (WBC), Platelet Count, Mean Corpuscular Volume (MCV), Mean Corpuscular Hemoglobin (MCH), Mean Corpuscular Hemoglobin Concentration (MCHC)</td>
|
||||
<td class="bg-green text-center align-middle">Complete Validation</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@ -5,25 +5,16 @@ $patnumber = $row['PATNUMBER'];
|
||||
$host = $row['HOSTORDERNUMBER'];
|
||||
$name = $row['NAME'];
|
||||
?>
|
||||
<style>
|
||||
span.badge { cursor:pointer; }
|
||||
</style>
|
||||
<div class="modal-header bg-orange">
|
||||
<div class="modal-header bg-soft-green text-white">
|
||||
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request </h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
|
||||
<button type="button" class="btn-close text-white" data-bs-dismiss="modal" ></button>
|
||||
</div>
|
||||
<div class="modal-body" style='background-color:#F4F6FF'>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<table class="table table-sm table-borderless">
|
||||
<tr> <th>Pat#</th> <th>:</th> <td><?=$patnumber;?></td> </tr>
|
||||
<tr> <th>Nama</th> <th>:</th> <td><?=$name;?></td> </tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="col">
|
||||
<table class="table table-sm table-borderless">
|
||||
<tr> <th>Access#</th> <th>:</th> <td><?=$accessnumber;?></td> </tr>
|
||||
<tr> <th>Status</th> <th>:</th> <td><span class="badge bg-orange">Pending</span></td> </tr>
|
||||
<tr> <th>Patient</th> <th>:</th> <td><?=$patnumber;?> - <?=$name;?></td> </tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@ -54,10 +45,17 @@ span.badge { cursor:pointer; }
|
||||
}
|
||||
echo "<td>$sampletext</td>";
|
||||
echo "<td>
|
||||
<<<<<<< HEAD
|
||||
<span class='badge text-bg-dark' onclick='print($sampletype, $accessnumber)'><i class='bi bi-printer'></i></span>
|
||||
<span class='badge text-bg-success' onclick='collect($sampletype, $accessnumber)'>Coll.</span>
|
||||
<span class='badge text-bg-warning' onclick='uncollect($sampletype, $accessnumber)'>Un-Coll.</span>
|
||||
<span class='badge text-bg-primary' onclick='unreceive($sampletype, $accessnumber)'>Un-Rec.</span>
|
||||
=======
|
||||
<button class='badge text-bg-dark'><i class='bi bi-printer'></i></button>
|
||||
<button class='badge text-bg-success' onclick='collect($sampletype, $accessnumber)'>Coll.</button>
|
||||
<button class='badge text-bg-warning' onclick='uncollect($sampletype, $accessnumber)'>Un-Coll.</button>
|
||||
<button class='badge text-bg-primary' onclick='unreceive($sampletype, $accessnumber)'>Un-Rec.</button>
|
||||
>>>>>>> main
|
||||
</td> ";
|
||||
echo "<td id='comment$sampletype'>$comment <i class='bi bi-pencil-square' role='button' onclick='comment($sampletype, $accessnumber, \"$sampletext\", \"$comment\")'></i></td>";
|
||||
echo " </tr>";
|
||||
@ -65,15 +63,15 @@ span.badge { cursor:pointer; }
|
||||
?>
|
||||
<tr>
|
||||
<td></td> <td></td> <td>Collection</td>
|
||||
<td> <span class='badge badge-dark'><i class='bi bi-printer'></i></span> </td>
|
||||
<td> <button class='badge badge-dark'><i class='bi bi-printer'></i></button> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td> <td></td> <td>All</td>
|
||||
<td>
|
||||
<span class='badge text-bg-dark'><i class='bi bi-printer'></i></span>
|
||||
<span class='badge text-bg-success' onclick='collectAll(<?=$accessnumber;?>)'>Coll.</span>
|
||||
<!-- <span class='badge bg-black text-white' onclick='uncollectAll(<?=$accessnumber;?>)'>un-collect</span> -->
|
||||
<span class='badge text-bg-primary' onclick='unreceiveAll(<?=$accessnumber;?>)'>Un-Rec.</span>
|
||||
<button class='badge text-bg-dark'><i class='bi bi-printer'></i></button>
|
||||
<button class='badge text-bg-success' onclick='collectAll(<?=$accessnumber;?>)'>Coll.</button>
|
||||
<!-- <button class='badge bg-black text-white' onclick='uncollectAll(<?=$accessnumber;?>)'>un-collect</button> -->
|
||||
<button class='badge text-bg-primary' onclick='unreceiveAll(<?=$accessnumber;?>)'>Un-Rec.</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -115,6 +113,7 @@ function collect(sample, access) {
|
||||
//console.log(data);
|
||||
//$("#coll"+sample).prop("checked", true);
|
||||
viewAccess(access);
|
||||
index();
|
||||
})
|
||||
.catch(error => { console.error('Error:',error); });
|
||||
}
|
||||
@ -126,6 +125,7 @@ function collectAll(access) {
|
||||
//console.log(data);
|
||||
//$('input[id^="coll"]').prop('checked', true);
|
||||
viewAccess(access);
|
||||
index();
|
||||
})
|
||||
.catch(error => { console.error('Error:',error); });
|
||||
|
||||
@ -139,6 +139,7 @@ function uncollect(sample, access) {
|
||||
//console.log(data);
|
||||
//$("#coll"+sample).prop("checked", false);
|
||||
viewAccess(access);
|
||||
index();
|
||||
})
|
||||
.catch(error => { console.error('Error:',error); });
|
||||
|
||||
@ -151,6 +152,7 @@ function uncollectAll(access) {
|
||||
//console.log(data);
|
||||
//$('input[id^="coll"]').prop('checked', false);
|
||||
viewAccess(access);
|
||||
index();
|
||||
})
|
||||
.catch(error => { console.error('Error:',error); });
|
||||
}
|
||||
@ -163,6 +165,7 @@ function unreceive(sample, access) {
|
||||
//console.log(data);
|
||||
//$("#recv"+sample).prop("checked", false);
|
||||
viewAccess(access);
|
||||
index();
|
||||
})
|
||||
.catch(error => { console.error('Error:',error); });
|
||||
|
||||
@ -175,6 +178,7 @@ function unreceiveAll(access) {
|
||||
//console.log(data);
|
||||
//$('input[id^="recv"]').prop('checked', false);
|
||||
viewAccess(access);
|
||||
index();
|
||||
})
|
||||
.catch(error => { console.error('Error:',error); });
|
||||
}
|
||||
|
||||
165
app/Views/dictTests_index.php
Normal file
165
app/Views/dictTests_index.php
Normal file
@ -0,0 +1,165 @@
|
||||
<?= $this->extend('layouts/main.php') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<div class="card border-0 m-1">
|
||||
<div class="card-body">
|
||||
<div class='card-title'>Dictionary Test</div>
|
||||
<div class='row mb-2'>
|
||||
<div class='col-2'>Testcode</div>
|
||||
<div class='col-2'><input type='text' class='form-control form-control-sm' id='search_testcode' oninput='this.value = this.value.toUpperCase();' /></div>
|
||||
</div>
|
||||
<div class='row mb-2'>
|
||||
<div class='col-2'>Shorttext</div>
|
||||
<div class='col-3'><input type='text' class='form-control form-control-sm' id='search_shorttext' oninput='this.value = this.value.toLowerCase();' /></div>
|
||||
</div>
|
||||
<button class='btn btn-sm btn-primary' onclick='search()'>Search</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-0 m-1">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table id="myTable" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Testcode</th>
|
||||
<th>Shorttext</th>
|
||||
<th>Text</th>
|
||||
<th>Unit</th>
|
||||
<th>Reff. </th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='table-body'>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="modal_crud" aria-hidden="true" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Edit Test</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
|
||||
</div>
|
||||
<div class="modal-body" style='background-color:#F4F6FF'>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-sm table-borderless">
|
||||
<input type='hidden' id='testcode' value='' />
|
||||
<tr class="align-middle"> <th>Testcode</th> <th>:</th> <td id='testcodetext'></td> </tr>
|
||||
<tr class="align-middle"> <th>Text 1</th> <th>:</th> <td><textarea class='form-control' id='text1'/></textarea></td> </tr>
|
||||
<tr class="align-middle"> <th>Text 2</th> <th>:</th> <td><textarea class='form-control' id='text2'/></textarea></td> </tr>
|
||||
<tr class="align-middle"> <th>Unit</th> <th>:</th> <td><textarea class='form-control' id='unit'/></textarea></td> </tr>
|
||||
<tr class="align-middle"> <th>Reff.</th> <th>:</th> <td><textarea class='form-control' id='refftext'/></textarea></td> </tr>
|
||||
</table>
|
||||
<button class='btn btn-sm btn-primary' onclick='save()'>Save</button>
|
||||
<button class='btn btn-sm btn-secondary' data-bs-dismiss="modal">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('script') ?>
|
||||
<script>
|
||||
function search() {
|
||||
let url = '<?=base_url('');?>api/dictTests/search';
|
||||
testcode = $('#search_testcode').val();
|
||||
shorttext = $('#search_shorttext').val();
|
||||
let data = { testcode : testcode, shorttext: shorttext };
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
success: function(response) {
|
||||
$("#myTable").DataTable().destroy();
|
||||
$("#table-body").html("");
|
||||
var data = response['dictTests'];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
testcode = data[i].TESTCODE;
|
||||
shorttext = data[i].SHORTTEXT;
|
||||
text1 = '';
|
||||
text2 = '';
|
||||
refftext = '';
|
||||
unit = '';
|
||||
if(data[i].TEXT1 != null) { text1 = data[i].TEXT1; }
|
||||
if(data[i].TEXT2 != null) { text2 = data[i].TEXT2; }
|
||||
if(data[i].UNIT != null) { unit = data[i].UNIT; }
|
||||
if(data[i].REFFTEXT != null) { refftext = data[i].REFFTEXT; }
|
||||
let editBtn = '<button class="btn btn-sm btn-success" ' + ' onclick="edit(\'' + testcode + '\')">Edit' + '</button> ';
|
||||
let datarow = '<tr class="align-middle">' +
|
||||
'<td>' + testcode + '</td>' + '<td>' + shorttext + '</td> <td> <pre class="m-0">' + text1 + '<hr/>' + text2 + '</pre> </td>' + '<td>' + unit + '</td>' + '<td>' + refftext + '</td>' +
|
||||
'<td>' + editBtn + '</td>' +
|
||||
'</tr>';
|
||||
$("#table-body").append(datarow);
|
||||
}
|
||||
$("#myTable").DataTable({
|
||||
"pageLength" : 25,
|
||||
});
|
||||
},
|
||||
error: function(response) { console.log(response.responseJSON); }
|
||||
});
|
||||
}
|
||||
|
||||
function edit(testcode) {
|
||||
let url = '<?=base_url('');?>api/dictTests/detail/'+testcode;
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: "GET",
|
||||
success: function(response) {
|
||||
let data = response;
|
||||
$("#alert-div").html("");
|
||||
$("#error-div").html("");
|
||||
$("#testcode").val(testcode);
|
||||
$("#testcodetext").html(testcode);
|
||||
$("#update").val('1');
|
||||
$("#text1").val(data.TEXT1);
|
||||
$("#text2").val(data.TEXT2);
|
||||
$("#unit").val(data.UNIT);
|
||||
$("#refftext").val(data.REFFTEXT);
|
||||
$("#modal_crud").modal('show');
|
||||
},
|
||||
error: function(response) {
|
||||
console.log(response.responseJSON)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function save() {
|
||||
let url = '<?=base_url('');?>api/dictTests/save';
|
||||
var testcode = $("#testcode").val();
|
||||
var text1 = $("#text1").val();
|
||||
var text2 = $("#text2").val();
|
||||
var unit = $("#unit").val();
|
||||
var refftext = $("#refftext").val();
|
||||
let data = { testcode: testcode, text1:text1, text2:text2, unit:unit, refftext:refftext };
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: "POST",
|
||||
data: data,
|
||||
success: function(response) {
|
||||
$("#alert-div").html("");
|
||||
$("#error-div").html("");
|
||||
$("#testcode").val('');
|
||||
$("#text1").val('');
|
||||
$("#text2").val('');
|
||||
$("#refftext").val('');
|
||||
$("#unit").val('');
|
||||
$("#modal_crud").modal('hide');
|
||||
search();
|
||||
},
|
||||
error: function(response) {
|
||||
console.log(response.responseJSON)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
@ -7,7 +7,6 @@
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<title>Analis Dashboard</title>
|
||||
<script src="<?=base_url();?>assets/jquery-3.6.0.min.js"></script>
|
||||
<link rel="stylesheet" href="<?=base_url();?>assets/css/icons/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="<?=base_url();?>assets/datatables/datatables.min.css">
|
||||
<link href="<?=base_url();?>assets/css/styles.css" rel="stylesheet" />
|
||||
@ -50,9 +49,10 @@
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="<?=base_url();?>assets/js/scripts.js"></script>
|
||||
<script src="<?=base_url();?>assets/jquery-3.6.0.min.js"></script>
|
||||
<script src="<?=base_url();?>assets/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="<?=base_url();?>assets/datatables/datatables.min.js"></script>
|
||||
<script src="<?=base_url();?>assets/js/scripts.js"></script>
|
||||
<?= $this->renderSection('script'); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -6,14 +6,13 @@
|
||||
<a class="nav-link" href="<?=base_url();?>"><div class="sb-nav-link-icon"><i class="bi bi-speedometer"></i></div>Dashboard</a>
|
||||
<a class="nav-link" href="<?=base_url();?>changePass/"><div class="sb-nav-link-icon"><i class="bi bi-key"></i></div>Change Password</a>
|
||||
<div class="sb-sidenav-menu-heading">Administration</div>
|
||||
<a class="nav-link" href="#"> <div class="sb-nav-link-icon"><i class="bi bi-journal-album"></i></div> Dictionary Test </a>
|
||||
<a class="nav-link" href="<?=base_url();?>dictTests/"> <div class="sb-nav-link-icon"><i class="bi bi-journal-album"></i></div> Dict. Test </a>
|
||||
<a class="nav-link" href="<?=base_url();?>users/"> <div class="sb-nav-link-icon"><i class="bi bi-person-circle"></i></div> Users </a>
|
||||
<a class="nav-link" href="<?=base_url();?>userroles/"> <div class="sb-nav-link-icon"><i class="bi bi-person-lock"></i></div> User Roles </a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sb-sidenav-footer">
|
||||
<div class="small">Logged in as:</div>
|
||||
Analis Lab
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
@ -1,23 +0,0 @@
|
||||
<nav class="sb-topnav navbar navbar-expand navbar-light bg-light shadow-sm text-luxury">
|
||||
|
||||
<a class="navbar-brand ps-3 d-none d-md-block" href="#"><img src='<?=base_url();?>assets/img/logo.png' width='30' /> CMOD</a>
|
||||
|
||||
<button class="btn btn-link me-2" id="sidebarToggle"><i class="bi bi-list "></i></button>
|
||||
|
||||
<div class="ms-auto">
|
||||
<ul class="navbar-nav ms-md-0 me-3 me-lg-4">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" id="navbarDropdown" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-person-circle"></i>
|
||||
<?=$_SESSION['username'];?>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
||||
<li><a class="dropdown-item" href="#!">Settings</a></li>
|
||||
<li><a class="dropdown-item" href="#!">Activity Log</a></li>
|
||||
<li><hr class="dropdown-divider" /></li>
|
||||
<li><a class="dropdown-item" href="<?=base_url();?>auth/logout">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
@ -2,8 +2,8 @@
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<div class="card border-0">
|
||||
<div class="body-card">
|
||||
<button class='btn btn-sm btn-success mx-3 my-2' onclick='create()'><i class='bi bi-plus-circle'></i> Create New</button>
|
||||
<div class="card-body">
|
||||
<button class='btn btn-sm btn-success mx-3 my-2' onclick='create()'><i class='bi bi-plus-circle'></i> Create</button>
|
||||
<div class="table-responsive">
|
||||
<table id="table_dashboard" class="table">
|
||||
<thead>
|
||||
@ -60,7 +60,6 @@ function index() {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
let editBtn = '<button class="btn btn-sm btn-success" ' + ' onclick="edit(' + data[i].USERROLEID + ')">Edit' + '</button> ';
|
||||
//let deleteBtn = '<button class="btn btn-sm btn-danger" ' + ' onclick="delete(' + data[i].USERROLEID + ')">Delete' + '</button>';
|
||||
|
||||
let datarow = '<tr class="align-middle">' +
|
||||
'<td>' + data[i].USERROLEID + '</td>' + '<td>' + data[i].USERROLECODE+ '</td>' + '<td>' + data[i].USERROLENAME+ '</td>' + '<td>' + editBtn + '</td>' +
|
||||
'</tr>';
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<div class="card border-0">
|
||||
<div class="body-card">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table id="myTable" class="table">
|
||||
<thead>
|
||||
|
||||
17363
public/assets/datatables/datatables.min.css
vendored
17363
public/assets/datatables/datatables.min.css
vendored
File diff suppressed because one or more lines are too long
295
public/assets/datatables/datatables.min.js
vendored
295
public/assets/datatables/datatables.min.js
vendored
File diff suppressed because one or more lines are too long
1
public/assets/js/bootstrap.bundle.min.js.map
Normal file
1
public/assets/js/bootstrap.bundle.min.js.map
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user