gdc_cmod/TODO.md
mahdahar 2843ddd392 Migrate PDF generation from legacy spooler_db to CI4 + node_spooler
BREAKING CHANGE: Remove public/spooler_db/ legacy system

Changes:
- Migrate validation preview from http://glenlis/spooler_db/main_dev.php to CI4 /report/{accessnumber}
- Add ReportController::preview() for HTML preview in validation dialog
- Add ReportController::generatePdf() to queue PDF generation via node_spooler at http://glenlis:3030
- Add ReportController::checkPdfStatus() to poll spooler job status
- Add ReportController::postToSpooler() helper for curl requests to spooler API
- Add routes: GET /report/(:num)/preview, GET /report/(:num)/pdf, GET /report/status/(:any)
- Delete public/spooler_db/ directory (40+ legacy files)
- Compact node_spooler/README.md from 577 to 342 lines

Technical Details:
- New architecture: CI4 Controller -> node_spooler (port 3030) -> Chrome CDP (port 42020)
- API endpoints: POST /api/pdf/generate, GET /api/pdf/status/:jobId, GET /api/queue/stats
- Features: Max 5 concurrent jobs, max 100 in queue, auto-cleanup after 60 min
- Error handling: Chrome crash detection, manual error review in data/error/
- PDF infrastructure ready, frontend PDF buttons to be updated later in production

Migration verified:
- No external code references spooler_db
- All assets duplicated in public/assets/report/
- Syntax checks passed for ReportController.php and Routes.php

Refs: node_spooler/README.md
2026-02-03 11:33:55 +07:00

34 lines
1.6 KiB
Markdown

# Project Checklist: Glen RME & Lab Management System
**Last Updated:** 20260203
Pending:
- Reprint Label (Add functionality to reprint labels)
- Print Result Audit (Track when result reports are printed/exported, log user and timestamp)
Completed:
- 01 : Update User Role levels (Standardize roles: Superuser, Admin, Lab, Phlebo, CS)
- 02 : Role-Based Dashboard Filtering (Filter by patient_status or service_type)
- 03 : Fix Table Sorting (Enable sorting by "No Register" and "Patient Name")
- 04 : Fix Language Toggle (Toggle lab result preview between Indonesian and English)
- 05 : Apply Row Color-Coding (Color-code "No Register" column)
- 06 : Initialize RME Sidebar Menu (Create menu items)
- 07 : Dashboard Performance (When getting data more than 100 rows, it load too slow)
- 08 : Dashboard for Lab -> no test with only number, remove request with empty test
- 09 : Dashboard for Others -> complete
- 10 : Refactor same views/*role* to views/shared
- 11 : Move all CDN to local
- 12 : Remove 'status' field on dashboard
- 13 : Restrict 'Validate' to Lab, Admin, Superuser
- 14 : Hide/Disable 'Validation' button after 2nd validation (Prevent redundant validation actions)
- 15 : Restrict 'UnValidate' to Admin, Superuser
- 16 : Remove 'UnCollect'
- 17 : Audit Trail (Track all actions: validation, unvalidation, collection, uncollection)
- 18 : Create Validate Page
- 19 : Sync color with old gdc_cmod
- 20 : Add Val1 Val2 on the result
- 21 : Show Print / PDF button when val1 val2 done
- 22 : Restrict Print/Save-to-PDF to CS Role only (Admin, Lab, CS can print/save)
Addition on dev :
- adding init-isDev on index.php to set default date on dev dashboard