backup dashboard html, add modal, add tubes table

This commit is contained in:
mahdahar 2024-11-12 15:33:56 +07:00
parent cd3af0538b
commit 2855b2f8f0
12 changed files with 534 additions and 164 deletions

View File

@ -5,7 +5,8 @@ use CodeIgniter\Router\RouteCollection;
/**
* @var RouteCollection $routes
*/
$routes->get('/', 'Home::index');
$routes->get('/', 'Dashboard::index');
$routes->get('/dashboard/viewAccess/(:any)', 'Dashboard::viewAccess/$1');
// Auth
$routes->get('/auth/logout', 'Auth::logout');
$routes->get('/auth/loginTD', 'Auth::loginTD');

View File

@ -0,0 +1,40 @@
<?php
namespace App\Controllers;
class Dashboard extends BaseController {
public function index(): string {
$db = \Config\Database::connect();
$sql = "select sr.COLLECTIONDATE, sr.SP_ACCESSNUMBER, sr.HOSTORDERNUMBER, p.PATNUMBER, p.NAME,
TESTS=stuff(( select ', '+'('+T.SP_TESTCODE+')' from
( select T.SP_TESTCODE from SP_TESTS T
where T.SP_ACCESSNUMBER=sr.SP_ACCESSNUMBER
and T.DEPTH=0 AND T.SP_TESTCODE <> 'Q'
) as T
for xml path('')),1,1,'')
from SP_REQUESTS sr
left join PATIENTS p on p.PATID=sr.PATID
where sr.COLLECTIONDATE between '2024-10-02 00:00' and '2024-10-03 23:59'";
$query = $db->query($sql);
$results = $query->getResultArray();
$data['data'] = $results;
return view('dashboard', $data);
}
public function viewAccess($accessnumber): string {
$db = \Config\Database::connect();
$sql = "select p.PATNUMBER, p.NAME, sr.HOSTORDERNUMBER, tu.SAMPLETYPE, ds.SHORTTEXT, tu.TUBESTATUS, ct.COLLSTATUS from SP_TUBES tu
left join SP_REQUESTS sr on tu.SP_ACCESSNUMBER=sr.SP_ACCESSNUMBER
left join PATIENTS p on p.PATID=sr.PATID
left join DICT_SAMPLES_TYPES ds on ds.SAMPCODE= tu.SAMPLETYPE
left join cmod.dbo.CM_TUBES ct on ct.SAMPLETYPE=tu.SAMPLETYPE
where tu.SP_ACCESSNUMBER='$accessnumber'";
$query = $db->query($sql);
$results = $query->getResultArray();
$data['data'] = $results;
$data['accessnumber'] = $accessnumber;
return view('dashboard_viewAccess', $data);
}
}

View File

@ -1,10 +0,0 @@
<?php
namespace App\Controllers;
class Home extends BaseController
{
public function index(): string {
return view('dashboard');
}
}

251
app/Views/dashboard.html Normal file
View File

@ -0,0 +1,251 @@
<?= $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() ?>

View File

