devsofttech_hms_ci4/app/Controllers
DevSoftTech Server d096585df6 \Fix {{DISCHARGE_SUMMARY}} placeholder - remove extra information
Problem:
- {{DISCHARGE_SUMMARY}} placeholder was showing:
  1. Discharge status header (Discharge Summary/LAMA/etc.)
  2. Department information
  3. Treating Doctor(s) information
  4. Date of Admission
- User wants ONLY the status header in this placeholder
- Extra information should be removed from {{DISCHARGE_SUMMARY}}

Solution:
Modified buildAutoDischargeContent() method:

Before (lines 1679-1703):
- Built dischargeSummaryParts array with department/doctor/date
- Added all info in one section with header + div containing details

After:
- {{DISCHARGE_SUMMARY}} now contains ONLY the status header
- Removed department, doctor, and admission date from this section
- Status header comes from ipd_discharg_status table via:
  ipd_master.ipd_status (or discarge_patient_status) = ipd_discharg_status.id
  Returns ipd_discharg_status.status_details field

Status Values:
- ipd_status = 0 → 'Discharge Summary' (hardcoded)
- ipd_status = 1 → From DB: 'Discharge Summary'
- ipd_status = 2 → From DB: 'Leave Against Medical Advice'
- ipd_status = 3 → From DB: 'Refer To Higher Centre'
- ipd_status = 5 → From DB: 'Dead Summary'
- ipd_status = 7 → From DB: 'Discharge on Request'

Now {{DISCHARGE_SUMMARY}} outputs:
<h4 class='discharge-section-heading'>Discharge Summary</h4>
OR
<h4 class='discharge-section-heading'>Leave Against Medical Advice</h4>

That's it - no extra lines below.

If user needs department/doctor/date info, they can use individual tokens:
- {{DEPARTMENT}}
- {{DOCTOR_NAMES}}
- {{ADMIT_DATE_ONLY}}
- {{DISCHARGE_DATE_ONLY}}
- {{ADMISSION_TIME}}
- {{DISCHARGE_TIME}}

Or use {{PATIENT_INFO_TABLE}} which has all patient demographics.

Testing:
- Visit: /Ipd_discharge/debug_discharge_html/1
- Check {{DISCHARGE_SUMMARY}} section
- Should only show status header, no other info"
2026-06-07 08:12:03 +05:30
..
Billing Change mPDF default font from thin dejavusans to medium-weight freeserif for better Hindi/Devanagari rendering 2026-06-06 11:19:35 +05:30
Setting fix(discharge-template): make delete endpoint reliable for URL and AJAX 2026-06-05 07:37:39 +05:30
AbdmBridgeLog.php feat(abdm): proper FHIR bundles for lab reports and IPD discharge 2026-05-23 04:41:59 +05:30
AbdmCodingPanel.php feat: SNOMED background coding pipeline + ABDM Coding Panel 2026-05-19 20:40:27 +05:30
AbdmGateway.php Change mPDF default font from thin dejavusans to medium-weight freeserif for better Hindi/Devanagari rendering 2026-06-06 11:19:35 +05:30
AbdmOpdQueue.php Fix ABDM OPD HMS patient profile link route to person_record 2026-05-25 12:14:23 +05:30
AbdmTaskBoard.php Accept OPConsultRecord bundle lookups 2026-06-01 13:34:35 +05:30
Abha.php feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
BaseController.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Diagnosis.php Change mPDF default font from thin dejavusans to medium-weight freeserif for better Hindi/Devanagari rendering 2026-06-06 11:19:35 +05:30
DoctorDocument.php Improve doctor document workflow and print performance 2026-05-06 02:06:18 +05:30
Finance.php feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
HealthplixCallback.php Fix HealthPlix fetch parsing and refine sidebar headings 2026-04-28 07:28:34 +05:30
HealthplixGateway.php feat: add HealthPlix OPD sync flow with settings, diagnostics, and sync ID persistence 2026-04-27 08:32:51 +05:30
Home.php Add dedicated Save Settings button for user preferences 2026-04-28 13:54:46 +05:30
Invoice.php Fix payment request receipt content and PDF print 2026-04-10 04:16:17 +05:30
Ipd_discharge.php \Fix {{DISCHARGE_SUMMARY}} placeholder - remove extra information 2026-06-07 08:12:03 +05:30
IpdPatient.php Add nursing scan-to-structured workflow and discharge UI polish 2026-03-09 00:12:04 +05:30
Item.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
ItemIpd.php feat(ipd-charges): group delete, sort order, Up/Down buttons, foldable billing panels 2026-04-18 06:56:38 +05:30
Medical.php Restore legacy pharmacy reports and fix net/payment totals 2026-06-01 10:53:27 +05:30
OcasePathLap.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Opd_prescription.php Persist consult NABH fields via remarks fallback 2026-06-05 05:53:24 +05:30
Opd.php Change mPDF default font from thin dejavusans to medium-weight freeserif for better Hindi/Devanagari rendering 2026-06-06 11:19:35 +05:30
Opdcase.php Add OPD appointment time capture and storage with date+time display 2026-04-28 07:59:47 +05:30
OrgPacking.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Package.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Patient.php Add DataTables search box support to patient search - now handles both initial search and live filtering 2026-06-06 14:56:02 +05:30
Payment_Medical.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Report.php Add refer doctor filter to diagnosis report 2026-04-09 19:11:39 +05:30
Setup.php Fix: {{advice}} prints as-is (no Hindi/AI conversion); fix Schema Diff truncation 2026-04-16 12:31:42 +05:30
Storestock.php Change mPDF default font from thin dejavusans to medium-weight freeserif for better Hindi/Devanagari rendering 2026-06-06 11:19:35 +05:30