replace unit, with cm_dict_test unit

This commit is contained in:
mahdahar 2024-12-17 09:52:07 +07:00
parent 736ea4d356
commit 8f0d1e3c2e

View File

@ -226,6 +226,9 @@ class PrintResult extends BaseController {
} else {
$resvalue = $item['RESVALUE'];
}
$reff = $item["REFRANGE"];
$refftext = $item["REFFTEXT"];
if($refftext !='') {$reff = $refftext;}
$resultTest .= "
<tr>
<td colspan='1' class=''>
@ -235,7 +238,7 @@ class PrintResult extends BaseController {
<td class=''>" . $resflag . "</td>
<td class=''>" . $resvalue . "</td>
<td class=''>" . $item["UNIT"] . "</td>
<td class=''>" . $item["REFRANGE"] . "</td>
<td class=''>" . $reff . "</td>
<td class=''>" . $item["serum_type"] . "</td>
</tr>
";
@ -321,9 +324,8 @@ class PrintResult extends BaseController {
t.TESTORDER,
dt.SHORTTEXT,
RESULT = case when t.RESVALUE is null then tx.FULLTEXT else t.RESVALUE end,
cr.*
cr.*, cdt.REFFTEXT
from REQUESTS r
left join TESTS t on t.REQUESTID = r.REQUESTID
left join DICT_TESTS dt on dt.ENDVALIDDATE is null and t.TESTID=dt.TESTID
left join DICT_TEXTS tx on tx.TEXTID=t.CODEDRESULTID