6 Commits

Author SHA1 Message Date
e5eac13036 feat: auto-select sample when scanning sample number
- Add support for scanning sample numbers (8 digits) in addition to access numbers (10 digits)
- Backend: Detect input type based on length, extract sample code and access suffix
- Frontend: Auto-select matching sample and highlight with primary ring border
- When sample number scanned (e.g., 10135026), extracts sample code (101) and auto-checks it
2026-03-10 15:52:11 +07:00
c2d66d0082 Add uncollect feature and security improvements
- Add DELETE /api/samples/collect/:accessnumber/:samplenumber endpoint
- Convert SQL queries to parameterized queries for security
- Add uncollect() method to SamplesController
- Update collect view to support uncollecting samples
- Fix checkbox logic to allow toggling collected samples
- Update hasChanges() to detect both collect and uncollect actions
2026-03-04 13:12:21 +07:00
1534544bb9 refactor: Change collect/unreceive endpoints to use path parameters instead of JSON body
- Update collect() and unreceive() to accept samplenumber as path param
- Improve unreceive logic with better Firebird update handling
- Update routes and frontend to match new endpoint signature
2026-02-11 05:53:55 +07:00
cfb81201a2 feat: Implement configurable printer system and enhance UAT workflow
Add comprehensive printer configuration support:
- New Printers.php config with role-based printer defaults (lab, phlebo, reception)
- Update LabelController for configurable printer routing with error handling
- Add ResponseTrait for proper JSON responses (success/error status)
- Update routes to accept optional printer parameter for label printing
- Add default printer configuration per role in shared config

Enhance report generation workflow:
- Support REPORT_LANG from CM_REQUESTS table for language preference
- Prioritize URL parameter, then database value, then default
- Add language info to PDF generation response (Indonesian/English)
- Update all report methods (view, eng, preview, generate) with unified logic

Improve UI and user experience:
- Add dialog_results_generate to all role dashboards (superuser, admin, lab, phlebo, cs)
- Update skeleton loading states widths in content requests
- Add printer selection capability in sample collection flow

Add comprehensive UAT documentation:
- New UAT_GDC_CMOD_Checklist.md with 150+ test cases
- Cover all roles: superuser, admin, lab, phlebo, cs, and cross-role scenarios
- Include acceptance criteria (functional, security, performance, usability, data integrity)
- Test categories: authentication, user management, validation, sample management, audit trail, reporting
- Detailed sign-off structure for stakeholders

Add barcode printing documentation:
- docs/barcode_print_all.php - all labels printing implementation
- docs/barcode_print_coll.php - collection label implementation
- docs/barcode_print_disp.php - dispatch label implementation

Update TODO tracking:
- Mark Reprint Label and PDF Generation as completed
- Update pending tasks for testing and audit trails
2026-02-05 06:21:08 +07:00
3cf4cc7f3f feat: Implement audit trail system for dual-level validation workflow
This commit adds comprehensive audit logging for specimen requests and sample collection activities across all roles.
Changes Summary:
New Features:
- Added AUDIT_EVENTS table schema for tracking validation and sample collection events
- Created ApiRequestsAuditController with /api/requests/(:any)/audit endpoint to retrieve audit history
- Added dialog_audit.php view component for displaying audit trails in UI
- Integrated audit logging into validation workflow (VAL1, VAL2, UNVAL events)
Database:
- Created AUDIT_EVENTS table with columns: ACCESSNUMBER, EVENT_TYPE, USERID, EVENT_AT, REASON
- Supports tracking validation events and sample collection actions
Controllers:
- RequestsController: Now inserts audit records for all validation operations
- ApiRequestsAuditController: New API controller returning validation and sample collection history
Routes:
- Added GET /api/requests/(:any)/audit endpoint for retrieving audit trail
- Removed DELETE /api/samples/collect/(:any) endpoint (uncollect functionality)
Views Refactoring:
- Consolidated dashboard layouts into shared components:
  - layout.php (from layout_dashboard.php)
  - script_requests.php (from script_dashboard.php)
  - script_validation.php (from script_validate.php)
  - content_requests.php (from dashboard_table.php)
  - content_validation.php (from dashboard_validate.php)
- Added content_validation_new.php for enhanced validation interface
2026-01-23 16:41:12 +07:00
02762bb355 Fix Superuser User Management and Refactor Dashboard Layouts
- Refactor 'app/Views/superuser/users.php' to fix user creation/editing logic using Alpine.js.
- Ensure efficient form state management (userid, username, password handling) in user modal.
- Standardize dashboard layouts and script initialization (window.BASEURL) across 'admin', 'cs', 'lab', 'phlebo', and 'superuser' main views.
- Remove redundant 'app/Views/admin/users.php' to consolidate user management.
2026-01-21 17:00:05 +07:00