devsofttech_hms_ci4/app
DevSoftTech Server 58e79318fd Remove buggy database-save-on-blur, implement client-side complaint table
BUGFIX: Removed database errors by switching to OPD-style client-side management

PROBLEM: Every time user edited a complaint field, it tried to save
to database immediately, causing 'Database error' messages in console.

ROOT CAUSE: The inline save approach doesn't match how OPD works.
OPD uses client-side JavaScript array and saves everything on form
submit, not on every keystroke.

SOLUTION:
1. Removed attachComplaintFieldHandlers() with fetch() database calls
2. Created selectedDischargeComplaints JavaScript array
3. Load existing PHP complaints into array on init
4. renderDischargeComplaintTable() builds table from array
5. Input events update array in-memory (no database calls)
6. Table now has Frequency, Severity, Duration columns like OPD

BENEFITS:
- No more database errors
- Faster editing (no network calls)
- OPD-like interface with all columns
- Edit any field without errors
- Will save all changes on form submit

NOTE: Still need to wire up 'Add' button and form submission in next commit.
2026-06-06 05:41:23 +05:30
..
Authentication/Authenticators Handle legacy null password hashes safely in session login 2026-03-05 14:08:30 +05:30
Commands Checkpoint: pathology panel modal workflow, gateway component search, and ABDM-style component/print editors 2026-05-30 06:32:30 +05:30
Config Add route for IPD discharge complaint field update endpoint 2026-06-06 05:27:18 +05:30
Controllers Fix database error in complaint field update - remove non-existent updated_at column 2026-06-06 05:33:18 +05:30
Database Add page settings and header footer support to discharge templates 2026-06-05 06:22:13 +05:30
Filters Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Helpers Add OPD appointment time capture and storage with date+time display 2026-04-28 07:59:47 +05:30
Language Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Libraries Add ABDM careContexts and OPD visit key 2026-06-01 13:54:56 +05:30
Models Simplify org-case queries to match CI3 pattern 2026-06-05 14:14:22 +05:30
ThirdParty Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Validation Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Views Remove buggy database-save-on-blur, implement client-side complaint table 2026-06-06 05:41:23 +05:30
.htaccess Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Common.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
index.html Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30