22 Commits

Author SHA1 Message Date
d173098652 feat: implement audit logging and test management enhancements
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
2026-02-20 13:47:47 +07:00
f30755c830 Update seeders and models, remove MinimalMasterDataSeeder, update API docs 2026-02-13 16:51:24 +07:00
4b8d31f3a1 Simplify FullName to only include first, middle, and last name 2026-02-11 09:22:15 +07:00
64646293dc Fix patient creation error: extract nested arrays before insert
- 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
2026-02-10 16:43:52 +07:00
fcdbc3f20a feat(patient): handle array format for Custodian and LinkTo fields
- PatientModel: Convert Custodian from array to integer InternalPID when received as object
- PatientModel: Convert LinkTo from array of objects to comma-separated InternalPID string
- API docs: Add LinkedPatient, Custodian, and PatAttEntry schema definitions
- API docs: Extend Patient schema with DeathIndicator, TimeOfDeath, PatCom,
  PatAtt, Province, City, Country, Race, MaritalStatus, Religion, Ethnic fields
- Add AGENTS.md to .gitignore
2026-01-29 11:21:34 +07:00
823694e4a1 add valueset getter to valueset : , valuesetKey : 2026-01-20 13:20:37 +07:00
bb7df6b70c feat(valueset): refactor from ID-based to name-based lookups
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)
2026-01-12 16:53:41 +07:00
09717bb081 gogogo 2025-12-01 16:47:52 +07:00
mikael-zakaria
e342df68f6 Update Rules Patient Index menampilkan Gender 2025-11-24 15:38:12 +07:00
mikael-zakaria
5a3eb5a63d Update Rules Patient Identity Fix Version 2025-11-24 15:17:33 +07:00
mikael-zakaria
5d80b09e96 Update Patient Show ZonesID_2 2025-10-23 10:21:57 +07:00
mikael-zakaria
e16e055357 Update Patient Show ZonesID 2025-10-23 10:20:55 +07:00
mikael-zakaria
79d28aa3ac Merge branch 'main' of https://github.com/mahdahar/clqms-be 2025-10-23 09:42:00 +07:00
mikael-zakaria
c31d3ab149 Update Routes/Model/Controller/Migrations Zones & Show Patient(getPatient) 2025-10-23 09:41:49 +07:00
33d904e83b update patvisit show, add prefix for all createdate 2025-10-23 09:25:10 +07:00
a3b025ef6c change DeathDate to TimeOfDeath 2025-10-21 10:27:31 +07:00
d7d90de798 fix custodian 2025-10-21 09:33:38 +07:00
0acf985065 fix deathdate -> deathdatetime 2025-10-21 09:28:30 +07:00
60cfe5616a custodian to object, deathdatetime -> deathdate 2025-10-21 09:25:48 +07:00
60df79ed02 refactor patient 2025-10-16 13:22:28 +07:00
mikael-zakaria
70b46dbd72 Update Refactoring Patient v2 2025-10-16 10:50:09 +07:00
20350db5bd refactor contact occupation counter location to model 2025-10-15 11:01:52 +07:00