Changes:
- app/Config/Routes.php: Add GET /batch/pdf/(:num) route without auth filter
- app/Controllers/ReportController.php: Add generatePdfNoAuth() method
- script.php: Update to use new batch/pdf endpoint with localhost URL
Usage: php script.php accessnumbers.txt
Endpoint: http://localhost/gdc_cmod/batch/pdf/{accessnumber}
No authentication required - for internal/batch processing only.
Add millisecond timing for each step:
- Database check
- Report data fetching (ReportHelper)
- HTML template rendering
- Spooler API call
- Total time per accessnumber
- Add flush() after each echo to show progress in real-time
- Increase curl timeout to 30 seconds with 10 second connect timeout
- Add curl error handling to diagnose connection issues
- Add progress messages (generating HTML, sending to spooler)
Add script.php for batch generating PDFs from a list of accessnumbers.
Features:
- Reads accessnumbers from text file (one per line)
- Validates requests exist and are validated (ISVAL2=1)
- Uses REPORT_LANG to determine language
- Sends to PDF spooler and logs to AUDIT_REQUESTS
- Creates ORU files for HL7 integration
- Outputs progress and saves detailed log
Usage: php script.php accessnumbers.txt