From 51f5a87f92807de421d3084096f286624fc369d1 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Sat, 8 Aug 2026 08:48:12 +0530 Subject: [PATCH] Include old UHID in OPD template output Append patient old_uhid to the OPD {{uhid_no}} placeholder only when a value exists. --- app/Controllers/Opd.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Controllers/Opd.php b/app/Controllers/Opd.php index 5491c2c..c1c4234 100644 --- a/app/Controllers/Opd.php +++ b/app/Controllers/Opd.php @@ -2601,7 +2601,11 @@ class Opd extends BaseController $phone = (string) ($patient->mphone1 ?? ''); $pAddress = trim((string) (($patient->add1 ?? '') . ', ' . ($patient->add2 ?? '') . ', ' . ($patient->city ?? '')), ' ,'); - $uhidNo = (string) ($patient->p_code ?? ''); + $uhidNo = trim((string) ($patient->p_code ?? '')); + $oldUhid = trim((string) ($patient->old_uhid ?? '')); + if ($oldUhid !== '') { + $uhidNo .= ' / ' . $oldUhid; + } $opdSrNo = (string) ($opd->opd_no ?? ''); $opdNo = (string) ($opd->opd_code ?? ''); $opdDate = (string) ($opd->str_apointment_date ?? '');