From 922b6c3e35f2b615cada22cffea3d2e7d8dcd095 Mon Sep 17 00:00:00 2001 From: mikael-zakaria Date: Thu, 27 Feb 2025 15:42:43 +0700 Subject: [PATCH] Update Rescomment pada Laporan Hasil --- app/Controllers/PrintResult.php | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/app/Controllers/PrintResult.php b/app/Controllers/PrintResult.php index ae55d90..1bb488c 100644 --- a/app/Controllers/PrintResult.php +++ b/app/Controllers/PrintResult.php @@ -378,13 +378,15 @@ class PrintResult extends BaseController { $color = "red_font"; } + // Hanya Untuk Yang Kode Nya Adalah CODE/CM $range = $this->checkRange($item['RESULT'], $item['REFFTEXT']); if ($item['code_type'] == 6 && $item['REFFTEXT'] != null) { - if ($range == true) { // Jika nilai masih dalam rentang nilai normal + if ($range == true) { // Jika nilai masih dalam rentang nilai normal misal : 0 - 1 $color = ""; - } elseif ($range == false) { // Jika nilai bukan merupakan rentang - if ($item['RESULT'] != $item['REFFTEXT']) { + } elseif ($range == false) { // Jika nilai bukan merupakan rentang alias hanya code + $redWord = ["positive", "reactive"]; + if (in_array(strtolower($item['RESULT']), $redWord)) { $color = "red_font"; } } @@ -393,6 +395,17 @@ class PrintResult extends BaseController { } } + // Hanya Untuk Kondisi Ada Komentar Dibawah Result + if ($item['RESCOMMENT'] != null) { + $rescomment = "
" . $item['RESCOMMENT'] . ""; + $redWord = ["positive", "reactive"]; + if (in_array(strtolower($item['RESCOMMENT']), $redWord)) { + $color = "red_font"; + } + } else { + $rescomment = ""; + } + $test = ""; // Untuk Nama Test Apakah lebih dari 24 karaktera @@ -409,7 +422,7 @@ class PrintResult extends BaseController { ".$test." " . $resflag . " - " . $resvalue . " + " . $resvalue . $rescomment ." " . $serum_type . " "; @@ -420,7 +433,7 @@ class PrintResult extends BaseController { ".$test." " . $resflag . " - " . $resvalue . " + " . $resvalue . $rescomment ." " . "
" .$unit. "
" . "
 						" . "
" .$reff. "
" . "
 						" . $serum_type . "