devsofttech_hms_ci4/app
DevSoftTech Server 2b95bb8b7c Fix: Data mixing between instruction_other and instruction_remark fields
ISSUE: instruction_remark (Discharge Summary) data appearing in instruction_other (Other Advice) field after save

ROOT CAUSE: Legacy table sync was writing wrong variable
- Save handler at line 5478 was writing \ to legacy food_text
- Should have been writing \
- When legacy fallback loads (if food_ids empty), wrong data copied to instruction_other

FIX: Changed line 5478 in Ipd_discharge.php
- Before: \['food_text'] = \;
- After:  \['food_text'] = \;

FILES MODIFIED:
1. app/Controllers/Ipd_discharge.php - Fixed legacy save handler
2. app/Views/billing/ipd/discharge_create.php - Removed debug comments

TESTING STEPS:
1. Clear corrupt legacy data: php clear_legacy_food.php 1
2. Go to /Ipd_discharge/ipd_select/1
3. Clear both fields
4. Type 'Hello Other' in Other Advice
5. Type 'Hello Discharge' in Discharge Summary
6. Click 'Save Discharge Advice'
7. After reload: Other Advice should show 'Hello Other', NOT 'Hello Discharge'

SCRIPTS ADDED:
- check_instruction_db.php - Check database values
- check_legacy_food.php - Check legacy table
- clear_legacy_food.php - Clean corrupt legacy data
- list_instruction_records.php - List all records
2026-06-07 20:00:59 +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 Fix: Disable auto-generation of discharge templates + add manual creation button 2026-06-07 11:38:18 +05:30
Controllers Fix: Data mixing between instruction_other and instruction_remark fields 2026-06-07 20:00:59 +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 Fix: Re-initialize CKEditor after Save Discharge Advice button 2026-06-07 19:48:33 +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