perbaikan nama <tr> tabel dan dashboard access
This commit is contained in:
parent
35f480c341
commit
e39ea6544a
@ -40,7 +40,7 @@ class FoController extends BaseController {
|
|||||||
|
|
||||||
$data['accessnumber'] = $accessnumber;
|
$data['accessnumber'] = $accessnumber;
|
||||||
|
|
||||||
return view('admin/dashboard_viewAccess', $data);
|
return view('fo/dashboard_viewAccess', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function changePass() {
|
public function changePass() {
|
||||||
|
|||||||
@ -40,7 +40,7 @@ class SamplingController extends BaseController {
|
|||||||
|
|
||||||
$data['accessnumber'] = $accessnumber;
|
$data['accessnumber'] = $accessnumber;
|
||||||
|
|
||||||
return view('admin/dashboard_viewAccess', $data);
|
return view('sampling/dashboard_viewAccess', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function changePass() {
|
public function changePass() {
|
||||||
|
|||||||
@ -40,7 +40,7 @@ class UserController extends BaseController {
|
|||||||
|
|
||||||
$data['accessnumber'] = $accessnumber;
|
$data['accessnumber'] = $accessnumber;
|
||||||
|
|
||||||
return view('admin/dashboard_viewAccess', $data);
|
return view('user/dashboard_viewAccess', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function changePass() {
|
public function changePass() {
|
||||||
|
|||||||
@ -28,17 +28,17 @@
|
|||||||
|
|
||||||
<div class="table-responsive mt-3">
|
<div class="table-responsive mt-3">
|
||||||
<table id="myTable" class="table table-hover">
|
<table id="myTable" class="table table-hover">
|
||||||
<thead>
|
<thead class='text-start'>
|
||||||
<th>Order</th>
|
<th class='text-start' width="10%">Order Date</th>
|
||||||
<th>MR</th>
|
<th width="12%">Patient#</th>
|
||||||
<th>Patient</th>
|
<th width="17%">Patient Name</th>
|
||||||
<th>Request</th>
|
<th class='text-start' width="10%">Access#</th>
|
||||||
<th>Hosp</th>
|
<th width="9%">Visit#</th>
|
||||||
<th>Test</th>
|
<th>Test</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="table-body">
|
<tbody id="table-body" class='text-start'>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -109,6 +109,7 @@ function index() {
|
|||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
colldate = data[i].COLLECTIONDATE.substr(0,10);
|
colldate = data[i].COLLECTIONDATE.substr(0,10);
|
||||||
patnumber = data[i].PATNUMBER.substr(-16,16);
|
patnumber = data[i].PATNUMBER.substr(-16,16);
|
||||||
|
patnumber = patnumber.substring(patnumber.length - 10);
|
||||||
accessnumber = data[i].SP_ACCESSNUMBER;
|
accessnumber = data[i].SP_ACCESSNUMBER;
|
||||||
patname = data[i].NAME;
|
patname = data[i].NAME;
|
||||||
hon = data[i].HOSTORDERNUMBER;
|
hon = data[i].HOSTORDERNUMBER;
|
||||||
@ -148,7 +149,7 @@ function index() {
|
|||||||
stattext = 'Validated';
|
stattext = 'Validated';
|
||||||
}
|
}
|
||||||
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table'" + datafilter +" >" +
|
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table'" + datafilter +" >" +
|
||||||
'<td>' + colldate + '</td> <td>' + patnumber + '</td> <td>' + patname + '</td> <td>' + accessnumber + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
|
"<td class='text-start'>" + colldate + '</td> <td>' + patnumber + '</td> <td>' + patname + "</td> <td class='text-start'>" + accessnumber + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
|
||||||
"<td role='button' class='"+bgcolor+" text-center align-middle'>"+stattext+"</td>" +
|
"<td role='button' class='"+bgcolor+" text-center align-middle'>"+stattext+"</td>" +
|
||||||
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
|
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
|
||||||
$("#table-body").append(datarow);
|
$("#table-body").append(datarow);
|
||||||
|
|||||||
@ -15,7 +15,7 @@ $name = $row['NAME'];
|
|||||||
<div class="col">
|
<div class="col">
|
||||||
<table class="table table-sm table-borderless">
|
<table class="table table-sm table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
<th width='18%'>Access#</th>
|
<th width='18%'>Access Number</th>
|
||||||
<th>:</th>
|
<th>:</th>
|
||||||
<td width='31%'><?=$accessnumber;?></td>
|
<td width='31%'><?=$accessnumber;?></td>
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ $name = $row['NAME'];
|
|||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>MR#</th>
|
<th>Patient Number</th>
|
||||||
<th>:</th>
|
<th>:</th>
|
||||||
<td><?=$patnumber;?></td>
|
<td><?=$patnumber;?></td>
|
||||||
|
|
||||||
|
|||||||
@ -28,17 +28,17 @@
|
|||||||
|
|
||||||
<div class="table-responsive mt-3">
|
<div class="table-responsive mt-3">
|
||||||
<table id="myTable" class="table table-hover">
|
<table id="myTable" class="table table-hover">
|
||||||
<thead>
|
<thead class='text-start'>
|
||||||
<th>Order</th>
|
<th class='text-start' width="10%">Order Date</th>
|
||||||
<th>MR</th>
|
<th width="12%">Patient#</th>
|
||||||
<th>Patient</th>
|
<th width="17%">Patient Name</th>
|
||||||
<th>Request</th>
|
<th class='text-start' width="10%">Access#</th>
|
||||||
<th>Hosp</th>
|
<th width="9%">Visit#</th>
|
||||||
<th>Test</th>
|
<th>Test</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="table-body">
|
<tbody id="table-body" class='text-start'>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -59,12 +59,12 @@
|
|||||||
let curDate = new Date().toJSON().slice(0, 10);
|
let curDate = new Date().toJSON().slice(0, 10);
|
||||||
$('.date1').val(curDate);
|
$('.date1').val(curDate);
|
||||||
$('.date2').val(curDate);
|
$('.date2').val(curDate);
|
||||||
|
index();
|
||||||
|
|
||||||
document.addEventListener('keydown', function(event) {
|
document.addEventListener('keydown', function(event) {
|
||||||
if (event.key === 'F5') { event.preventDefault(); index(); }
|
if (event.key === 'F5') { event.preventDefault(); index(); }
|
||||||
});
|
});
|
||||||
|
|
||||||
index();
|
|
||||||
function index() {
|
function index() {
|
||||||
let url = '<?=base_url('');?>api/dashboard/index';
|
let url = '<?=base_url('');?>api/dashboard/index';
|
||||||
date1 = $('.date1').val();
|
date1 = $('.date1').val();
|
||||||
@ -109,6 +109,7 @@ function index() {
|
|||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
colldate = data[i].COLLECTIONDATE.substr(0,10);
|
colldate = data[i].COLLECTIONDATE.substr(0,10);
|
||||||
patnumber = data[i].PATNUMBER.substr(-16,16);
|
patnumber = data[i].PATNUMBER.substr(-16,16);
|
||||||
|
patnumber = patnumber.substring(patnumber.length - 10);
|
||||||
accessnumber = data[i].SP_ACCESSNUMBER;
|
accessnumber = data[i].SP_ACCESSNUMBER;
|
||||||
patname = data[i].NAME;
|
patname = data[i].NAME;
|
||||||
hon = data[i].HOSTORDERNUMBER;
|
hon = data[i].HOSTORDERNUMBER;
|
||||||
@ -128,7 +129,7 @@ function index() {
|
|||||||
stattext = 'Collected';
|
stattext = 'Collected';
|
||||||
} else if(stat == 'PartRecv') {
|
} else if(stat == 'PartRecv') {
|
||||||
bgcolor = 'bg-soft-blue';
|
bgcolor = 'bg-soft-blue';
|
||||||
datafilter = "data-filterrow='2'";
|
datafilter = "data-filterrow='3'";
|
||||||
stattext = 'Part Received';
|
stattext = 'Part Received';
|
||||||
} else if(stat == 'Recv') {
|
} else if(stat == 'Recv') {
|
||||||
bgcolor = 'bg-blue';
|
bgcolor = 'bg-blue';
|
||||||
@ -147,8 +148,8 @@ function index() {
|
|||||||
datafilter = "data-filterrow='7'";
|
datafilter = "data-filterrow='7'";
|
||||||
stattext = 'Validated';
|
stattext = 'Validated';
|
||||||
}
|
}
|
||||||
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table" + datafilter +" ' >" +
|
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table'" + datafilter +" >" +
|
||||||
'<td>' + colldate + '</td> <td>' + patnumber + '</td> <td>' + accessnumber + '</td> <td>' + patname + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
|
"<td class='text-start'>" + colldate + '</td> <td>' + patnumber + '</td> <td>' + patname + "</td> <td class='text-start'>" + accessnumber + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
|
||||||
"<td role='button' class='"+bgcolor+" text-center align-middle'>"+stattext+"</td>" +
|
"<td role='button' class='"+bgcolor+" text-center align-middle'>"+stattext+"</td>" +
|
||||||
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
|
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
|
||||||
$("#table-body").append(datarow);
|
$("#table-body").append(datarow);
|
||||||
|
|||||||
@ -15,7 +15,7 @@ $name = $row['NAME'];
|
|||||||
<div class="col">
|
<div class="col">
|
||||||
<table class="table table-sm table-borderless">
|
<table class="table table-sm table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
<th width='18%'>Access#</th>
|
<th width='18%'>Access Number</th>
|
||||||
<th>:</th>
|
<th>:</th>
|
||||||
<td width='31%'><?=$accessnumber;?></td>
|
<td width='31%'><?=$accessnumber;?></td>
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ $name = $row['NAME'];
|
|||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>MR#</th>
|
<th>Patient Number</th>
|
||||||
<th>:</th>
|
<th>:</th>
|
||||||
<td><?=$patnumber;?></td>
|
<td><?=$patnumber;?></td>
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ $name = $row['NAME'];
|
|||||||
}
|
}
|
||||||
echo "<td>$sampletext</td>";
|
echo "<td>$sampletext</td>";
|
||||||
echo "<td>
|
echo "<td>
|
||||||
<button type='button' class='btn btn-dark m-0 px-2 py-1' " . "onclick='printSingleLabel($accessnumber, \"$sampletext\")'" . "><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
|
<button type='button' class='btn btn-dark m-0 px-2 py-1' " . "onclick='printSingleLabel($accessnumber, $sampletype)'" . "><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
|
||||||
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Coll.</h6></button>
|
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Coll.</h6></button>
|
||||||
<button type='button' class='btn btn-warning m-0 px-2 py-1' onclick='uncollect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Coll.</h6></button>
|
<button type='button' class='btn btn-warning m-0 px-2 py-1' onclick='uncollect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Coll.</h6></button>
|
||||||
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceive($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
|
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceive($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
|
||||||
@ -109,10 +109,10 @@ $name = $row['NAME'];
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function printSingleLabel(access, sample) {
|
function printSingleLabel(access, sample) {
|
||||||
const url = '<?=base_url();?>prints/single_sample/'+access.toString()+'/'+sample.toString();
|
const url = '<?=base_url();?>printLabel/single/'+access.toString()+'/'+sample.toString();
|
||||||
|
|
||||||
fetch(url)
|
fetch(url)
|
||||||
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
|
||||||
if (data['status']) {
|
if (data['status']) {
|
||||||
@ -129,12 +129,11 @@ function printSingleLabel(access, sample) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function printAllLabel(access) {
|
function printAllLabel(access) {
|
||||||
const url = '<?=base_url();?>prints/all_sample/'+access.toString();
|
const url = '<?=base_url();?>printLabel/all/'+access.toString();
|
||||||
|
|
||||||
fetch(url)
|
fetch(url)
|
||||||
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
|
||||||
if (data['status']) {
|
if (data['status']) {
|
||||||
console.log(data['message']);
|
console.log(data['message']);
|
||||||
} else {
|
} else {
|
||||||
@ -142,7 +141,6 @@ function printAllLabel(access) {
|
|||||||
message = data['message']+"\n"+data['error'];
|
message = data['message']+"\n"+data['error'];
|
||||||
alert(message);
|
alert(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
|
|||||||
@ -28,17 +28,17 @@
|
|||||||
|
|
||||||
<div class="table-responsive mt-3">
|
<div class="table-responsive mt-3">
|
||||||
<table id="myTable" class="table table-hover">
|
<table id="myTable" class="table table-hover">
|
||||||
<thead>
|
<thead class='text-start'>
|
||||||
<th>Order</th>
|
<th class='text-start' width="10%">Order Date</th>
|
||||||
<th>MR</th>
|
<th width="12%">Patient#</th>
|
||||||
<th>Patient</th>
|
<th width="17%">Patient Name</th>
|
||||||
<th>Request</th>
|
<th class='text-start' width="10%">Access#</th>
|
||||||
<th>Hosp</th>
|
<th width="9%">Visit#</th>
|
||||||
<th>Test</th>
|
<th>Test</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="table-body">
|
<tbody id="table-body" class='text-start'>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -59,12 +59,12 @@
|
|||||||
let curDate = new Date().toJSON().slice(0, 10);
|
let curDate = new Date().toJSON().slice(0, 10);
|
||||||
$('.date1').val(curDate);
|
$('.date1').val(curDate);
|
||||||
$('.date2').val(curDate);
|
$('.date2').val(curDate);
|
||||||
|
index();
|
||||||
|
|
||||||
document.addEventListener('keydown', function(event) {
|
document.addEventListener('keydown', function(event) {
|
||||||
if (event.key === 'F5') { event.preventDefault(); index(); }
|
if (event.key === 'F5') { event.preventDefault(); index(); }
|
||||||
});
|
});
|
||||||
|
|
||||||
index();
|
|
||||||
function index() {
|
function index() {
|
||||||
let url = '<?=base_url('');?>api/dashboard/index';
|
let url = '<?=base_url('');?>api/dashboard/index';
|
||||||
date1 = $('.date1').val();
|
date1 = $('.date1').val();
|
||||||
@ -109,6 +109,7 @@ function index() {
|
|||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
colldate = data[i].COLLECTIONDATE.substr(0,10);
|
colldate = data[i].COLLECTIONDATE.substr(0,10);
|
||||||
patnumber = data[i].PATNUMBER.substr(-16,16);
|
patnumber = data[i].PATNUMBER.substr(-16,16);
|
||||||
|
patnumber = patnumber.substring(patnumber.length - 10);
|
||||||
accessnumber = data[i].SP_ACCESSNUMBER;
|
accessnumber = data[i].SP_ACCESSNUMBER;
|
||||||
patname = data[i].NAME;
|
patname = data[i].NAME;
|
||||||
hon = data[i].HOSTORDERNUMBER;
|
hon = data[i].HOSTORDERNUMBER;
|
||||||
@ -128,7 +129,7 @@ function index() {
|
|||||||
stattext = 'Collected';
|
stattext = 'Collected';
|
||||||
} else if(stat == 'PartRecv') {
|
} else if(stat == 'PartRecv') {
|
||||||
bgcolor = 'bg-soft-blue';
|
bgcolor = 'bg-soft-blue';
|
||||||
datafilter = "data-filterrow='2'";
|
datafilter = "data-filterrow='3'";
|
||||||
stattext = 'Part Received';
|
stattext = 'Part Received';
|
||||||
} else if(stat == 'Recv') {
|
} else if(stat == 'Recv') {
|
||||||
bgcolor = 'bg-blue';
|
bgcolor = 'bg-blue';
|
||||||
@ -147,8 +148,8 @@ function index() {
|
|||||||
datafilter = "data-filterrow='7'";
|
datafilter = "data-filterrow='7'";
|
||||||
stattext = 'Validated';
|
stattext = 'Validated';
|
||||||
}
|
}
|
||||||
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table" + datafilter +" ' >" +
|
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table'" + datafilter +" >" +
|
||||||
'<td>' + colldate + '</td> <td>' + patnumber + '</td> <td>' + accessnumber + '</td> <td>' + patname + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
|
"<td class='text-start'>" + colldate + '</td> <td>' + patnumber + '</td> <td>' + patname + "</td> <td class='text-start'>" + accessnumber + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
|
||||||
"<td role='button' class='"+bgcolor+" text-center align-middle'>"+stattext+"</td>" +
|
"<td role='button' class='"+bgcolor+" text-center align-middle'>"+stattext+"</td>" +
|
||||||
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
|
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
|
||||||
$("#table-body").append(datarow);
|
$("#table-body").append(datarow);
|
||||||
|
|||||||
@ -15,7 +15,7 @@ $name = $row['NAME'];
|
|||||||
<div class="col">
|
<div class="col">
|
||||||
<table class="table table-sm table-borderless">
|
<table class="table table-sm table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
<th width='18%'>Access#</th>
|
<th width='18%'>Access Number</th>
|
||||||
<th>:</th>
|
<th>:</th>
|
||||||
<td width='31%'><?=$accessnumber;?></td>
|
<td width='31%'><?=$accessnumber;?></td>
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ $name = $row['NAME'];
|
|||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>MR#</th>
|
<th>Patient Number</th>
|
||||||
<th>:</th>
|
<th>:</th>
|
||||||
<td><?=$patnumber;?></td>
|
<td><?=$patnumber;?></td>
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ $name = $row['NAME'];
|
|||||||
}
|
}
|
||||||
echo "<td>$sampletext</td>";
|
echo "<td>$sampletext</td>";
|
||||||
echo "<td>
|
echo "<td>
|
||||||
<button type='button' class='btn btn-dark m-0 px-2 py-1' " . "onclick='printSingleLabel($accessnumber, \"$sampletext\")'" . "><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
|
<button type='button' class='btn btn-dark m-0 px-2 py-1' " . "onclick='printSingleLabel($accessnumber, $sampletype)'" . "><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
|
||||||
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Coll.</h6></button>
|
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Coll.</h6></button>
|
||||||
<button type='button' class='btn btn-warning m-0 px-2 py-1' onclick='uncollect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Coll.</h6></button>
|
<button type='button' class='btn btn-warning m-0 px-2 py-1' onclick='uncollect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Coll.</h6></button>
|
||||||
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceive($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
|
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceive($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
|
||||||
@ -109,10 +109,10 @@ $name = $row['NAME'];
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function printSingleLabel(access, sample) {
|
function printSingleLabel(access, sample) {
|
||||||
const url = '<?=base_url();?>prints/single_sample/'+access.toString()+'/'+sample.toString();
|
const url = '<?=base_url();?>printLabel/single/'+access.toString()+'/'+sample.toString();
|
||||||
|
|
||||||
fetch(url)
|
fetch(url)
|
||||||
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
|
||||||
if (data['status']) {
|
if (data['status']) {
|
||||||
@ -129,12 +129,11 @@ function printSingleLabel(access, sample) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function printAllLabel(access) {
|
function printAllLabel(access) {
|
||||||
const url = '<?=base_url();?>prints/all_sample/'+access.toString();
|
const url = '<?=base_url();?>printLabel/all/'+access.toString();
|
||||||
|
|
||||||
fetch(url)
|
fetch(url)
|
||||||
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
|
||||||
if (data['status']) {
|
if (data['status']) {
|
||||||
console.log(data['message']);
|
console.log(data['message']);
|
||||||
} else {
|
} else {
|
||||||
@ -142,7 +141,6 @@ function printAllLabel(access) {
|
|||||||
message = data['message']+"\n"+data['error'];
|
message = data['message']+"\n"+data['error'];
|
||||||
alert(message);
|
alert(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
|
|||||||
@ -28,17 +28,17 @@
|
|||||||
|
|
||||||
<div class="table-responsive mt-3">
|
<div class="table-responsive mt-3">
|
||||||
<table id="myTable" class="table table-hover">
|
<table id="myTable" class="table table-hover">
|
||||||
<thead>
|
<thead class='text-start'>
|
||||||
<th>Order</th>
|
<th class='text-start' width="10%">Order Date</th>
|
||||||
<th>MR</th>
|
<th width="12%">Patient#</th>
|
||||||
<th>Patient</th>
|
<th width="17%">Patient Name</th>
|
||||||
<th>Request</th>
|
<th class='text-start' width="10%">Access#</th>
|
||||||
<th>Hosp</th>
|
<th width="9%">Visit#</th>
|
||||||
<th>Test</th>
|
<th>Test</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="table-body">
|
<tbody id="table-body" class='text-start'>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -59,12 +59,12 @@
|
|||||||
let curDate = new Date().toJSON().slice(0, 10);
|
let curDate = new Date().toJSON().slice(0, 10);
|
||||||
$('.date1').val(curDate);
|
$('.date1').val(curDate);
|
||||||
$('.date2').val(curDate);
|
$('.date2').val(curDate);
|
||||||
|
index();
|
||||||
|
|
||||||
document.addEventListener('keydown', function(event) {
|
document.addEventListener('keydown', function(event) {
|
||||||
if (event.key === 'F5') { event.preventDefault(); index(); }
|
if (event.key === 'F5') { event.preventDefault(); index(); }
|
||||||
});
|
});
|
||||||
|
|
||||||
index();
|
|
||||||
function index() {
|
function index() {
|
||||||
let url = '<?=base_url('');?>api/dashboard/index';
|
let url = '<?=base_url('');?>api/dashboard/index';
|
||||||
date1 = $('.date1').val();
|
date1 = $('.date1').val();
|
||||||
@ -109,6 +109,7 @@ function index() {
|
|||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
colldate = data[i].COLLECTIONDATE.substr(0,10);
|
colldate = data[i].COLLECTIONDATE.substr(0,10);
|
||||||
patnumber = data[i].PATNUMBER.substr(-16,16);
|
patnumber = data[i].PATNUMBER.substr(-16,16);
|
||||||
|
patnumber = patnumber.substring(patnumber.length - 10);
|
||||||
accessnumber = data[i].SP_ACCESSNUMBER;
|
accessnumber = data[i].SP_ACCESSNUMBER;
|
||||||
patname = data[i].NAME;
|
patname = data[i].NAME;
|
||||||
hon = data[i].HOSTORDERNUMBER;
|
hon = data[i].HOSTORDERNUMBER;
|
||||||
@ -128,7 +129,7 @@ function index() {
|
|||||||
stattext = 'Collected';
|
stattext = 'Collected';
|
||||||
} else if(stat == 'PartRecv') {
|
} else if(stat == 'PartRecv') {
|
||||||
bgcolor = 'bg-soft-blue';
|
bgcolor = 'bg-soft-blue';
|
||||||
datafilter = "data-filterrow='2'";
|
datafilter = "data-filterrow='3'";
|
||||||
stattext = 'Part Received';
|
stattext = 'Part Received';
|
||||||
} else if(stat == 'Recv') {
|
} else if(stat == 'Recv') {
|
||||||
bgcolor = 'bg-blue';
|
bgcolor = 'bg-blue';
|
||||||
@ -147,8 +148,8 @@ function index() {
|
|||||||
datafilter = "data-filterrow='7'";
|
datafilter = "data-filterrow='7'";
|
||||||
stattext = 'Validated';
|
stattext = 'Validated';
|
||||||
}
|
}
|
||||||
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table" + datafilter +" ' >" +
|
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table'" + datafilter +" >" +
|
||||||
'<td>' + colldate + '</td> <td>' + patnumber + '</td> <td>' + accessnumber + '</td> <td>' + patname + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
|
"<td class='text-start'>" + colldate + '</td> <td>' + patnumber + '</td> <td>' + patname + "</td> <td class='text-start'>" + accessnumber + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
|
||||||
"<td role='button' class='"+bgcolor+" text-center align-middle'>"+stattext+"</td>" +
|
"<td role='button' class='"+bgcolor+" text-center align-middle'>"+stattext+"</td>" +
|
||||||
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
|
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
|
||||||
$("#table-body").append(datarow);
|
$("#table-body").append(datarow);
|
||||||
|
|||||||
@ -15,7 +15,7 @@ $name = $row['NAME'];
|
|||||||
<div class="col">
|
<div class="col">
|
||||||
<table class="table table-sm table-borderless">
|
<table class="table table-sm table-borderless">
|
||||||
<tr>
|
<tr>
|
||||||
<th width='18%'>Access#</th>
|
<th width='18%'>Access Number</th>
|
||||||
<th>:</th>
|
<th>:</th>
|
||||||
<td width='31%'><?=$accessnumber;?></td>
|
<td width='31%'><?=$accessnumber;?></td>
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ $name = $row['NAME'];
|
|||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>MR#</th>
|
<th>Patient Number</th>
|
||||||
<th>:</th>
|
<th>:</th>
|
||||||
<td><?=$patnumber;?></td>
|
<td><?=$patnumber;?></td>
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ $name = $row['NAME'];
|
|||||||
}
|
}
|
||||||
echo "<td>$sampletext</td>";
|
echo "<td>$sampletext</td>";
|
||||||
echo "<td>
|
echo "<td>
|
||||||
<button type='button' class='btn btn-dark m-0 px-2 py-1' " . "onclick='printSingleLabel($accessnumber, \"$sampletext\")'" . "><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
|
<button type='button' class='btn btn-dark m-0 px-2 py-1' " . "onclick='printSingleLabel($accessnumber, $sampletype)'" . "><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
|
||||||
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Coll.</h6></button>
|
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Coll.</h6></button>
|
||||||
<button type='button' class='btn btn-warning m-0 px-2 py-1' onclick='uncollect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Coll.</h6></button>
|
<button type='button' class='btn btn-warning m-0 px-2 py-1' onclick='uncollect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Coll.</h6></button>
|
||||||
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceive($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
|
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceive($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
|
||||||
@ -109,10 +109,10 @@ $name = $row['NAME'];
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function printSingleLabel(access, sample) {
|
function printSingleLabel(access, sample) {
|
||||||
const url = '<?=base_url();?>prints/single_sample/'+access.toString()+'/'+sample.toString();
|
const url = '<?=base_url();?>printLabel/single/'+access.toString()+'/'+sample.toString();
|
||||||
|
|
||||||
fetch(url)
|
fetch(url)
|
||||||
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
|
||||||
if (data['status']) {
|
if (data['status']) {
|
||||||
@ -129,12 +129,11 @@ function printSingleLabel(access, sample) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function printAllLabel(access) {
|
function printAllLabel(access) {
|
||||||
const url = '<?=base_url();?>prints/all_sample/'+access.toString();
|
const url = '<?=base_url();?>printLabel/all/'+access.toString();
|
||||||
|
|
||||||
fetch(url)
|
fetch(url)
|
||||||
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
|
||||||
if (data['status']) {
|
if (data['status']) {
|
||||||
console.log(data['message']);
|
console.log(data['message']);
|
||||||
} else {
|
} else {
|
||||||
@ -142,7 +141,6 @@ function printAllLabel(access) {
|
|||||||
message = data['message']+"\n"+data['error'];
|
message = data['message']+"\n"+data['error'];
|
||||||
alert(message);
|
alert(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user