diff --git a/app/Controllers/Ipd_discharge.php b/app/Controllers/Ipd_discharge.php index 4fa922e..f0c5505 100644 --- a/app/Controllers/Ipd_discharge.php +++ b/app/Controllers/Ipd_discharge.php @@ -1676,30 +1676,13 @@ class Ipd_discharge extends BaseController // It is available as {{PATIENT_INFO_TABLE}} token for templates to use if needed. // This matches CI3 behavior where template controlled the patient info display. - // Build Discharge Summary section (high-level overview) - $dischargeSummaryParts = []; - $admitDate = trim((string) ($ipd->admit_date ?? '')); - $dischargeDate = trim((string) ($ipd->discharge_date ?? '')); - $deptName = $this->getDischargeDepartmentName($ipd); - $doctorNames = $this->getDischargeDoctorNames($ipd); + // Build Discharge Summary section - ONLY the status header + // Get discharge status text based on ipd_status from ipd_discharg_status table + $dischargeStatusHeader = $this->getDischargeStatusText($ipd); - if ($deptName !== '') { - $dischargeSummaryParts[] = 'Department: ' . esc($deptName); - } - if ($doctorNames !== '') { - $dischargeSummaryParts[] = 'Treating Doctor(s): ' . esc($doctorNames); - } - if ($admitDate !== '') { - $dischargeSummaryParts[] = 'Date of Admission: ' . esc($admitDate); - } - // NOTE: Date of Discharge removed per user request - - if (! empty($dischargeSummaryParts)) { - // Get discharge status text based on ipd_status - $dischargeStatusHeader = $this->getDischargeStatusText($ipd); - - $sections[] = '