Problem:
- PDF shows old cached content with 'Date of Discharge: 2026-06-05'
- Debug page shows correct new format (status header only)
- Discharge content is cached in ipd_discharge table
- PDF generation uses cached content from database
- Fix only affects newly generated content, not cached content
Root Cause:
When discharge is first created, content is generated and saved to DB.
PDF generation flow (show_discharge method):
1. Load cached content from ipd_discharge table
2. Only regenerate if content is empty
3. Apply template and render PDF
So old discharges still have old format cached.
Solution:
Added 'refresh' parameter to show_discharge() method:
- If refresh=1, ignore cached content and regenerate
- Regenerate using buildAutoDischargeContent() (has fix)
- Save new content to database
- Then render PDF
Code Change (line 5900-5913):
Added:
\ = (int) (\->request->getGet('refresh') ?? 0) === 1;
Changed:
if (\ || trim(strip_tags(\)) === '') {
Usage:
1. Original URL (uses cache):
http://localhost:8080/Ipd_discharge/show_discharge/1/1?tpl=1
2. Force refresh (regenerates):
http://localhost:8080/Ipd_discharge/show_discharge/1/1?tpl=1&refresh=1
3. After first refresh, cache is updated with new format
Subsequent views will use new cached content
Note:
- preview_discharge_report() already has 'regen=1' parameter
- Same functionality, different parameter name
- Both methods now support force regeneration
For existing discharges:
- Add &refresh=1 to URL once to update cache
- Or recreate discharge from edit page
- Or clear ipd_discharge.content for that IPD ID"
71 lines
6.1 KiB
HTML
71 lines
6.1 KiB
HTML
Discharge Summary HTML Source (IPD ID: 1)
|
|
<style>body {
|
|
font-family: Verdana, Geneva, Tahoma, sans-serif;
|
|
}
|
|
|
|
table {
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
thead {
|
|
vertical-align: bottom;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
}
|
|
|
|
tfoot {
|
|
text-align: center;
|
|
font-weight: bold;
|
|
}
|
|
|
|
th {
|
|
text-align: left;
|
|
padding-left: 0.35em;
|
|
padding-right: 0.35em;
|
|
padding-top: 0.35em;
|
|
padding-bottom: 0.35em;
|
|
vertical-align: top;
|
|
}
|
|
|
|
td {
|
|
padding-left: 0.35em;
|
|
padding-right: 0.35em;
|
|
padding-top: 0.35em;
|
|
padding-bottom: 0.35em;
|
|
vertical-align: top;
|
|
}
|
|
|
|
p,
|
|
td {
|
|
font-family: Verdana, Geneva, Tahoma, sans-serif;
|
|
font-size: 10pt;
|
|
padding: 1px;
|
|
margin: 5px;
|
|
}
|
|
|
|
p {
|
|
text-indent: -25px;
|
|
}</style><h3><h2 class="discharge-title">Discharge Summary</h2><hr class="discharge-separator" /><table width="100%" cellpadding="0" cellspacing="0"><tr><td width="150px"><b>Name</b></td><td width="250px">KAMLA SINGH</td><td width="150px"><b>UHID</b></td><td width="250px">P26051000001</td></tr><tr><td width="150px"><b>Age & Gender</b></td><td width="250px">26 Year / Female</td><td width="150px"><b>IPD No.</b></td><td width="250px">A26050000001</td></tr><tr><td width="150px"><b>Guardian</b></td><td width="250px">W/O of RAM SINGH</td><td width="150px"><b>Admission</b></td><td width="250px">23-05-2026</td></tr><tr><td width="150px"><b>Phone No.</b></td><td width="250px">9720958717</td><td width="150px"><b>Discharge</b></td><td width="250px">05-06-2026</td></tr><tr><td width="150px"><b>Address</b></td><td width="250px">KASHIPUR</td><td width="150px"><b>Org. Name</b></td><td width="250px">Direct</td></tr><tr><td width="150px"><b>Department</b></td><td width="250px">Cardiology</td><td width="150px"></td><td width="250px"></td></tr></table><hr class="discharge-separator" /><br />
|
|
<br />
|
|
<b>Surgery : </b><br/>Laparocopy</p>
|
|
<p> <br />
|
|
<b>Procedure : </b><br/>Procedure TEST / <b>Date of Procedure :</b> 2026-06-03</p> <br />
|
|
<b>Presenting Complaints and Reason for Admission</b> :<br /> Acute rheumatic fever with acute arthritis<br /> Able to cough</p> <br />
|
|
<b>Pain Measurement Scale:</b> Mild Pain (1)</div>
|
|
<p><br />
|
|
<br />
|
|
<br />
|
|
<br />
|
|
<br />
|
|
<h4 style="margin:16px 0 8px 0;">Clinical Investigation Reports</h4><div><b>In-Hospital Lab:</b></div><table style="width:100%;border-collapse:collapse;margin:4px 0 8px 0;" border="1" cellpadding="6"><tr><th style="text-align:left;">Test</th><th style="text-align:left;">Fixed Normals</th><th style="text-align:left;">31-05-2026</th></tr><tr><td>Eosinophils</td><td></td><td>30</td></tr><tr><td>Hemoglobin</td><td></td><td>11</td></tr><tr><td>Total Leukocyte Count</td><td></td><td>10</td></tr><tr><td>Neutrophils</td><td></td><td>10</td></tr><tr><td>Lymphocytes</td><td></td><td>10</td></tr><tr><td>Monocytes</td><td></td><td>10</td></tr><tr><td>Red Blood Cells</td><td></td><td>10</td></tr><tr><td>Packed Cell Volume</td><td></td><td>10</td></tr><tr><td>Mean Corpuscular Volume</td><td></td><td>10</td></tr><tr><td>Mean Corpuscular Hemoglobin</td><td></td><td>10</td></tr><tr><td>Mean Corpuscular Hemoglobin Concentration</td><td></td><td>1</td></tr><tr><td>Platelet Count</td><td></td><td>010</td></tr></table>
|
|
<div> <br />
|
|
<br />
|
|
<b>Examination on Discharge : </b>Pulse /min :<i>80/min</i> Respiration /min :<i>30/min</i> BP mmHg :<i>80/120mmHg</i> SPO2 :<i>95</i></p>
|
|
<p> <br />
|
|
<h4 style="margin:16px 0 8px 0;">Discharge Medications</h4><table style="width:100%;border-style: inset;;margin-bottom:10px;" border="0" cellpadding="6"><tr><th style="width:40px;">#</th><th>Medicine</th><th style="width:90px;">Qty</th><th style="width:100px;">Days</th><th>Notes</th></tr><tr><td>1</td><td>Capsule Aciloc</td><td></td><td>1 day</td><td></td></tr><tr><td>2</td><td>Capsule Aciloc</td><td></td><td>1</td><td></td></tr><tr><td>3</td><td>Capsule Aciloc</td><td></td><td>1 day</td><td></td></tr><tr><td>4</td><td>Capsule Aciloc</td><td></td><td>1</td><td></td></tr></table><br />
|
|
<strong>Dietary Advice:</strong></div><ol style="margin:0 0 10px 20px;"><li><strong>Use appropriate medicine as Prescribed.:</strong> निर्धारित अनुसार उचित दवा का उपयोग करें।</li><li><strong>Fruits and Vegetables:</strong> पर्याप्त विटामिन और खनिज सुनिश्चित करने के लिए प्रतिदिन विभिन्न प्रकार के ताजे फल और सब्जियों का सेवन करें।</li><li><strong>Special Considerations:</strong> यदि आपको मधुमेह, उच्च रक्तचाप या किडनी संबंधी समस्या जैसी कोई विशेष समस्या है, तो अपने स्वास्थ्य सेवा प्रदाता द्वारा बताए गए आहार प्रतिबंधों का पालन करें। सर्जरी के बाद ठीक होने के लिए, उपचार को बढ़ावा देने के लिए अंडे, दाल और डेयरी उत्पादों जैसे प्रोटीन युक्त खाद्य पदार्थों को शामिल करें।</li></ol>
|
|
<table border="0" cellpadding="1" cellspacing="1" style="width:100%"><tbody><tr><td> </td><td> </td><td> </td></tr><tr><td style="text-align:left; vertical-align:middle">_________________________</td><td>_________________________</td><td style="text-align:right; vertical-align:middle">_________________________</td></tr><tr> <br />
|
|
<h4 style="margin:16px 0 8px 0;">Discharge Advice/Instructions/Summary</h4><div style="margin-bottom:8px;"><br />
|
|
<h2>Discharge Summary</h2><div><b>Date of Discharge:</b> 2026-06-05</div>
|
|
<p><br />
|
|
<td style="text-align:center; vertical-align:middle">Signature of Consultant</td></h3> |