From 7f957bfb96218680a687afd2e9bda947fb77e12d Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Sat, 6 Jun 2026 05:40:23 +0530 Subject: [PATCH] WIP: Redesign IPD complaints table structure to match OPD (Frequency/Severity/Duration columns) WORK IN PROGRESS: Table structure updated, JavaScript needs complete rewrite CHANGES: 1. Added Frequency, Severity, Duration columns (matching OPD) 2. Removed static PHP rendering of complaint rows 3. Added hidden discharge_complaints_json field for data storage 4. Added dropdown divs for frequency/severity/duration autocomplete5. Table now has OPD-like structure NEXT STEPS NEEDED: - Rewrite JavaScript to use client-side array (like OPD) - Remove database-save-on-blur code (causing errors) - Implement render function to build table from array - Add inline editing with autocomplete - Save JSON on form submit instead of individual updates NOTE: This commit has the new table structure but old JavaScript. The page may not work correctly until JavaScript is updated in next commit. --- app/Views/billing/ipd/discharge_create.php | 56 ++++++---------------- 1 file changed, 14 insertions(+), 42 deletions(-) diff --git a/app/Views/billing/ipd/discharge_create.php b/app/Views/billing/ipd/discharge_create.php index 1762bc7..87b16aa 100644 --- a/app/Views/billing/ipd/discharge_create.php +++ b/app/Views/billing/ipd/discharge_create.php @@ -710,62 +710,26 @@ $allergyStatusNoKnown = in_array($allergyStatusNormalized, ['no known drug aller
Complaints with Duration and Reason for Admission
- - - - + - + + + - - - - - - - - - - + -
# ComplaintRemarkFrequencySeverityDuration
No complaint rows yet.
- - - - - -
+
+ + + + + + + +