devsofttech_hms_ci4/app/Config
DevSoftTech Server c65a5cdc68 Add routes for debug endpoints - fix 404 errors
Problem:
- GET: Ipd_discharge/debug_discharge_html/1 returning 404
- GET: Ipd_discharge/debug_ipd_fields/1 returning 404
- Debug endpoints were created but routes were not registered

Solution:
Added two new routes in app/Config/Routes.php:

1. Debug IPD Fields Endpoint:
   Route: Ipd_discharge/debug_ipd_fields/(:num)
   Controller: Ipd_discharge::debug_ipd_fields/\
   Method: GET

   Returns JSON showing:
   - All available field names in ipd_master table
   - Values of time fields (reg_time, discharge_time)
   - Values of department fields (dept_id)
   - Values of doctor fields (r_doc_id, r_doc_name)
   - Result of getDischargeDepartmentName() function
   - Result of getDischargeDoctorNames() function
   - Result of safeTime() for time fields

2. Debug Discharge HTML Endpoint:
   Route: Ipd_discharge/debug_discharge_html/(:num)
   Controller: Ipd_discharge::debug_discharge_html/\
   Method: GET

   Returns HTML page showing:
   - Complete discharge summary HTML source
   - Syntax highlighted for easy reading
   - All placeholders replaced with actual values
   - Useful for checking spacing and HTML structure

Route Placement:
- Added after search_patient_ajax route
- Before ipd_select route
- Follows existing Ipd_discharge route pattern
- Uses (:num) parameter for IPD ID

Usage:
- http://localhost:8080/Ipd_discharge/debug_ipd_fields/1
- http://localhost:8080/Ipd_discharge/debug_discharge_html/1
- Replace '1' with actual IPD ID

Note: Routes must be defined BEFORE more general routes
Otherwise, the (:num) pattern in ipd_select would catch them first

Testing:
1. Pull latest code
2. Access /Ipd_discharge/debug_ipd_fields/1
3. Should return JSON with field values
4. Access /Ipd_discharge/debug_discharge_html/1
5. Should return HTML source page
2026-06-07 07:48:43 +05:30
..
Boot Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
AbdmConnector.php feat: SNOMED background coding pipeline + ABDM Coding Panel 2026-05-19 20:40:27 +05:30
App.php Allow allowedHostnames via .env and document usage 2026-04-28 06:32:29 +05:30
Auth.php Ignore stale opd appointment intended URL after login 2026-04-08 19:57:40 +05:30
AuthGroups.php Add permission for Admin to edit patient name anytime 2026-06-05 17:33:31 +05:30
AuthToken.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Autoload.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Cache.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Constants.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
ContentSecurityPolicy.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Cookie.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Cors.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
CURLRequest.php Fix CURLRequest constants compatibility for AI server calls 2026-03-29 05:11:51 +05:30
Database.php Fix: Cast port to int and DBDebug to boolean from env() 2026-04-15 08:28:28 +05:30
DocTypes.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Email.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Encryption.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Events.php Skip debug toolbar collection for AJAX requests 2026-03-01 01:28:27 +05:30
Exceptions.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Feature.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Filters.php Reduce OPD XHR overhead by excluding toolbar and using date-equality filters 2026-03-01 01:34:34 +05:30
ForeignCharacters.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Format.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Generators.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Honeypot.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Hostnames.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Images.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Kint.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Logger.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Migrations.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Mimes.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Modules.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Optimize.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Pager.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Paths.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Publisher.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Routes.php Add routes for debug endpoints - fix 404 errors 2026-06-07 07:48:43 +05:30
Routing.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Security.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Services.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Session.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Toolbar.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
UserAgents.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
Validation.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
View.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
WorkerMode.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30