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.