Normalize formatting/line endings across configs, controllers, models, tests, and OpenAPI specs.
Update rule expression/rule engine implementation and remove obsolete RuleAction controller/model.
Add unit tests for rule expression syntax and multi-action behavior, and include docs updates.
- Add /api/rules CRUD, nested actions, and expr validation
- Add rules migration, models, and RuleEngine/Expression services
- Run ORDER_CREATED rules after order create (non-blocking) and refresh tests
- Update OpenAPI tags/schemas/paths and bundled docs
- 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 updates to order system:
- Add specimen and test data to order responses (index, show, create, update, status update)
- Implement getOrderSpecimens() and getOrderTests() private methods in OrderTestController
- Support 'include=details' query parameter for expanded order data
- Update OrderTestModel with enhanced query capabilities and transaction handling
API documentation:
- Update OpenAPI specs for orders, patient-visits, and tests
- Add new schemas for order specimens and tests
- Regenerate bundled API documentation
Database:
- Add Requestable field to TestDefSite migration
- Create OrderSeeder and ClearOrderDataSeeder for test data
- Update DBSeeder to include order seeding
Patient visits:
- Add filtering by PatientID, PatientName, and date ranges
- Include LastLocation in visit queries
Testing:
- Add OrderCreateTest with comprehensive test coverage
Documentation:
- Update AGENTS.md with improved controller structure examples
- Move TestsController from App\Controllers to App\Controllers\Test namespace
- Update routes from 'api/tests' to 'api/test' group
- Clean up empty lines in Routes.php
- Improve code formatting and indentation in TestsController
- Add TestMapDetailController for managing test mapping details
- Create TestMapDetailModel with CRUD operations
- Add migration for TestSiteID column in testmap table
- Update TestMapController and TestMapModel
- Update routes, seeder and PatVisitModel
- Regenerate API documentation bundle
- Add TestMapController for managing test-to-analyzer mappings
- Create TestMapModel with database operations for test mappings
- Update TestsController to support test mapping operations
- Add testmap API routes to Routes.php
- Create migration updates for test definitions table
- Add OpenAPI specification for test mapping endpoints
- Include unit tests for TestDef models
- Update bundled API documentation
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)
- Create App\Traits\ResponseTrait that wraps CodeIgniter\API\ResponseTrait
- Add json_helper with convert_empty_strings_to_null() and prepare_json_response() functions
- Replace all imports of CodeIgniter\API\ResponseTrait with App\Traits\ResponseTrait across all controllers
- Add 'json' helper to BaseController helpers array
- Ensure consistent API response formatting across the application
- Split monolithic master-data.yaml into separate contact.yaml and locations.yaml files
- Replace 'Master Data' tag with dedicated 'Contacts' and 'Locations' tags for better API organization
- Add complete CRUD operations for Contacts (GET, POST, PATCH, DELETE, GET by ID)
- Add complete CRUD operations for Locations (GET, POST, PATCH, DELETE, GET by ID)
- Enhance Contact schema with comprehensive fields: NameFirst, NameLast, Title, Initial,
Birthdate, EmailAddress1/2, Phone, MobilePhone1/2, Specialty, SubSpecialty
- Enhance Location schema with additional fields: Description, LocType, improved Parent
field documentation for hierarchical locations
- Update bundled API documentation to reflect new endpoint structure
- Remove deprecated Occupation, MedicalSpecialty, and Counter schemas from bundled docs
- 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
- Extract PatIdt, PatCom, PatAtt arrays before patient insert to prevent MySQL error 1241
- Fix Custodian handling when InternalPID is null
- Apply same fix to updatePatient method