@ -2,19 +2,16 @@
<?= $this->section('content') ?>
<style>
tr { cursor: pointer; }
#table_dashboard 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 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>
@ -23,12 +20,8 @@ tr { cursor: pointer; }
<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 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>
@ -37,12 +30,8 @@ tr { cursor: pointer; }
<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 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>
@ -51,12 +40,8 @@ tr { cursor: pointer; }
<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 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>
@ -65,12 +50,8 @@ tr { cursor: pointer; }
<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 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>
@ -79,12 +60,8 @@ tr { cursor: pointer; }
<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 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>
@ -93,12 +70,8 @@ tr { cursor: pointer; }
<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 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>
@ -107,23 +80,20 @@ tr { cursor: pointer; }
<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 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">
<table id="table_dashboard" class="table">
<thead>
<tr >
<th>Order</th>
@ -131,121 +101,62 @@ tr { cursor: pointer; }
<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>
<?php
$i = 1;
foreach ($data as $row) {
$colldate = $row['COLLECTIONDATE'];
$colldate = substr($colldate,0,10);
$patnumber = $row['PATNUMBER'];
$patnumber = substr($patnumber,-16);
$accessnumber = $row['SP_ACCESSNUMBER'];
?>
<tr class="table-row viewAccess" data-bs-toggle="modal" data-bs-target="#modal" data-access='<?=$accessnumber;?>'>
<td class="text-start text-nowrap"><?=$colldate;?></td>
<td class="text-start text-nowrap"><?=$patnumber;?></td>
<td class="text-start"><?=$row['NAME'];?></td>
<td class="text-start"><?=$accessnumber;?></td>
<td class="text-start"><?=$row['HOSTORDERNUMBER'];?></td>
<td class="text-start"><?=$row['TESTS'];?></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>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="modal fade" id="modal" aria-hidden="true" tabindex="-1">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
hello from modal
</div>
</div>
</div>
<?= $this->endSection() ?>
<?= $this->section('script') ?>
<script>
$(document).ready(function() {
$('#tabel_aneh').DataTable({
order: [] // Menonaktifkan pengurutan saat awal
});
$(document).ready(function() {
$('#table_dashboard').DataTable({
order: [],
pageLength: 25
});
});
$('.viewAccess').on('click',function(){
const access = $(this).data('access');
$('.modal-content').load('<?=base_url();?>dashboard/viewAccess/'+access, function(){
$('#modal').modal('show');
});
});
</script>
<?= $this->endSection() ?>

View File

@ -0,0 +1,71 @@
<?php
if(isset($data[0])) {
$row = $data[0];
$patnumber = $row['PATNUMBER'];
$host = $row['HOSTORDERNUMBER'];
$name = $row['NAME'];
?>
<style>
span.badge { cursor:pointer; }
</style>
<div class="modal-header bg-orange">
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request </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>Access#</th> <th>:</th> <td><?=$accessnumber;?></td> </tr>
<tr> <th>Pat#</th> <th>:</th> <td><?=$patnumber;?></td> </tr>
<tr> <th>Nama</th> <th>:</th> <td><?=$name;?></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 class="card-title">Sample List</div>
<table class='table'>
<tr> <th class='text-center'>Coll.</th> <th class='text-center'>Recv.</th> <th>Sample Name</th> <th>Action</th> </tr>
<?php
foreach($data as $row) {
$sampletype = $row['SAMPLETYPE'];
$sampletext = $row['SHORTTEXT'];
$tubestatus = $row['TUBESTATUS'];
$collstatus = $row['COLLSTATUS'];
echo "<tr>";
echo "<input type='hidden' name='samptype[$sampletype]' value='0' />\r\n";
if($collstatus==1) { echo " <td class='text-center'>V</td>"; }
else { echo "<tr> <td class='text-center'>X</td>"; }
if($tubestatus==4) { echo "<td class='text-center'>V</td>"; }
else { echo"<td class='text-center'>X</td>"; }
echo "<td>$sampletext</td> <td> <span class='badge bg-black text-white'>reprint</span> </td>
</tr> ";
}
?>
</table>
</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> -->
<?php
} else {
?>
<div class="modal-header bg-black text-white">
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request </h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
</div>
<div class="modal-body">
<h3>Data not found</h3>
</div>
<?php
}
?>

View File

@ -0,0 +1,69 @@
<div id="layoutSidenav_nav">
<nav class="sb-sidenav accordion sb-sidenav-light" id="sidenavAccordion">
<div class="sb-sidenav-menu">
<div class="nav">
<div class="sb-sidenav-menu-heading">Core</div>
<a class="nav-link" href="index.html">
<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
Dashboard
</a>
<div class="sb-sidenav-menu-heading">Interface</div>
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#collapseLayouts" aria-expanded="false" aria-controls="collapseLayouts">
<div class="sb-nav-link-icon"><i class="fas fa-columns"></i></div>
Layouts
<div class="sb-sidenav-collapse-arrow"><i class="bi bi-chevron-down"></i></div>
</a>
<div class="collapse" id="collapseLayouts" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="layout-static.html">Static Navigation</a>
<a class="nav-link" href="layout-sidenav-light.html">Light Sidenav</a>
</nav>
</div>
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#collapsePages" aria-expanded="false" aria-controls="collapsePages">
<div class="sb-nav-link-icon"><i class="fas fa-book-open"></i></div>
Pages
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
</a>
<div class="collapse" id="collapsePages" aria-labelledby="headingTwo" data-bs-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav accordion" id="sidenavAccordionPages">
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#pagesCollapseAuth" aria-expanded="false" aria-controls="pagesCollapseAuth">
Authentication
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
</a>
<div class="collapse" id="pagesCollapseAuth" data-bs-parent="#sidenavAccordionPages">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="login.html">Login</a>
<a class="nav-link" href="register.html">Register</a>
<a class="nav-link" href="password.html">Forgot Password</a>
</nav>
</div>
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#pagesCollapseError" aria-expanded="false" aria-controls="pagesCollapseError">
Error
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
</a>
<div class="collapse" id="pagesCollapseError" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordionPages">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="401.html">401 Page</a>
<a class="nav-link" href="404.html">404 Page</a>
<a class="nav-link" href="500.html">500 Page</a>
</nav>
</div>
</nav>
</div>
<div class="sb-sidenav-menu-heading">Addons</div>
<a class="nav-link" href="charts.html">
<div class="sb-nav-link-icon"><i class="fas fa-chart-area"></i></div>
Charts
</a>
<a class="nav-link" href="tables.html">
<div class="sb-nav-link-icon"><i class="fas fa-table"></i></div>
Tables
</a>
</div>
</div>
<div class="sb-sidenav-footer">
<div class="small">Logged in as:</div>
Analis Lab
</div>
</nav>
</div>

View File

@ -0,0 +1,23 @@
<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>

View File

@ -12,8 +12,8 @@
<?=$_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><a class="dropdown-item" href="#!">Profile</a></li>
<li><a class="dropdown-item" href="#!">Change Password</a></li>
<li><hr class="dropdown-divider" /></li>
<li><a class="dropdown-item" href="<?=base_url();?>auth/logout">Logout</a></li>
</ul>

View File

@ -96,7 +96,21 @@ CREATE TABLE [dbo].[CM_USERS](
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
USE [master]
CREATE TABLE [dbo].[CM_TUBES](
[TUBEID] [int] IDENTITY(1,1) NOT NULL,
[ACCESSNUMBER] [varchar](10) NULL,
[SAMPLETYPE] [varchar](10) NULL,
[COLLECTIONDATE] [datetime] NULL,
[COLL_USERID] [varchar](25) NULL,
[COLLSTATUS] [varchar](1) NOT NULL,
[CREATEDATE] [datetime] NULL,
CONSTRAINT [PK_TUBES] PRIMARY KEY CLUSTERED
(
[TUBEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER DATABASE [cmod] SET READ_WRITE
ALTER TABLE [dbo].[CM_TUBES] ADD CONSTRAINT [DF_TUBES_STATUS] DEFAULT ((0)) FOR [COLLSTATUS]
GO