70 Commits

Author SHA1 Message Date
4aa9cefc3d refactor: consolidate migrations and reorganize valueset data structure
Major refactoring to clean up database migrations and reorganize static lookup data:
- Consolidated 13 old migrations (2025) into 10 new numbered migrations (2026-01-01)
- Deleted redundant migrations: Location, Users, Contact, ValueSet, Counter, RefRange,
  CRMOrganizations, Organization, AreaGeo, DeviceLogin, EdgeRes
- New consolidated migrations:
  - 2026-01-01-000001_CreateLookups: valueset, counter, containerdef, occupation, specialty
  - 2026-01-01-000002_CreateOrganization: account, site, location, discipline, department
  - 2026-01-01-000003_CreatePatientCore: patient, patidentifier, pataddress, patcontact
  - 2026-01-01-000004_CreateSecurity: contact, contactdetail, userdevices, loginattempts
  - 2026-01-01-000005_CreatePatientVisits: patvisit, patinsurance
  - 2026-01-01-000006_CreateOrders: porder, orderitem
  - 2026-01-01-000007_CreateSpecimens: specimen, specmenactivity, containerdef
  - 2026-01-01-000008_CreateTestDefinitions: testdefinition, testactivity, refnum, reftxt
  - 2026-01-01-000009_CreateResults: patresult, patresultdetail, patresultcomment
  - 2026-01-01-000010_CreateLabInfrastructure: edgeres, edgestatus, edgeack, workstation
- Moved 44 JSON files from valuesets/ subdirectory to app/Libraries/Data/ root
- Added new country.json lookup
- Added _meta.json for valueset metadata
- Deleted old valuesets/_meta.json
- Renamed gender.json to sex.json for consistency with patient.Sex column
- Removed duplicate country.json from valuesets/
- AGENTS.md: Updated Lookups library documentation with new methods
- README.md: Complete rewrite of lookup/valueset documentation
- Renamed MVP_TODO.md to TODO.md
- Added VUE_SPA_IMPLEMENTATION_PLAN.md
- Removed deprecated prj_clinical laboratory quality management system_3a.docx
- ValueSet.php: Enhanced with caching and new lookup methods
- Lookups.php: Removed (functionality merged into ValueSet)
Impact: Prepares codebase for 2026 with cleaner migration history and improved
lookup data organization for the name-based valueset system.
2026-01-13 07:22:25 +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
mikael-zakaria
23681a2dbf Merge branch 'main' of https://github.com/mahdahar/clqms-be 2026-01-07 08:38:30 +07:00
a47db49f81 feat: improve Location API error handling
- Add Phone/Email fields to LocationAddressModel allowedFields
- Fix saveLocation() to throw exceptions instead of returning error arrays
- Update controller to properly handle model responses
- Include actual database error message in transaction failures
2026-01-06 17:00:33 +07:00
9e0b01e7e2 refactor: reorganize documentation and update test-related files
- 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
2026-01-05 07:21:12 +07:00
97edfe50a8 feat: enhance Test Management module with improved UI and tests
- Refactor Tests.php controller with updated logic and error handling
- Update Test migration with schema improvements
- Enhance TestDefCalModel, TestDefGrpModel, TestDefTechModel with CRUD operations
- Improve TestMapModel with better test mapping relationships
- Redesign test dialog views (calc, group, param) with improved UX
- Update tests_index view with better data presentation
- Add CSS styles for test management UI components
- Add TestDefSiteTest feature test for site-based test definitions
- Add TestDefModelsTest unit test for model validation
- Remove obsolete Test Management.docx documentation
2026-01-02 08:33:22 +07:00
97451496c3 feat(tests): enhance Test Management module with v2 UI dialogs
- 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
2025-12-30 16:54:33 +07:00
cb4181dbff refactor: restructure application architecture and consolidate controllers
- Consolidate page controllers into unified PagesController
- Remove deprecated V2 pages, layouts, and controllers (AuthPage, DashboardPage, V2Page)
- Add Edge resource with migration and model (EdgeResModel)
- Implement new main_layout.php for consistent page structure
- Reorganize patient views into dedicated module with dialog form
- Update routing configuration in Routes.php
- Enhance AuthFilter for improved authentication handling
- Clean up unused V2 assets (CSS, JS) and legacy images
- Update README.md with latest project information

