diff --git a/app/Controllers/Opd.php b/app/Controllers/Opd.php index a0f881a..09e0920 100644 --- a/app/Controllers/Opd.php +++ b/app/Controllers/Opd.php @@ -1429,7 +1429,7 @@ class Opd extends BaseController 'margin_bottom' => 5, 'margin_header' => 5, 'margin_footer' => 5, - 'default_font' => 'freeserif', + 'default_font' => 'dejavusans', 'autoScriptToLang' => true, 'autoLangToFont' => true, 'tempDir' => WRITEPATH . 'cache', @@ -1539,7 +1539,7 @@ class Opd extends BaseController 'margin_bottom' => $marginBottom, 'margin_header' => $marginHeader, 'margin_footer' => $marginFooter, - 'default_font' => 'freeserif', + 'default_font' => 'dejavusans', 'autoScriptToLang' => true, 'autoLangToFont' => true, 'tempDir' => WRITEPATH . 'cache', @@ -2518,7 +2518,7 @@ class Opd extends BaseController $tokens['advice_raw'] = (string) ($tokens['advice'] ?? ''); $tokens['next_visit_raw'] = (string) ($tokens['next_visit'] ?? ''); - $tokens['vital_content'] = $formatBlock('Vitals', (string) ($tokens['vital_content'] ?? ''), true); + $tokens['vital_content'] = $formatBlock('Vitals', (string) ($tokens['vital_content'] ?? ''), false); $tokens['Complaint'] = $formatBlock('Complaint', (string) ($tokens['Complaint_raw'] ?? '')); $tokens['complaint'] = $tokens['Complaint']; $tokens['diagnosis'] = $formatBlock('Diagnosis', (string) ($tokens['diagnosis_raw'] ?? '')); @@ -2529,7 +2529,22 @@ class Opd extends BaseController $tokens['finding_examinations'] = $tokens['Finding_Examinations']; $tokens['investigation'] = $formatBlock('Investigation Advised', (string) ($tokens['investigation_raw'] ?? '')); $tokens['Prescriber_Remarks'] = $formatBlock('Remarks', (string) ($tokens['Prescriber_Remarks_raw'] ?? '')); - $tokens['advice'] = $formatBlock('Advice', (string) ($tokens['advice_raw'] ?? '')); + $adviceRaw = trim((string) ($tokens['advice_raw'] ?? '')); + $adviceLocalText = trim((string) ($tokens['advice_local'] ?? '')); + if ($adviceRaw !== '') { + $advLabelHtml = 'सलाह (Advice) :'; + $adviceHtml = '
'; + if ($adviceLocalText !== '') { + $adviceHtml .= $advLabelHtml . ' ' . $adviceLocalText . ''; + $adviceHtml .= '
(Advice: ' . $adviceRaw . ')
'; + } else { + $adviceHtml .= $advLabelHtml . ' ' . $adviceRaw; + } + $adviceHtml .= '
'; + $tokens['advice'] = $adviceHtml; + } else { + $tokens['advice'] = ''; + } $tokens['next_visit'] = $formatBlock('Next Visit', (string) ($tokens['next_visit_raw'] ?? '')); $medicalHtml = trim((string) ($tokens['medical'] ?? '')); diff --git a/app/Views/billing/opd_letter_head_pdf.php b/app/Views/billing/opd_letter_head_pdf.php index 9063c84..a75b009 100644 --- a/app/Views/billing/opd_letter_head_pdf.php +++ b/app/Views/billing/opd_letter_head_pdf.php @@ -117,6 +117,26 @@ $toLocalText = static function (string $input): string { 'hydrate' => 'पर्याप्त पानी लें', 'avoid oily food' => 'तैलीय भोजन से बचें', 'follow up' => 'फॉलो-अप करें', + 'review warning signs' => 'चेतावनी के संकेतों पर ध्यान दें', + 'warning signs' => 'चेतावनी के संकेत', + 'if symptoms persist' => 'यदि लक्षण बने रहें', + 'if symptoms worsen' => 'यदि लक्षण बिगड़ें', + 'follow-up' => 'फॉलो-अप', + 'bed rest' => 'बिस्तर पर आराम', + 'light diet' => 'हल्का भोजन', + 'plenty of water' => 'पर्याप्त पानी पियें', + 'plenty of fluids' => 'पर्याप्त तरल पदार्थ', + 'drink water' => 'पानी पियें', + 'avoid cold' => 'ठंड से बचें', + 'no smoking' => 'धूम्रपान न करें', + 'avoid alcohol' => 'शराब से बचें', + 'take medicine regularly' => 'नियमित दवाई लें', + 'low salt diet' => 'कम नमक का भोजन', + 'low sugar diet' => 'कम चीनी का भोजन', + 'exercise regularly' => 'नियमित व्यायाम करें', + 'avoid stress' => 'तनाव से बचें', + 'wear mask' => 'मास्क पहनें', + 'wash hands' => 'हाथ धोएं', 'review' => 'पुनः जांच', ]; @@ -137,7 +157,7 @@ $toLocalText = static function (string $input): string { OPD Consult Note