update red value, printable, panjang char untuk ditampilkan di hasil
This commit is contained in:
parent
91df417ac0
commit
da67dda940
@ -5,8 +5,6 @@ class PrintResult extends BaseController {
|
||||
|
||||
public function otherTests($resultData, $data, $note){
|
||||
|
||||
// var_dump($data);die();
|
||||
|
||||
if($data[0] != null) {
|
||||
|
||||
$accessnumber = $data[0]['SP_ACCESSNUMBER'];
|
||||
@ -99,12 +97,12 @@ class PrintResult extends BaseController {
|
||||
<table class='result t_center'>
|
||||
|
||||
<tr align='left'>
|
||||
<th class='padmaColor' style='width:43%'>Parameter</th>
|
||||
<th class='padmaColor' style='width:35%'>Parameter</th>
|
||||
<th class='padmaColor' style='width:1%'> </th>
|
||||
<th class='padmaColor' style='width:12%'>Result</th>
|
||||
<th class='padmaColor' style='width:11%'>Unit</th>
|
||||
<th class='padmaColor' style='width:21%'>Normal Range</th>
|
||||
<th class='padmaColor' style='width:13%'>Sample Type</th>
|
||||
<th class='padmaColor' style='width:23%'>Result</th>
|
||||
<th class='padmaColor' style='width:14%'>Unit</th>
|
||||
<th class='padmaColor' style='width:19%'>Normal Range</th>
|
||||
<th class='padmaColor' style='width:9%'>Sample</th>
|
||||
</tr>
|
||||
|
||||
";
|
||||
@ -236,7 +234,7 @@ class PrintResult extends BaseController {
|
||||
$i++;
|
||||
|
||||
// Melebihi batas Kertas
|
||||
if($i % 30 == 0) {
|
||||
if($i % 28 == 0) {
|
||||
$resultTest .= "</table></div>";
|
||||
$fullPage .= $headPage.$resultTest.$footerPage.$lastDiv;
|
||||
$i=0;
|
||||
@ -258,7 +256,7 @@ class PrintResult extends BaseController {
|
||||
}
|
||||
|
||||
// Melebihi batas Kertas
|
||||
if($i % 30 == 0 && $i!=0) {
|
||||
if($i % 28 == 0 && $i!=0) {
|
||||
$resultTest .= "</table></div>";
|
||||
$fullPage .= $headPage.$resultTest.$footerPage.$lastDiv;
|
||||
$i=0;
|
||||
@ -279,23 +277,44 @@ class PrintResult extends BaseController {
|
||||
$unit = $item['UNIT'];
|
||||
$unittext = $item['UNITTEXT'];
|
||||
if($unittext !='') {$unit = $unittext;}
|
||||
$resultTest .= "
|
||||
<tr>
|
||||
<td colspan='1' class=''>
|
||||
<!-- <pre> ".$space . $i.". ".$item["test_eng"]." ". "<small>".$item["test_ind"]."</small></pre> -->
|
||||
<pre>" . $space . $item["test_eng"]." "."<small><i>".$item["test_ind"]."</i></small></pre>
|
||||
<!-- <pre> ".$space."<small>".$item["test_ind"]."</small></pre> -->
|
||||
</td>
|
||||
<td class=''>" . $resflag . "</td>
|
||||
<td class=''>" . $resvalue . "</td>
|
||||
<td class=''>" . $unit . "</td>
|
||||
<td class=''>" . $reff . "</td>
|
||||
<td class=''>" . $serum_type . "</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$color = "";
|
||||
if($resflag == 'L' || $resflag == 'H'){
|
||||
$color = "red_font";
|
||||
}
|
||||
|
||||
// Untuk Nama Test Apakah lebih dari 24 karakter
|
||||
if ( strlen($item['test_eng']) > 24 || strlen($item['test_ind']) > 24) {
|
||||
$resultTest .= "
|
||||
<tr>
|
||||
<td colspan='1' class=''>
|
||||
<pre>" . $space . $item["test_eng"].""."<br>$space<small><i>".$item["test_ind"]."</i></small></pre>
|
||||
</td>
|
||||
<td class='".$color."'>" . $resflag . "</td>
|
||||
<td class='".$color."'>" . $resvalue . "</td>
|
||||
<td class=''>" . $unit . "</td>
|
||||
<td class=''>" . $reff . "</td>
|
||||
<td class=''>" . $serum_type . "</td>
|
||||
</tr>
|
||||
";
|
||||
} else {
|
||||
$resultTest .= "
|
||||
<tr>
|
||||
<td colspan='1' class=''>
|
||||
<pre>" . $space . $item["test_eng"]." "."<small><i>".$item["test_ind"]."</i></small></pre>
|
||||
</td>
|
||||
<td class='".$color."'>" . $resflag . "</td>
|
||||
<td class='".$color."'>" . $resvalue . "</td>
|
||||
<td class=''>" . $unit . "</td>
|
||||
<td class=''>" . $reff . "</td>
|
||||
<td class=''>" . $serum_type . "</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
// Melebihi batas Kertas
|
||||
if($i % 30 == 0 && $i != 0) {
|
||||
if($i % 28 == 0 && $i != 0) {
|
||||
$resultTest .= "</table></div>";
|
||||
$fullPage .= $headPage.$resultTest.$footerPage.$lastDiv;
|
||||
$i=0;
|
||||
@ -373,6 +392,7 @@ class PrintResult extends BaseController {
|
||||
cdt.TEXT2 as test_ind,
|
||||
cdt.UNIT as UNITTEXT,
|
||||
t.DEPTH,
|
||||
t.NOTPRINTABLE,
|
||||
t.TESTORDER,
|
||||
dt.SHORTTEXT,
|
||||
RESULT = case when t.RESVALUE is null then tx.FULLTEXT else t.RESVALUE end,
|
||||
@ -397,40 +417,53 @@ class PrintResult extends BaseController {
|
||||
$serum_type = $item["serum_type"];
|
||||
$tesscode = $item["TESTCODE"];
|
||||
$test_eng = $item["test_eng"];
|
||||
return $serum_type == 'Urine' && ($tesscode == 'PPT' || $test_eng == "Pregnancy Test");
|
||||
$printable = $item['NOTPRINTABLE'];
|
||||
return $serum_type == 'Urine' && ($tesscode == 'PPT' || $test_eng == "Pregnancy Test") && $printable !=1;
|
||||
});
|
||||
$data_urine_lengkap = array_filter($results, function($item) {
|
||||
$serum_type = $item["serum_type"];
|
||||
$tesscode = $item["TESTCODE"];
|
||||
$test_eng = $item["test_eng"];
|
||||
$chap_eng = $item["chap_eng"];
|
||||
return $serum_type == 'Urine' && $tesscode != 'PPT' && $test_eng != "Pregnancy Test" && $chap_eng != "MICROBIOLOGY";
|
||||
$printable = $item['NOTPRINTABLE'];
|
||||
return $serum_type == 'Urine' && $tesscode != 'PPT' && $test_eng != "Pregnancy Test" && $chap_eng != "MICROBIOLOGY" && $printable !=1;
|
||||
});
|
||||
$data_urine_kultur = array_filter($results, function($item) {
|
||||
$serum_type = $item["serum_type"];
|
||||
$chap_eng = $item["chap_eng"];
|
||||
return $serum_type == 'Urine' && $chap_eng == "MICROBIOLOGY";
|
||||
$printable = $item['NOTPRINTABLE'];
|
||||
return $serum_type == 'Urine' && $chap_eng == "MICROBIOLOGY" && $printable !=1;
|
||||
});
|
||||
$data_feces_stc2 = array_filter($results, function($item) {
|
||||
$serum_type = $item["serum_type"];
|
||||
$tesscode = $item["TESTCODE"];
|
||||
return $serum_type == 'Feces' && in_array($tesscode, ['STC2', 'SCSAL', 'SCSHI']);
|
||||
$printable = $item['NOTPRINTABLE'];
|
||||
return $serum_type == 'Feces' && in_array($tesscode, ['STC2', 'SCSAL', 'SCSHI']) && $printable !=1;
|
||||
});
|
||||
$data_feces_stc4 = array_filter($results, function($item) {
|
||||
$serum_type = $item["serum_type"];
|
||||
$tesscode = $item["TESTCODE"];
|
||||
return $serum_type == 'Feces' && in_array($tesscode, ['STC4', 'FCSAL', 'FCSHI', 'FCVIB', 'FCESC']);
|
||||
$printable = $item['NOTPRINTABLE'];
|
||||
return $serum_type == 'Feces' && in_array($tesscode, ['STC4', 'FCSAL', 'FCSHI', 'FCVIB', 'FCESC']) && $printable !=1;
|
||||
});
|
||||
$data_feces_lengkap = array_filter($results, function($item) {
|
||||
$serum_type = $item["serum_type"];
|
||||
$tesscode = $item["TESTCODE"];
|
||||
return $serum_type == 'Feces' && !in_array($tesscode, ['STC2', 'SCSAL', 'SCSHI', 'STC4', 'FCSAL', 'FCSHI', 'FCVIB', 'FCESC']);
|
||||
$printable = $item['NOTPRINTABLE'];
|
||||
return $serum_type == 'Feces' && !in_array($tesscode, ['STC2', 'SCSAL', 'SCSHI', 'STC4', 'FCSAL', 'FCSHI', 'FCVIB', 'FCESC']) && $printable !=1;
|
||||
});
|
||||
|
||||
$data_RCS = array_filter($results, function($item) {
|
||||
$serum_type = $item["serum_type"];
|
||||
$printable = $item['NOTPRINTABLE'];
|
||||
return $serum_type == 'Swab Tenggorokan' && $printable !=1;
|
||||
});
|
||||
|
||||
$data_others = array_filter($results, function($item) {
|
||||
$serum_type = $item["serum_type"];
|
||||
$chapter_eng = $item['chap_eng'];
|
||||
return $serum_type != 'Feces' && $serum_type != 'Urine' && $chapter_eng != 'Note';
|
||||
$printable = $item['NOTPRINTABLE'];
|
||||
return $serum_type != 'Feces' && $serum_type != 'Urine' && $chapter_eng != 'Note' && $serum_type != 'Swab Tenggorokan' && $printable !=1;
|
||||
});
|
||||
|
||||
$notes = array_filter($results, function($item) {
|
||||
@ -442,13 +475,16 @@ class PrintResult extends BaseController {
|
||||
$notes = reset($notes); // Ambil elemen pertama
|
||||
$note = $notes["RESULT"] ?? "-"; // Ambil nilai RESULT, atau null jika tidak ada
|
||||
|
||||
|
||||
$fullPage = "";
|
||||
|
||||
if ($data_others != null) {
|
||||
$fullPage .= $this->otherTests($data_others, $data, $note);
|
||||
}
|
||||
|
||||
if ($data_RCS != null) {
|
||||
$fullPage .= $this->otherTests($data_RCS, $data, $note);
|
||||
}
|
||||
|
||||
if ($data_urine_kultur != null) {
|
||||
$fullPage .= $this->otherTests($data_urine_kultur, $data, $note);
|
||||
}
|
||||
|
||||
@ -8,6 +8,10 @@ body {
|
||||
background-color: rgb(17, 16, 16);
|
||||
}
|
||||
|
||||
.red_font {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#page {
|
||||
background: rgb(255, 255, 255);
|
||||
display: block;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user