This refactoring improves code organization, removes technical debt, and
establishes a cleaner foundation for future development.
2025-12-29 16:57:46 +07:00
883f5b3643 Fix log formatting and outbox message processing
- Corrected ASCII row formatting in logs to ensure proper line breaks.
- Resolved issue causing empty result outbox during HL7 result simulation.
- Ensured messages are correctly processed and translation errors are handled.
2025-12-29 08:23:48 +07:00
mikael-zakaria
2ddd748c71 Update Contact & UserLogin 2025-12-22 13:09:49 +07:00
9f83199ddf adding crud test, and some dummy data for all test 2025-12-17 10:06:05 +07:00
d1d3b261ae creating test seeder 2025-12-16 13:43:06 +07:00
2580d64d9e prework 2025-12-11 16:43:19 +07:00
d9f9768074 add parent to discipline 2025-12-08 11:21:48 +07:00
2b9a30a073 yes 2025-12-03 15:45:24 +07:00
d4f5e8b16a fix areageo 2025-12-02 12:52:23 +07:00
d5fd300b6a new feature for suhu kuda 2025-12-02 09:29:42 +07:00
09717bb081 gogogo 2025-12-01 16:47:52 +07:00
cc0c47510d update model test 2025-11-19 15:35:32 +07:00
6772bbed3f prework 2025-11-14 16:50:49 +07:00
8af8fea0ba preworking pvadt 2025-11-13 13:49:24 +07:00
a450392cfc standard crud for specimen and test 2025-11-10 16:02:52 +07:00
8b41bfc6f1 update org, valueset 2025-11-06 12:28:42 +07:00
8680454db3 fix account zip and parent 2025-11-05 10:35:15 +07:00
a1f6b1df61 add dummy data for organization 2025-11-04 13:07:04 +07:00
1cab4d6578 fix organization 2025-11-04 12:22:29 +07:00
112e6ec311 add organization endpoint 2025-10-29 11:08:38 +07:00
d5c8cac5ec prework 2025-10-24 16:41:31 +07:00
bc8653d89f add CRM Zones Org 2025-10-24 11:19:58 +07:00
mikael-zakaria
c31d3ab149 Update Routes/Model/Controller/Migrations Zones & Show Patient(getPatient) 2025-10-23 09:41:49 +07:00
b856ff358d add test mgt migration 2025-10-22 13:30:43 +07:00
5e60bfcb5f adding test management migration 2025-10-21 15:37:57 +07:00
a3b025ef6c change DeathDate to TimeOfDeath 2025-10-21 10:27:31 +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
b4fa6c7983 fix seeder createdate 2025-10-15 16:08:52 +07:00
11dca70c70 update condef color 2025-10-15 13:09:00 +07:00
fb5a65103a utc helper 2025-10-13 11:08:26 +07:00
bd3284b86f change all migration to use manual datetime for creation 2025-10-10 16:47:39 +07:00
mikael-zakaria
341db47380 Update perbaikan migration specimen, dummy seeder dan indentasi model patisit 2025-10-09 13:04:05 +07:00
862c6ca8b4 add specimen migration 2025-10-07 16:18:37 +07:00
mikael-zakaria
f24c72cb16 Update Patient Tabel Migrations Birthdate menjadi DATE dan Patcom menjadi null dan bukan [] 2025-10-06 09:47:15 +07:00
mikael-zakaria
082e5d4d1c Update Patient Tabel Migration & datetime 0000-00-00 & detail messages error 2025-10-06 00:24:55 +07:00
mikael-zakaria
103b5ae19a Update (insert, patch & get/show) Patient Pattat dan perbaikan Patcom. Dan VID 2025-10-02 13:56:23 +07:00
750ccdee00 moving country religion race ethnic to valueset 2025-10-01 12:40:05 +07:00
7b093aefb3 fix location param, add occupation dummy data 2025-09-29 10:14:01 +07:00
e15a2d98db fix contact creation wo detail 2025-09-26 15:03:11 +07:00
aa73f0d240 fix contactemail 2025-09-26 13:08:30 +07:00
dd999aaf7b contactdetail wow 2025-09-24 16:15:55 +07:00
cfd791ddaf PVID counter done 2025-09-23 14:20:09 +07:00