Perbaikan Printer FO dan Tampilan Hasil Test

This commit is contained in:
mikael-zakaria 2024-12-06 11:40:27 +08:00
parent 344633f0ea
commit 57a23a307e
3 changed files with 15 additions and 168 deletions

View File

@ -23,11 +23,10 @@ class PrinterController extends BaseController {
$filename = "sample_".$logTime; $filename = "sample_".$logTime;
$role = session()->get('userrole'); $role = session()->get('userrole');
// $role = "admin";
$networkPath = ""; $networkPath = "";
// Ruang Analis Printer POSTEK C168/200s // Ruang Analis Printer POSTEK C168/200s
if ($role == 'admin' || $role == 'user') { if ($role === 'admin' || $role === 'user') {
// Buka Mapping Drive PC Laboratorium // Buka Mapping Drive PC Laboratorium
exec('net use L: \\\\10.148.5.20\\Labelshare /user:Administrator 2>&1', $output, $return_var); exec('net use L: \\\\10.148.5.20\\Labelshare /user:Administrator 2>&1', $output, $return_var);
@ -55,7 +54,7 @@ P1
"; ";
// Ruang Analis Printer Zebra // Ruang Analis Printer Zebra
} else if ($role == 'sampling') { } else if ($role === 'sampling') {
// Buka Mapping Drive PC Sampling // Buka Mapping Drive PC Sampling
exec('net use S: \\\\10.148.3.169\\Labelshare /user:Administrator 2>&1', $output, $return_var); exec('net use S: \\\\10.148.3.169\\Labelshare /user:Administrator 2>&1', $output, $return_var);
@ -124,7 +123,7 @@ P1
$networkPath = ""; $networkPath = "";
// Ruang Analis Printer POSTEK // Ruang Analis Printer POSTEK
if ($role == 'admin' || $role == 'user') { if ($role === 'admin' || $role === 'user') {
// Buka Mapping Drive PC Laboratorium // Buka Mapping Drive PC Laboratorium
exec('net use L: \\\\10.148.5.20\\Labelshare /user:Administrator 2>&1', $output, $return_var); exec('net use L: \\\\10.148.5.20\\Labelshare /user:Administrator 2>&1', $output, $return_var);
@ -172,7 +171,7 @@ P1
} }
// Ruang Analis Printer Zebra // Ruang Analis Printer Zebra
} else if ($role == 'sampling') { } else if ($role === 'sampling') {
// Buka Mapping Drive PC Sampling // Buka Mapping Drive PC Sampling
exec('net use S: \\\\10.148.3.169\\Labelshare /user:Administrator 2>&1', $output, $return_var); exec('net use S: \\\\10.148.3.169\\Labelshare /user:Administrator 2>&1', $output, $return_var);
@ -240,158 +239,6 @@ P1
} }
public function testsUrineOrFeces($request){
$fullPage="";
$headPage = "
<div id='page'>
<div id='pagetop' style='height:0.01cm'> </div>
<img src='http://cmod.id/assets/img/padma-header.png' class='img' />
<div id='dinfo'>
<table class='information t_center'>
<tr>
<th class='padmaColor' colspan='6' align='center'>CLINICAL LABORATORY</th>
</tr>
<tr>
<th style='width:12%' align='left'>UHID</th>
<td style='width:2%'>:</td>
<td style='width:44%'>1BCJJAJSDK</td>
<th style='width:20%' align='left'>Sample ID</th>
<td style='width:2%'>:</td>
<td style='width:20%'>LAB2420076951</td>
</tr>
<tr>
<th align='left'>Name</th>
<td>:</td>
<td>Ni Luh Putu Eka Putri Saraswati </td>
<th align='left'>Specimen</th>
<td>:</td>
<td>Serum</td>
</tr>
<tr>
<th align='left'>Age/Gender</th>
<td>:</td>
<td>22 year(s) / Male</td>
<th align='left'>Collection Date/Time</th>
<td>:</td>
<td>26-10-2024 / 11:55:04</td>
</tr>
<tr>
<th align='left'>Speciality</th>
<td>:</td>
<td></td>
<th align='left'>Result Date/Time</th>
<td>:</td>
<td>26-10-2024 / 11:52:04</td>
</tr>
</table>
</div>
<div id='dresult'>
<br>
<table class='result t_center'>
<tr align='left'>
<th class='padmaColor' style='width:25%'>Parameter</th>
<th class='padmaColor' style='width:15%'>Result</th>
<th class='padmaColor' style='width:8%'>Unit</th>
<th class='padmaColor' style='width:17%'>Normal Range</th>
<th class='padmaColor' style='width:35%'>Notes</th>
</tr>
";
$resultTest ="";
$footerPage = "
<div id='footer'>
<table class='table_footer t_center'>
<tr>
<td></td>
<td align='right'><img src='http://cmod.id/assets/img/ttd.png' alt=''></td>
</tr>
<tr>
<td><u>Entered By</u></td>
<td align='right'><u>Verified By</u></td>
</tr>
<tr>
<td>Lab Technician</td>
<td align='right'></td>
</tr>
<tr>
<td>Mrs. Gst Ayu Riska Mastari</td>
<td align='right'>dr. I Komang Parwata Sp.PK</td>
</tr>
<tr>
<td></td>
<td align='right'>Reg. No: 570/SIPDS/0001/I/DPMPTSP/2023</td>
</tr>
</table>
</div>
";
$lastDiv="</div>";
$i=0;
foreach ($request as $chapter) {
$i++;
// Untuk Chapter
$resultTest .= "
<tr align='left' class='chapter'>
<td colspan='5'>
<pre><b>".$chapter['chapter_eng']."</b></pre>
<pre> <small><b>".$chapter['chapter_ind']."</b></small></pre>
</td>
</tr>
";
// Melebihi batas Kertas
if($i % 25 == 0) {
$resultTest .= "</table></div>";
$fullPage .= $headPage.$resultTest.$footerPage.$lastDiv;
$i=0;
$resultTest = "";
}
foreach($chapter["tests"] as $test) {
$i++;
$resultTest .= "
<tr>
<td colspan='1' class=''>
<pre> ".$test["test_eng"]."</pre>
<pre> <small>".$test["test_ind"]."</small></pre>
</td>
<td class=''>" . $test["result"] . "</td>
<td class=''>" . $test["unit"] . "</td>
<td class=''>" . $test["range"] . "</td>
<td class=''>" . $test["notes"] . "</td>
</tr>
";
// Melebihi batas Kertas
if($i % 25 == 0) {
$resultTest .= "</table></div>";
$fullPage .= $headPage.$resultTest.$footerPage.$lastDiv;
$i=0;
$resultTest = "";
}
}
}
$resultTest .= "
</table>
</div>";
$fullPage .= $headPage.$resultTest.$footerPage.$lastDiv;
return $fullPage;
}
public function otherTests($request){ public function otherTests($request){
$fullPage=""; $fullPage="";
$headPage = " $headPage = "
@ -498,14 +345,10 @@ P1
</tr> </tr>
<tr> <tr>
<td>Lab Technician</td> <td>Lab Technician</td>
<td align='right'></td>
</tr>
<tr>
<td>Mrs. Gst Ayu Riska Mastari</td>
<td align='right'>dr. I Komang Parwata Sp.PK</td> <td align='right'>dr. I Komang Parwata Sp.PK</td>
</tr> </tr>
<tr> <tr>
<td></td> <td>Mrs. Gst Ayu Riska Mastari</td>
<td align='right'>Reg. No: 570/SIPDS/0001/I/DPMPTSP/2023</td> <td align='right'>Reg. No: 570/SIPDS/0001/I/DPMPTSP/2023</td>
</tr> </tr>
</table> </table>
@ -1493,10 +1336,10 @@ P1
$fullPage = ""; $fullPage = "";
if ($data_urine !== null) { if ($data_urine !== null) {
$fullPage .= $this->testsUrineOrFeces($data_urine); $fullPage .= $this->otherTests($data_urine);
} }
if ($data_feces !== null) { if ($data_feces !== null) {
$fullPage .= $this->testsUrineOrFeces($data_feces); $fullPage .= $this->otherTests($data_feces);
} }
if ($data_others !== null) { if ($data_others !== null) {
$fullPage .= $this->otherTests($data_others); $fullPage .= $this->otherTests($data_others);

View File

@ -54,12 +54,12 @@ $name = $row['NAME'];
?> ?>
<tr> <tr>
<td></td> <td></td> <td>Collection</td> <td></td> <td></td> <td>Collection</td>
<td> <button class='badge badge-dark' onclick='printAllLabel()'><i class='bi bi-printer'></i></button> </td> <td> <button class='badge badge-dark'><i class='bi bi-printer'></i></button> </td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td> <td>All</td> <td></td> <td></td> <td>All</td>
<td> <td>
<button class='badge text-bg-dark'><i class='bi bi-printer'></i></button> <button class='badge text-bg-dark' onclick='printAllLabel()'><i class='bi bi-printer'></i></button>
<button class='badge text-bg-success' onclick='collectAll(<?=$accessnumber;?>)'>Coll.</button> <button class='badge text-bg-success' onclick='collectAll(<?=$accessnumber;?>)'>Coll.</button>
</td> </td>
</tr> </tr>

View File

@ -30,7 +30,7 @@ body {
#dresult { #dresult {
margin: 0; margin: 0;
padding: 0; padding: 0;
height: 20.4cm; height: 19.5cm;
} }
.result { .result {
table-layout:fixed; table-layout:fixed;
@ -108,7 +108,7 @@ tr.chapter td {
/* float:left; */ /* float:left; */
margin:0; margin:0;
padding: 0; padding: 0;
height:2.85cm; height:3.75cm;
} }
.table_footer { .table_footer {
@ -116,6 +116,10 @@ tr.chapter td {
/* border:solid 1px black; */ /* border:solid 1px black; */
border-collapse:collapse; border-collapse:collapse;
} }
.table_footer tr td {
padding: 4px;
/* border:solid 1px black; */
}
.img { width:200mm; margin-left:0.5cm } .img { width:200mm; margin-left:0.5cm }