Update Cara Baca
This commit is contained in:
@@ -528,7 +528,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-lg-12">
|
||||
<div class="form-group col-lg-3">
|
||||
<label for="id_pemeriksaantl" class="col-form-label">Pemeriksaan Tambahan Lainnya</label>
|
||||
<select class="form-control ekspertiseseletc" id="id_pemeriksaantl" name="id_pemeriksaantl">
|
||||
<option value="">Pilih Salah Satu</option>
|
||||
@@ -539,6 +539,30 @@
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-3">
|
||||
<label for="id_pemeriksaanhemolisa" class="col-form-label">Hemolisa</label>
|
||||
<select class="form-control ekspertiseseletc" id="id_pemeriksaanhemolisa" name="id_pemeriksaanhemolisa">
|
||||
<option value="">Pilih Salah Satu</option>
|
||||
<option value="ʆ hemolisa">ʆ hemolisa</option>
|
||||
<option value="β hemolisa">β hemolisa</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-3">
|
||||
<label for="id_pemeriksaankatalase" class="col-form-label">Tes Katalase</label>
|
||||
<select class="form-control ekspertiseseletc" id="id_pemeriksaankatalase" name="id_pemeriksaankatalase">
|
||||
<option value="">Pilih Salah Satu</option>
|
||||
<option value="Katalase +">Katalase +</option>
|
||||
<option value="Katalase -">Katalase -</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-3">
|
||||
<label for="id_pemeriksaankabulase" class="col-form-label">Tes Kabulase</label>
|
||||
<select class="form-control ekspertiseseletc" id="id_pemeriksaankabulase" name="id_pemeriksaankabulase">
|
||||
<option value="">Pilih Salah Satu</option>
|
||||
<option value="Kabulase +">Kabulase +</option>
|
||||
<option value="Kabulase -">Kabulase -</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-12">
|
||||
<label class="col-form-label">Kirby bauer :</label>
|
||||
<div class="form-row">
|
||||
@@ -2072,6 +2096,7 @@
|
||||
function openlamanekpertise( jQuery ){
|
||||
var dlp = document.getElementById('dlp').value;
|
||||
var nofoto = document.getElementById('nofoto').value;
|
||||
$('#template_jenis').val(dlp);
|
||||
$('#divtemplate').hide();
|
||||
$('.templatejawaban').hide();
|
||||
$('.setelahdipilihtemplate').show();
|
||||
@@ -2315,7 +2340,6 @@
|
||||
autoheight : true,
|
||||
source : dataAdapter,
|
||||
theme : "energyblue",
|
||||
selectionmode : 'checkbox',
|
||||
altrows : true,
|
||||
columns: [
|
||||
{ text: 'Expertise', filterable: false, columntype: 'button', align: 'center', width: 70, cellsrenderer: function () {
|
||||
@@ -2401,6 +2425,7 @@
|
||||
$("#asalpasien").html(dataRecord.asalpasien);
|
||||
$("#modaliti").val(dataRecord.modality);
|
||||
$("#dlp").val(dataRecord.dlp);
|
||||
$("#template_jenis").val(dataRecord.dlp);
|
||||
$("#nofoto").val(dataRecord.nofoto);
|
||||
$("#norm").val(dataRecord.noregister);
|
||||
$("#nonama").val(dataRecord.nama);
|
||||
@@ -2686,10 +2711,10 @@
|
||||
{ text: 'Date', datafield: 'daftartgl', width: 80, cellsalign: 'center', align: 'center'},
|
||||
{ text: 'Time', datafield: 'daftarjam', width: 80, cellsalign: 'center', align: 'center'},
|
||||
{ text: 'Comming From', filtertype: 'checkedlist', datafield: 'asalpasien', width: 120, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Service', datafield: 'tlsreques', width: 150, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Pengirim', filtertype: 'checkedlist', datafield: 'nmexcutor', width: 110, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Themeplate', filtertype: 'checkedlist', datafield: 'dlp', width: 75, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Jenis', filtertype: 'checkedlist', datafield: 'diagnosa2', width: 75, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Service', datafield: 'tlsreques', width: 170, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Pengirim', datafield: 'nmexcutor', width: 200, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Themeplate', filtertype: 'checkedlist', datafield: 'dlp', width: 100, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Jenis', filtertype: 'checkedlist', datafield: 'diagnosa2', width: 120, cellsalign: 'left', align: 'center'},
|
||||
{ text: 'Specimen', filtertype: 'checkedlist', datafield: 'nm_spesimen', width: 230, cellsalign: 'left', align: 'center'},
|
||||
]
|
||||
});
|
||||
|
||||
@@ -576,7 +576,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-lg-12">
|
||||
<div class="form-group col-lg-3">
|
||||
<label for="id_pemeriksaantl" class="col-form-label">Pemeriksaan Tambahan Lainnya</label>
|
||||
<select class="form-control ekspertiseseletc" id="id_pemeriksaantl" name="id_pemeriksaantl">
|
||||
<option value="">Pilih Salah Satu</option>
|
||||
@@ -587,6 +587,30 @@
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-3">
|
||||
<label for="id_pemeriksaanhemolisa" class="col-form-label">Hemolisa</label>
|
||||
<select class="form-control ekspertiseseletc" id="id_pemeriksaanhemolisa" name="id_pemeriksaanhemolisa">
|
||||
<option value="">Pilih Salah Satu</option>
|
||||
<option value="ʆ hemolisa">ʆ hemolisa</option>
|
||||
<option value="β hemolisa">β hemolisa</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-3">
|
||||
<label for="id_pemeriksaankatalase" class="col-form-label">Tes Katalase</label>
|
||||
<select class="form-control ekspertiseseletc" id="id_pemeriksaankatalase" name="id_pemeriksaankatalase">
|
||||
<option value="">Pilih Salah Satu</option>
|
||||
<option value="Katalase +">Katalase +</option>
|
||||
<option value="Katalase -">Katalase -</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-3">
|
||||
<label for="id_pemeriksaankabulase" class="col-form-label">Tes Kabulase</label>
|
||||
<select class="form-control ekspertiseseletc" id="id_pemeriksaankabulase" name="id_pemeriksaankabulase">
|
||||
<option value="">Pilih Salah Satu</option>
|
||||
<option value="Kabulase +">Kabulase +</option>
|
||||
<option value="Kabulase -">Kabulase -</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-12">
|
||||
<label class="col-form-label">Kirby bauer :</label>
|
||||
<div class="form-row">
|
||||
@@ -2142,6 +2166,7 @@
|
||||
function openlamanekpertise( jQuery ){
|
||||
var dlp = document.getElementById('dlp').value;
|
||||
var nofoto = document.getElementById('nofoto').value;
|
||||
$('#template_jenis').val(dlp);
|
||||
$('#divtemplate').hide();
|
||||
$('.templatejawaban').hide();
|
||||
$('.setelahdipilihtemplate').show();
|
||||
@@ -2471,6 +2496,7 @@
|
||||
$("#asalpasien").html(dataRecord.asalpasien);
|
||||
$("#modaliti").val(dataRecord.modality);
|
||||
$("#dlp").val(dataRecord.dlp);
|
||||
$("#template_jenis").val(dataRecord.dlp);
|
||||
$("#nofoto").val(dataRecord.nofoto);
|
||||
$("#norm").val(dataRecord.noregister);
|
||||
$("#nonama").val(dataRecord.nama);
|
||||
|
||||
@@ -511,6 +511,7 @@
|
||||
{ name: 'nmexcutor', type: 'text'},
|
||||
{ name: 'klinisi', type: 'text'},
|
||||
{ name: 'klinis', type: 'text'},
|
||||
{ name: 'poli', type: 'text'},
|
||||
{ name: 'poli_id', type: 'text'},
|
||||
{ name: 'keterangan', type: 'text'},
|
||||
{ name: 'kesimpulan', type: 'text'},
|
||||
@@ -690,7 +691,24 @@
|
||||
$('#modalawal').removeClass('col-lg-12').addClass('col-lg-8');
|
||||
}
|
||||
},
|
||||
|
||||
{ text: 'Stiker', filterable: false, columntype: 'button', align: 'center', width: 50, cellsrenderer: function () {
|
||||
return "Print";
|
||||
}, buttonclick: function (row) {
|
||||
editrowjabatan = row;
|
||||
var offset = $("#gridpemeriksaan").offset();
|
||||
var dataRecord = $("#gridpemeriksaan").jqxGrid('getrowdata', editrowjabatan);
|
||||
var nofoto = dataRecord.nofoto || '000000';
|
||||
var asalpasien = dataRecord.asalpasien || 'RSSA';
|
||||
var kd_spesimen = dataRecord.kd_spesimen || '00';
|
||||
var noregister = dataRecord.noregister || '00000';
|
||||
var nama = dataRecord.nama || 'xx';
|
||||
var tgllahir = dataRecord.tgllahir || '0000-00-00';
|
||||
var reques = dataRecord.poli || '-';
|
||||
var daftartgl = dataRecord.daftartgl || '0000-00-00';
|
||||
var item = `${asalpasien}<>${kd_spesimen}<>${noregister}<>${nama}<>${tgllahir}<>${reques}<>${daftartgl}`;
|
||||
jQueryOpenBarCode(item, nofoto);
|
||||
}
|
||||
},
|
||||
{ text: 'Ulang', filterable: false, columntype: 'button', align: 'center', width: 50, cellsrenderer: function () {
|
||||
return "Ulang";
|
||||
}, buttonclick: function (row) {
|
||||
@@ -766,48 +784,111 @@
|
||||
}
|
||||
}
|
||||
function jQueryOpenBarCode(item, nofoto) {
|
||||
var itemParts = item.split('<>');
|
||||
var itemName = itemParts[0].trim();
|
||||
var tahunpendek = itemParts.length > 1 ? itemParts[1].trim() : "xx";
|
||||
var nomor = itemParts.length > 2 ? itemParts[2].trim() : "xx";
|
||||
var tanggal = itemParts.length > 3 ? itemParts[3].trim() : "0000-00-00";
|
||||
var nofoto = itemParts.length > 4 ? itemParts[4].trim() : nofoto;
|
||||
var noregister = itemParts.length > 5 ? itemParts[5].trim() : "xx";
|
||||
var kd_spesimen = itemParts.length > 6 ? itemParts[6].trim() : "xx";
|
||||
var nama = itemParts.length > 7 ? itemParts[7].trim() : "xx";
|
||||
var itemPartsThn = tanggal.split('-');
|
||||
var tahun = itemPartsThn[0].trim();
|
||||
var bulan = itemPartsThn.length > 1 ? itemPartsThn[1].trim() : "00";
|
||||
var tanggal = itemPartsThn.length > 2 ? itemPartsThn[2].trim() : "00";
|
||||
if (itemName == 'Vitek 1' || itemName == 'Vitek 2'){
|
||||
var barcodeunik = tanggal+bulan+tahun+'-'+nomor;
|
||||
} else if (itemName == 'BD Bachtect' || itemName == 'BD MGIT'){
|
||||
var barcodeunik = tahunpendek+'-'+nomor;
|
||||
} else if (itemName == 'abbotm2000' || itemName == 'abbotm2000rt'){
|
||||
var barcodeunik = tahun+bulan+tanggal+'-'+nomor;
|
||||
} else {
|
||||
var barcodeunik = nofoto;
|
||||
}
|
||||
var barcodeContent = `<table><tr><td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">${kd_spesimen}-${nomor}</td><td align="right" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">${nama}</td></tr><tr><td colspan="2">`;
|
||||
var printWindow = window.open('', '', 'width=600,height=400');
|
||||
printWindow.document.write('<html><head><title>Print Barcode</title></head><body>');
|
||||
printWindow.document.write(barcodeContent);
|
||||
printWindow.document.write('<svg id="barcode"></svg></td></tr></table>');
|
||||
printWindow.document.write('</body></html>');
|
||||
printWindow.document.close();
|
||||
printWindow.onload = function() {
|
||||
var barcodeElement = printWindow.document.getElementById('barcode');
|
||||
if (barcodeElement) {
|
||||
JsBarcode(barcodeElement, barcodeunik, {
|
||||
format: "CODE128",
|
||||
displayValue: true
|
||||
});
|
||||
printWindow.print();
|
||||
printWindow.onafterprint = function () { printWindow.close(); };
|
||||
} else {
|
||||
console.error("Element #barcode tidak ditemukan di dalam jendela print.");
|
||||
var itemParts = item.split('<>');
|
||||
var asalpasien = itemParts[0]?.trim() || "xx";
|
||||
var kd_spesimen = itemParts[1]?.trim() || "xx";
|
||||
var noregister = itemParts[2]?.trim() || "xx";
|
||||
var nama = itemParts[3]?.trim() || "xx";
|
||||
var tgllahir = itemParts[4]?.trim() || "0000-00-00";
|
||||
var reques = itemParts[5]?.trim() || "xx";
|
||||
var daftartgl = itemParts[6]?.trim() || "xx";
|
||||
|
||||
var printWindow = window.open('', '', 'width=1000,height=700,scrollbars=yes,resizable=yes');
|
||||
|
||||
var style = `
|
||||
<style>
|
||||
@page {
|
||||
size: 5.5cm 4cm landscape;
|
||||
margin: 0;
|
||||
}
|
||||
};
|
||||
@media print {
|
||||
body {
|
||||
width: 5.5cm;
|
||||
height: 4cm;
|
||||
margin: 0;
|
||||
top: 0mm;
|
||||
padding: 0mm;
|
||||
font-family: Tahoma, Arial, sans-serif;
|
||||
}
|
||||
}
|
||||
body {
|
||||
width: 5.5cm;
|
||||
height: 4cm;
|
||||
margin: 0;
|
||||
padding: 0mm;
|
||||
font-family: Tahoma, Arial, sans-serif;
|
||||
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
svg {
|
||||
width: 70%;
|
||||
height: 35px;
|
||||
}
|
||||
td {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 8pt;
|
||||
font-weight: bold;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
`;
|
||||
|
||||
var html = `
|
||||
<html>
|
||||
<head>
|
||||
<title>Print Barcode</title>
|
||||
${style}
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tr>
|
||||
<td>${nofoto} / ${kd_spesimen} / ${asalpasien}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><svg id="barcode"></svg></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${noregister} / ${nama} / ${tgllahir}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${reques} ( ${daftartgl} )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
|
||||
printWindow.document.write(html);
|
||||
printWindow.document.close();
|
||||
|
||||
printWindow.onload = function () {
|
||||
var barcodeElement = printWindow.document.getElementById('barcode');
|
||||
if (barcodeElement) {
|
||||
JsBarcode(barcodeElement, nofoto, {
|
||||
format: "CODE128",
|
||||
displayValue: false,
|
||||
height: 25,
|
||||
margin: 0
|
||||
});
|
||||
|
||||
// Tunggu render selesai, baru print
|
||||
setTimeout(() => {
|
||||
printWindow.focus();
|
||||
printWindow.print();
|
||||
printWindow.onafterprint = function () {
|
||||
printWindow.close();
|
||||
};
|
||||
}, 500);
|
||||
} else {
|
||||
console.error("Element #barcode tidak ditemukan di dalam jendela print.");
|
||||
}
|
||||
};
|
||||
}
|
||||
$(window).on('load', function () {
|
||||
openedpage();
|
||||
|
||||
Reference in New Issue
Block a user