diff --git a/app/Controllers/Ipd_discharge.php b/app/Controllers/Ipd_discharge.php index f0c5505..18bc29d 100644 --- a/app/Controllers/Ipd_discharge.php +++ b/app/Controllers/Ipd_discharge.php @@ -5901,8 +5901,11 @@ class Ipd_discharge extends BaseController return $this->response->setStatusCode(404)->setBody('IPD not found'); } + // Check if user wants to force regenerate content (ignoring cache) + $forceRegenerate = (int) ($this->request->getGet('refresh') ?? 0) === 1; + $content = $this->getDischargeContent($ipdId); - if (trim(strip_tags($content)) === '') { + if ($forceRegenerate || trim(strip_tags($content)) === '') { $content = $this->buildAutoDischargeContent($ipdId, $panelData); if (trim(strip_tags($content)) !== '') { $this->saveDischargeContent($ipdId, $content); diff --git a/pdf_test_html.html b/pdf_test_html.html index b03f7f7..3f1e848 100644 --- a/pdf_test_html.html +++ b/pdf_test_html.html @@ -1,4255 +1,71 @@ - - - -
-
- Name : KAMLA SINGH - / Gender : Female - / Age : 26 Year - / UHID / Patient Code : P26051000001 - / IPD ID : A26050000001 -
- -
- -
- -
-
- -
- - -
-
- -
-
Personal History
-
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- -
-
-
- -
-
- From Nursing History & Physical Assessment - No Nursing H&P prefill found -
-
-
-
- - -
- -
- - -
-
- - -
-
- - -
-
- - -
-
-
- -
-
-
- -
-
Complaints with Duration and Reason for Admission
-
- - - - - - - - - - - - - - - - - - - - - - - - -
#ComplaintFrequencySeverityDuration
- - - - -
- - - - - - - - - -
- -
- - -
- - -
-
Pain Measurement Scale
- -
- - - - - -
-
- -
-
-
-
Drug Allergy / ADR (NABH)
-
-
- - - -
-
- - - -
-
- - -
-
- - -
-
-
-
-
-
-
Co-Morbidities
-
- - - - - -
-
- - -
- -
-
-
- -
- - -
- -
- -
-
-
- -
-
Examination on Admission
-
-
General Examination
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
- -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
- -
-
-
- -
-
Other / Systemic Examinations
-
- - -
-
- -
-
-
- -
-
Clinical Investigation Reports
-
-
-
- Clinical Investigation (In-Hospital Lab) - Blood Hb, Blood Sugar, Renal Function, Serum Bilirubin, Urine Test -
-
-
- - -
-
-
- -
-
- Clinical Investigation (X-Ray / ECG / Sonography / CT / MRI) - Select finalized impression-based reports during this admission -
-
-
No non-pathology impression reports found between admission and discharge dates.
-
-
- -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
- -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
- - -
- - - - -
- -
-
-
-
-
Admission / Discharge Information
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
-
- -
-
- Surgery / Procedure / delivery if any - -
-
-
Surgery
- - - - - - - - - - -
NameDateRemarkAction
LML2026-06-04
- - -
-
-
-
-
-
- - -
Procedure
- - - - - - - - - - -
NameDateRemarkAction
Procedure TEST2026-06-03
- - -
-
-
-
-
-
- -
-
-
- -
-
- Final Diagnosis - -
-
- - - - - -
DiagnosisRemarkAction
No diagnosis rows.
- -
-
-
-
-
- - Tip: if ICD match exists, selected value appends code in diagnosis text. -
- -
- - -
- -
- -
-
-
- -
-
Summary of key investigation during Hospitalization
-
- -
- -
-
-
- -
-
Course / Treatment in the hospital
-
- - - - - -
CourseRemarkAction
No course rows.
- -
-
-
-
-
- -
- -
- - -
- -
- -
-
-
- -
-
Condition at the time of Discharge
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
-
- -
-
Discharge Medicine Prescribed
-
- - - - -
-
- - No Rx-Group selected -
-
Select group and preview medicines before add.
-
- - - - - - -
MedicineTypeDoseWhenFreqDaysQtyRemarkAction
No medicine added
- - -
-
-
-
-
-
-
-
-
-
-
-
-
- -
- - - - - - - - - - -
- - - - - - - - - - - - - - - -
-
-
- - - -
-
- Discharge Instructions / Advice - -
-
-
- -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - -
-
- -
-
-
Selected Dietary Advice (Hindi print preview)
-
No dietary advice selected.
-
-
- -
- - -
- -
- - -
-
- - -
-
- -
-
-
- -
-
-
-
-
- - - - - - - - - - - - -
+ p { + text-indent: -25px; + }

Discharge Summary


NameKAMLA SINGHUHIDP26051000001
Age & Gender26 Year / FemaleIPD No.A26050000001
GuardianW/O of RAM SINGHAdmission23-05-2026
Phone No.9720958717Discharge05-06-2026
AddressKASHIPUROrg. NameDirect
DepartmentCardiology


+
+Surgery :
Laparocopy

+

 
+Procedure :
Procedure TEST    / Date of Procedure : 2026-06-03

 
+Presenting Complaints and Reason for Admission :
Acute rheumatic fever with acute arthritis
Able to cough

 
+Pain Measurement Scale: Mild Pain (1) +


+ 
+ 
+ 
+
+

Clinical Investigation Reports

In-Hospital Lab:
TestFixed Normals31-05-2026
Eosinophils30
Hemoglobin11
Total Leukocyte Count10
Neutrophils10
Lymphocytes10
Monocytes10
Red Blood Cells10
Packed Cell Volume10
Mean Corpuscular Volume10
Mean Corpuscular Hemoglobin10
Mean Corpuscular Hemoglobin Concentration1
Platelet Count010
+
 
+ 
+Examination on Discharge : Pulse /min :80/min   Respiration /min :30/min   BP mmHg :80/120mmHg   SPO2 :95

+

 
+

Discharge Medications

#MedicineQtyDaysNotes
1Capsule Aciloc1 day
2Capsule Aciloc1
3Capsule Aciloc1 day
4Capsule Aciloc1

+Dietary Advice:
  1. Use appropriate medicine as Prescribed.: निर्धारित अनुसार उचित दवा का उपयोग करें।
  2. Fruits and Vegetables: पर्याप्त विटामिन और खनिज सुनिश्चित करने के लिए प्रतिदिन विभिन्न प्रकार के ताजे फल और सब्जियों का सेवन करें।
  3. Special Considerations: यदि आपको मधुमेह, उच्च रक्तचाप या किडनी संबंधी समस्या जैसी कोई विशेष समस्या है, तो अपने स्वास्थ्य सेवा प्रदाता द्वारा बताए गए आहार प्रतिबंधों का पालन करें। सर्जरी के बाद ठीक होने के लिए, उपचार को बढ़ावा देने के लिए अंडे, दाल और डेयरी उत्पादों जैसे प्रोटीन युक्त खाद्य पदार्थों को शामिल करें।
+ 
+

Discharge Advice/Instructions/Summary


+

Discharge Summary

Date of Discharge: 2026-06-05
+


+

\ No newline at end of file
   
___________________________________________________________________________
Signature of Consultant