From b7d9cf2bbefb5191c69c81f4ffbc25d9a97abae2 Mon Sep 17 00:00:00 2001 From: mikael-zakaria Date: Mon, 6 Jan 2025 16:39:12 +0700 Subject: [PATCH] perbaikan hasil free text --- app/Controllers/PrintResult.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/app/Controllers/PrintResult.php b/app/Controllers/PrintResult.php index 80ac439..ed74fc9 100644 --- a/app/Controllers/PrintResult.php +++ b/app/Controllers/PrintResult.php @@ -283,17 +283,23 @@ class PrintResult extends BaseController { $color = "red_font"; } + + $test = ""; // Untuk Nama Test Apakah lebih dari 24 karakter if ( strlen($item['test_eng']) > 24 || strlen($item['test_ind']) > 24) { + $test = "
" . $space . $item["test_eng"]."
$space".$item["test_ind"]."
"; + } else { + $test = "
" . $space . $item["test_eng"]." "."".$item["test_ind"]."
"; + } + + if ($item['code_type'] == 5) { $resultTest .= " -
" . $space . $item["test_eng"].""."
$space".$item["test_ind"]."
+ ".$test." " . $resflag . " - " . $resvalue . " - " . $unit . " - " . $reff . " + " . $resvalue . " " . $serum_type . " "; @@ -301,7 +307,7 @@ class PrintResult extends BaseController { $resultTest .= " -
" . $space . $item["test_eng"]." "."".$item["test_ind"]."
+ ".$test." " . $resflag . " " . $resvalue . " @@ -312,6 +318,7 @@ class PrintResult extends BaseController { "; } + // Melebihi batas Kertas if($i % 28 == 0 && $i != 0) { @@ -382,7 +389,7 @@ class PrintResult extends BaseController { // t.TESTORDER; // "; - $sql = " + $sql = " select dc.CHAPID, dc.FULLTEXT as chap_eng, @@ -395,6 +402,7 @@ class PrintResult extends BaseController { t.NOTPRINTABLE, t.TESTORDER, dt.SHORTTEXT, + t.RESTYPE as code_type, RESULT = case when t.RESVALUE is null then tx.FULLTEXT else t.RESVALUE end, cr.*, cdt.REFFTEXT from REQUESTS r @@ -409,10 +417,9 @@ class PrintResult extends BaseController { where r.ACCESSNUMBER='$access' ORDER BY t.TESTORDER "; - $query = $db->query($sql); $results = $query->getResultArray(); - + $data_pregnancy = array_filter($results, function($item) { $serum_type = $item["serum_type"]; $tesscode = $item["TESTCODE"];