From 5801b5d27675f4ab9ed3646067c0bdb5a96d97f7 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Tue, 14 Apr 2026 07:50:50 +0530 Subject: [PATCH] Refine {{medical}} table widths and instruction row styling --- app/Controllers/Opd.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/app/Controllers/Opd.php b/app/Controllers/Opd.php index 024ffb0..f2ed33c 100644 --- a/app/Controllers/Opd.php +++ b/app/Controllers/Opd.php @@ -2312,7 +2312,7 @@ class Opd extends BaseController $medicalHtml = ''; if (!empty($rxMeds)) { $medicalHtml .= ''; - $medicalHtml .= ''; + $medicalHtml .= ''; $i = 0; foreach ($rxMeds as $med) { $i++; @@ -2416,21 +2416,25 @@ class Opd extends BaseController if ($generic !== '') { $nameHtml .= '
Salt/Generic: ' . esc($generic) . '
'; } + + $hasInstruction = ($inst !== '' || $instLocal !== ''); + $baseRowCellStyle = $hasInstruction ? ' style="border-bottom:none;"' : ''; + $medicalHtml .= '' - . '' - . '' - . '' + . '' . $nameHtml . '' + . '' . esc($doseFreqText) . ($doseFreqLocal !== '' ? ('
' . esc($doseFreqLocal) . '
') : '') . '' - . '
' - . '' + . '' . esc($qty) . '' + . '' . esc($days) . '' . ''; - if ($inst !== '' || $instLocal !== '') { + if ($hasInstruction) { $medicalHtml .= '' . '' . '' . '';
#MedicineDose/FreqQtyDay
#MedicineDose/FreqQtyDay
' . $i . '' . $nameHtml . '' . esc($doseFreqText) + . '' . $i . '' . esc($qty) . '' . esc($days) . '
' - . '
Instruction: ' . esc($inst !== '' ? $inst : '-') . '
' + . '
' . esc($inst !== '' ? $inst : '-') . '
' . ($instLocal !== '' ? ('
' . esc($instLocal) . '
') : '') . '