73 Commits

Author SHA1 Message Date
42a5260f9a feat(valueset): restructure valueset UI and add result-specific CRUD
- Restructure valueset pages from single master page to separate views:
  - Library Valuesets (read-only lookup browser)
  - Result Valuesets (CRUD for valueset table)
  - Valueset Definitions (CRUD for valuesetdef table)
- Add new ResultValueSetController for result-specific valueset operations
- Move views from master/valuesets to result/valueset and result/valuesetdef
- Convert valueset sidebar to collapsible nested menu
- Add search filtering to ValueSetController index
- Remove deprecated welcome_message.php and old nested CRUD view
- Update routes to organize under /result namespace
Summary of changes: This commit reorganizes the valueset management UI by splitting the monolithic master/valuesets page into three distinct sections, adds a new controller for result-related valueset operations, and restructures the sidebar navigation for better usability.
2026-01-14 16:45:58 +07:00
e36e390f71 refactor: consolidate ValueSet API and simplify seeders
- Consolidate ValueSet routes from multiple nested groups to flat structure
- Delete deprecated ValueSet\ namespaced controllers (ValueSetController, ValueSetDefController)
- Remove ValueSetSeeder and ValueSetCountrySeeder from DBSeeder
- Simplify seeders (LocationSeeder, OrganizationSeeder, PatientSeeder, TestSeeder)
  to use literal string values instead of ValueSet lookups
- Add new ValueSetController and ValueSetDefController in root namespace
- Update test files for new controller structure
The key changes are:
1. Routes: Consolidated from nested ValueSet\ namespace routes to flat ValueSetController routes with /items sub-endpoints
2. Controllers: Deleted old app/Controllers/ValueSet/ directory, created new root-level controllers
3. Seeders: Removed ValueSet dependencies, using literal values like 'ROOM', '1', 'TEST' instead of [12]['ROOM'] etc.
4. Tests: Updated tests to match new controller structure
2026-01-13 16:48:43 +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
5fb572c122 feat(routes): add container alias endpoint for ContainerDefController
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
2026-01-07 16:55:25 +07:00
cd65e91db1 refactor: Rename controllers to follow CodeIgniter 4 naming convention
- Rename all controllers from X.php to XController.php format
- Add new RefTxtModel for text-based reference ranges
- Rename group_dialog.php to grp_dialog.php and remove title_dialog.php
- Add comprehensive test suite for v2/master/TestDef module
- Update Routes.php to reflect controller renames
- Remove obsolete data files (clqms_v2.sql, lab.dbml)
2026-01-05 16:55:34 +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
a94df3b5f7 **feat: migrate to v2 frontend with Alpine.js pattern**
- Introduce v2 views directory with Alpine.js-based UI components
- Add AuthV2 controller for v2 authentication flow
- Update PagesController for v2 routing
- Refactor ValueSet module with v2 dialogs and nested CRUD views
- Add organization management views (accounts, departments, disciplines, sites, workstations)
- Add specimen management views (containers, preparations)
- Add master views for tests and valuesets
- Migrate patient views to v2 pattern
- Update Routes and Exceptions config for v2 support
- Enhance CORS configuration
- Clean up legacy files (check_db.php, llms.txt, sanity.php, old views)
- Update agent workflow patterns for PHP Alpine.js
2025-12-30 14:30:35 +07:00
eb883cf059 feat: Add V2 UI with JWT auth, DaisyUI 5, and theme system
- 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
2025-12-30 08:48:13 +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
061af6e6d7 adding v2 frontend 2025-12-22 16:54:19 +07:00
eb305d8567 start to do simple frontend using alpinejs 2025-12-19 16:48:48 +07:00
3c1aaafe18 fix seeder, and patient unit testing 2025-12-17 15:19:55 +07:00
9f83199ddf adding crud test, and some dummy data for all test 2025-12-17 10:06:05 +07:00
1755105af1 till discipline 2025-12-02 07:09:24 +07:00
09717bb081 gogogo 2025-12-01 16:47:52 +07:00
61f6c337ee fix db, and tests index show 2025-11-27 14:15:10 +07:00
a450392cfc standard crud for specimen and test 2025-11-10 16:02:52 +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
a71a587573 add pva cr 2025-10-23 12:16:52 +07:00
mikael-zakaria
c31d3ab149 Update Routes/Model/Controller/Migrations Zones & Show Patient(getPatient) 2025-10-23 09:41:49 +07:00
mikael-zakaria
bd6184fddf Update Zones Sync v1 2025-10-22 13:40:27 +07:00
e28b58282e fix patvisit route 2025-10-21 09:55:28 +07:00
mikael-zakaria
a9ae893c16 Update unit testing patvisit 2025-10-20 14:09:09 +07:00
33e7c84fc4 broken patvisit 2025-10-16 12:55:55 +07:00
9145d74907 fix contact and occupation 2025-10-16 11:09:36 +07:00
mikael-zakaria
3290d24e05 Merge branch 'main' of https://github.com/mahdahar/clqms-be 2025-10-16 10:47:31 +07:00
mikael-zakaria
fda7a14a5f Update Refactoring Patient 2025-10-16 10:28:40 +07:00
20350db5bd refactor contact occupation counter location to model 2025-10-15 11:01:52 +07:00
4da2d7a54b refactor valueset 2025-10-14 16:54:43 +07:00
677504e225 add specimen 2025-10-14 10:48:20 +07:00
mikael-zakaria
ca19ab35c1 Update perbaikan patient deathdatetime dan faker patient 2025-10-10 10:19:52 +07:00
501ef06592 fixing contactdetail 2025-09-25 13:30:15 +07:00
5f317a7e38 add counter endpoint and move counter to model 2025-09-23 15:57:19 +07:00
862e5fd03d patvisit 2025-09-22 13:25:31 +07:00
8ef7b0a61a Merge branch 'main' of https://github.com/mahdahar/clqms-be 2025-09-19 16:43:11 +07:00
7585ce0632 add patvisit endpoint 2025-09-19 16:43:03 +07:00
mikael-zakaria
8a8f85a41e Merge branch 'main' of https://github.com/mahdahar/clqms-be 2025-09-19 16:42:41 +07:00
mikael-zakaria
6454bb12f0 Update Unit Test Patient 2025-09-19 16:42:27 +07:00
d28bb3cd4b Merge branch 'main' of https://github.com/mahdahar/clqms-be 2025-09-19 15:22:37 +07:00
f32fe26ba4 add location.loctype 2025-09-19 15:22:25 +07:00
5c67b06431 create occupation endpoint 2025-09-18 16:31:56 +07:00
7e86462b4f add contact endpoint 2025-09-18 15:52:37 +07:00
ee5fb52cca fix router 2025-09-17 16:00:26 +07:00
1351b8c99f change vsfieldid to vsetid 2025-09-17 15:50:55 +07:00
8ff71a27fc refactor remove id from url when update an delete 2025-09-16 15:33:22 +07:00
893957d511 update codedtxt -> valueset 2025-09-15 15:45:44 +07:00
520cc443cc add codedtxt 2025-09-11 16:40:36 +07:00
e7e9fc1b99 create location + location dummy 2025-09-11 11:09:04 +07:00
mikael-zakaria
8920ab447e Update Dashboard, Result dan Sample Controller dengan JWT 2025-09-09 09:16:35 +07:00