diff --git a/app/Controllers/Opd.php b/app/Controllers/Opd.php index c8039d7..a0eff0b 100644 --- a/app/Controllers/Opd.php +++ b/app/Controllers/Opd.php @@ -3762,7 +3762,9 @@ class Opd extends BaseController ]); $tokens['provisional_diagnosis_list'] = $renderClinicalList($provisionalDiagnosisItems); - $tokens['vital_content'] = $formatBlock('Vitals', (string) ($tokens['vital_content'] ?? ''), false); + $vitalCoreRaw = (string) ($tokens['vital_content_raw'] ?? ''); + $tokens['vital_content'] = $vitalCoreRaw; + $tokens['vital_content_block'] = $formatBlock('Vitals', $vitalCoreRaw, false); $complaintBlockValue = (string) ($tokens['complaint_list'] ?? ''); if ($complaintBlockValue === '') { $complaintBlockValue = nl2br($escape((string) ($tokens['Complaint_raw'] ?? ''))); @@ -3883,8 +3885,9 @@ class Opd extends BaseController $tokens['current_medications_block'] = $currentMeds !== '' ? $formatBlock('Current Medications', esc($currentMeds)) : ''; // Keep both raw and formatted allergy placeholders for template compatibility. $tokens['allergic_history_raw'] = $allergicHistoryRaw; - $tokens['allergic_history'] = $allergicHistoryRaw !== '' ? $formatBlock('Allergic History', esc($allergicHistoryRaw)) : ''; - $tokens['allergic_history_block'] = $tokens['allergic_history']; + $tokens['allergic_history'] = $allergicHistoryRaw; + $tokens['allergic_history_block'] = $allergicHistoryRaw !== '' ? $formatBlock('Allergic History', esc($allergicHistoryRaw)) : ''; + $tokens['allergic_history_formatted'] = $tokens['allergic_history_block']; $tokens['adr_history'] = $adrHistory; // ── Women related (formatted) ───────────────────────────────────────── @@ -3930,7 +3933,7 @@ class Opd extends BaseController ? $blockGapHtml . '