- Add full CRUD operations for results (index, show, update, delete)
- Implement result validation with reference range checking (L/H flags)
- Add cumulative patient results retrieval across all orders
- Create ReportController for HTML lab report generation
- Add lab report view with patient info, order details, and test results
- Implement soft delete for results with transaction safety
- Update API routes with /api/results/* endpoints for CRUD
- Add /api/reports/{orderID} endpoint for report viewing
- Update OpenAPI docs with results and reports schemas/paths
- Add documentation for manual result entry and MVP plan
Major Features:
- Add comprehensive audit logging system with AuditService
- Create AuditLogs database migration for tracking changes
- Implement TestValidationService for test data validation
- Add FRONTEND_TEST_MANAGEMENT_PROMPT.md documentation
Controllers:
- Update TestsController with improved test management
Models:
- Enhance PatientModel with additional functionality
- Update TestDefSiteModel for better site management
Database:
- Add CreateAuditLogs migration (2026-02-20-000011)
- Update TestSeeder with new test data
Services:
- Add AuditService for comprehensive audit trail logging
Documentation:
- Update AGENTS.md with improved guidelines
- Update audit-logging-plan.md with implementation details
- Add FRONTEND_TEST_MANAGEMENT_PROMPT.md for frontend guidance
API Documentation:
- Update api-docs.bundled.yaml
- Update tests.yaml schema definitions
- Update tests.yaml paths
Testing:
- Enhance TestsControllerTest with new test cases
- Update TestDefModelsTest for model coverage
- Add audit-logging-plan.md with comprehensive logging implementation guide
- Update AGENTS.md with project guidelines
- Refactor test models: remove RefTHoldModel, RefVSetModel, TestDefTechModel
- Update TestDefSiteModel and related migrations
- Update seeder and test data files
- Update API documentation (OpenAPI specs)
- TestsController: Remove duplicate rangeTypeOptions assignment that was being
set inside the NUM condition block, causing it to be set unnecessarily
when it's also handled elsewhere
- ResponseTrait: Convert global helper function convert_empty_strings_to_null()
to private class method convertEmptyStringsToNull() for better encapsulation
and to avoid dependency on global functions
- Database schema: Update clqms_database.dbml with accurate table structure
derived from app/Models/ directory, reorganizing tables by functional
categories (Patient, Visit, Organization, Location, Test, Specimen,
Order, Contact management)
- Document TEST, PARAM, CALC, and GROUP test type categories
- Include usage examples and frontend display guidance
- Provide quick reference card for developers
- Covers standard lab tests, components, calculations, and panels
- Add PatVisitController with CRUD operations
- Add use case documentation (docx and md files)
- Update API documentation in api-docs.yaml
- Remove USER_STORIES.md (migrated to docs/)
- Update TODO.md with current tasks
- Update Routes.php for new endpoints
- Update DummySeeder with additional test data
● refactor: update API responses to use {field}Label format
- Transform coded fields to lowercase with Label suffix for display text - Controllers: OrderTestController, DemoOrderController, SpecimenController,
SpecimenStatusController, SpecimenCollectionController, ContainerDefController,
ContactController, TestMapController
- Example: Priority: "R" → priority: "R", priorityLabel: "Routine"
- Update api-docs.yaml with new OpenAPI schema definitions
- Add API docs reminder to CLAUDE.md
Complete overhaul of the valueset system to use human-readable names
instead of numeric IDs for improved maintainability and API consistency.
- PatientController: Renamed 'Gender' field to 'Sex' in validation rules
- ValuesetController: Changed API endpoints from ID-based (/:num) to name-based (/:any)
- TestsController: Refactored to use ValueSet library instead of direct valueset queries
- Added ValueSet library (app/Libraries/ValueSet.php) with static lookup methods:
- getOptions() - returns dropdown format [{value, label}]
- getLabel(, ) - returns label for a value
- transformLabels(, ) - batch transform records
- get() and getRaw() for Lookups compatibility
- Added ValueSetApiController for public valueset API endpoints
- Added ValueSet refresh endpoint (POST /api/valueset/refresh)
- Added DemoOrderController for testing order creation without auth
- 2026-01-12-000001: Convert valueset references from VID to VValue
- 2026-01-12-000002: Rename patient.Gender column to Sex
- OrderTestController: Now uses OrderTestModel with proper model pattern
- TestsController: Uses ValueSet library for all lookup operations
- ValueSetController: Simplified to use name-based lookups
- Updated all organization (account/site/workstation) dialogs and index views
- Updated specimen container dialogs and index views
- Updated tests_index.php with ValueSet integration
- Updated patient dialog form and index views
- Removed .factory/config.json and CLAUDE.md (replaced by AGENTS.md)
- Consolidated lookups in Lookups.php (removed inline valueset constants)
- Updated all test files to match new field names
- 32 modified files, 17 new files, 2 deleted files
- Net: +661 insertions, -1443 deletions (significant cleanup)
Added an alternative route alias 'container' that points to ContainerDefController,
providing backward compatibility and flexibility in API endpoint naming.
- Routes '/api/specimen/container' to ContainerDefController methods
- Supports GET, GET with ID, POST, and PATCH operations
- Existing '/api/specimen/containerdef' routes remain unchanged
File: app/Config/Routes.php (+7 lines)
---
refactor(seeds): update and standardize seed data across multiple seeders
Improved data consistency and coverage in database seeds:
AreaGeoSeeder.php:
- Updated geographic area data for better regional coverage
- Standardized data format and field values
DummySeeder.php:
- Refactored dummy data generation for test environments
- Improved data integrity and relationships
PatientSeeder.php:
- Enhanced patient test data with more realistic scenarios
- Updated patient demographic information
- Improved test result distributions
Total: 111 lines changed across seed files
---
docs: add CLQMS project documentation
- Added project documentation file: "prj_clinical laboratory quality management system_3a.docx"
- Comprehensive project specification and requirements document
---
test: remove deprecated TestDefSiteTest.php
- Removed obsolete test file that is no longer needed
- Test coverage consolidated into other test classes
File: tests/feature/TestDef/TestDefSiteTest.php (-374 lines)
---
Summary:
- +58 lines added (routes, seeds, docs)
- -434 lines removed (deprecated test file)
- 6 files affected
- Remove deprecated docs folder with outdated documentation
- Add new plans directory with ref_range_multiple_support_plan.md
- Update test migrations, seeds, and views for improved functionality
- Add new dialog forms for test calc, group, param, and title management
- Refactor test_dialog.php to new location (master/tests/)
- Update TestDefCalModel, TestDefSiteModel, TestDefTechModel, TestMapModel
- Modify Tests controller and Routes for new dialog handlers
- Update migration schema for test definitions
- Add new styles for v2 test management interface
- Include Test Management documentation files
- Implement JWT authentication with HTTP-only cookies
- Create /v2/* namespace to avoid conflicts with existing frontend
- Upgrade to DaisyUI 5 + Tailwind CSS 4
- Add light/dark theme toggle with smooth transitions
- Build login page, dashboard, and patient list UI
- Protect V2 routes with auth middleware
- Add comprehensive documentation
No breaking changes - all new features under /v2/* namespace