gdc_cmod/TODO.md
mahdahar 0b4fdcfe5f feat: Extend audit trail with tube received tracking and enhance PDF workflow
Major Updates:

1. Extended Audit Trail System
   - Added tube received events tracking from SP_TUBES table (TUBESTATUS=4)
   - New audit tab "Receive" in dialog_audit.php to display tube reception history
   - ApiRequestsAuditController now fetches and returns tube received events with:
     * Sample type, tube status, collection date, and user information
   - Audit events sorted chronologically combining validation, sampling, and receiving events

2. Enhanced PDF Generation Workflow
   - Created new PdfHelper library with methods for PDF generation and posting to spooler
   - Reports can now be generated via GET /report/{accessnumber}/pdf endpoint
   - Updated PDF spooler API endpoint from port 3030 to 3000
   - Added retry PDF button with spinner animation for failed generations
   - Fixed PDF status check to use correct spooler endpoint

3. Validation UI Improvements
   - Added toast notification showing PDF queued after second validation (val2)
   - Retry PDF button appears when val1 and val2 are complete
   - Toast notifications success/error states with auto-dismiss after 2 seconds
   - Loading state with spinning icon during PDF retry operation

4. Report Template Fixes
   - Fixed typo in Val2 By display (added missing ":")
   - Consistent formatting with Val1 By : and Val2 By :

5. Documentation Updates
   - TODO.md updated with:
     * Auto generate PDF (in progress)
     * Print Eng Result (pending)
     * Add Receive to Audit (completed)

6. Cleanup
   - Removed legacy Node.js spooler implementation (node_spooler directory)
   - Deleted P0_log.txt (SQL setup scripts no longer needed in repo)
   - Cleaned up .gitignore to remove stale node_spooler entries

Files Changed:
- app/Controllers/ApiRequestsAuditController.php (tube received audit)
- app/Controllers/ReportController.php (port update: 3030 → 3000)
- app/Libraries/PdfHelper.php (new library)
- app/Views/report/template.php (typo fix)
- app/Views/shared/content_requests.php (retry PDF button)
- app/Views/shared/dialog_audit.php (receive tab)
- app/Views/shared/script_requests.php (retry handler, tube events)
- app/Views/shared/script_validation.php (enhanced toast)
- TODO.md (pending/completed tasks)
- .gitignore (cleanup)
- Deleted: node_spooler/* (legacy implementation)
- Deleted: P0_log.txt (no longer needed)
2026-02-04 11:09:42 +07:00

1.5 KiB

Project Checklist: Glen RME & Lab Management System

Last Updated: 20260204

Pending:

  • Auto generate PDF
  • Print Eng Result
  • Reprint Label (Add functionality to reprint labels)
  • Print Result Audit (Track when result reports are printed/exported, log user and timestamp)

Completed:

  • Update User Role levels (Standardize roles: Superuser, Admin, Lab, Phlebo, CS)
  • Role-Based Dashboard Filtering (Filter by patient_status or service_type)
  • Fix Table Sorting (Enable sorting by "No Register" and "Patient Name")
  • Fix Language Toggle (Toggle lab result preview between Indonesian and English)
  • Apply Row Color-Coding (Color-code "No Register" column)
  • Initialize RME Sidebar Menu (Create menu items)
  • Dashboard Performance (When getting data more than 100 rows, it load too slow)
  • Dashboard for Lab -> no test with only number, remove request with empty test
  • Dashboard for Others -> complete
  • Refactor same views/role to views/shared
  • Move all CDN to local
  • Remove 'status' field on dashboard
  • Restrict 'Validate' to Lab, Admin, Superuser
  • Hide/Disable 'Validation' button after 2nd validation (Prevent redundant validation actions)
  • Restrict 'UnValidate' to Admin, Superuser
  • Remove 'UnCollect'
  • Audit Trail (Track all actions: validation, unvalidation, collection, uncollection)
  • Create Validate Page
  • Sync color with old gdc_cmod
  • Add Val1 Val2 on the result
  • Show Print / PDF button when val1 val2 done
  • Restrict Print/Save-to-PDF to CS Role only (Admin, Lab, CS can print/save)
  • Add Receive to Audit