18 Commits

Author SHA1 Message Date
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