67 Commits

Author SHA1 Message Date
42006e1af9 feat: implement comprehensive order management with specimens and tests
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
2026-03-03 13:51:27 +07:00
24e0293824 feat: add HostApp and CodingSys management APIs with CRUD operations 2026-02-27 16:31:55 +07:00
5e0a7f21f5 feat: add TestMapDetail controller, model and migration for test site mapping
- 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
2026-02-26 16:48:10 +07:00
d3668fe2b3 feat: add equipment list management API with CRUD operations 2026-02-24 16:53:36 +07:00
3a30629e15 feat: add urine workstations and test specimen mappings to seeders 2026-02-24 06:11:18 +07:00
5272efa7b9 reorganize database migrations with corrected numbering 2026-02-23 05:11:23 +07:00
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
2af95945a3 fix areageoseeder 2026-02-19 13:31:13 +07:00
5bfd71e7d7 fix areageoseeder to use env 2026-02-19 13:27:08 +07:00
ece101b6d2 Add audit logging plan documentation and update test infrastructure
- 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)
2026-02-19 13:20:24 +07:00
8806b007ab Add PatVisit controller and use case documentation
- 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
2026-02-15 21:05:25 +07:00
f30755c830 Update seeders and models, remove MinimalMasterDataSeeder, update API docs 2026-02-13 16:51:24 +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
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
d4029dce38 Update perbaikan ContactSeeder dan AreaGeoSeeder 2026-01-08 10:49:19 +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
a2097ade6a feat: Add AreaGeoSeeder for importing geographic data from external database
- Create AreaGeoSeeder to import area geo data from external zones table
- Add field mapping: zonecode→AreaCode, zoneclass→Class, zonename→AreaName, parentzoneid→Parent
- Support same-server external databases using direct SQL queries
- Register seeder in DBSeeder for inclusion in main seeding workflow
2026-01-07 08:59:36 +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
118d490bbd refactor: update TestSeeder to use dynamic ValueSet lookups
- Implemented dynamic VID retrieval from ValueSetModel for all test definitions
- Aligned ResultType, RefType, and SpcType with the valueset table
- Updated sample data for Hematology, Chemistry, and Urinalysis tests
- Ensured consistency between ValueSetSeeder and TestSeeder data
2025-12-29 12:55:31 +07:00
061af6e6d7 adding v2 frontend 2025-12-22 16:54:19 +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
6b83f332ea fix test seeder 2025-12-16 13:48:33 +07:00
d1d3b261ae creating test seeder 2025-12-16 13:43:06 +07:00
d9f9768074 add parent to discipline 2025-12-08 11:21:48 +07:00
41d6963d96 adding valuesetdef 2025-12-03 16:18:01 +07:00
2b9a30a073 yes 2025-12-03 15:45:24 +07:00
d4f5e8b16a fix areageo 2025-12-02 12:52:23 +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
4d9b265c4c preworking test 2025-11-27 11:52:39 +07:00
3537f7e6cb prework 2025-11-26 16:53:14 +07:00
mikael-zakaria
e2e0a6eeeb Update perbaikan Seeders untuk patient gender dan death 2025-11-25 10:03:49 +07:00
mikael-zakaria
f26628cba8 Update Menambahkan user tes2 ke tabel Users pada Migrations 2025-11-20 09:38:53 +07:00
04b8c79911 add dummy test 2025-11-18 09:14:02 +07:00
6a4cc3a0d6 add dummy test 2025-11-17 16:53:57 +07:00
6772bbed3f prework 2025-11-14 16:50:49 +07:00
8af8fea0ba preworking pvadt 2025-11-13 13:49:24 +07:00
5138051f10 fix valueset missing value 2025-11-06 13:05:48 +07:00
8b41bfc6f1 update org, valueset 2025-11-06 12:28:42 +07:00
56b8012e4a update join account 2025-11-05 15:03:55 +07:00
a1f6b1df61 add dummy data for organization 2025-11-04 13:07:04 +07:00
mikael-zakaria
bf5b5cb0ea Update Seeders dan Zones API dari https ke http 2025-10-23 09:56:59 +07:00
mikael-zakaria
88f2633bb6 Update Patient (Patcom & Unit Testing) 2025-10-19 22:36:31 +07:00
b4fa6c7983 fix seeder createdate 2025-10-15 16:08: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
341db47380 Update perbaikan migration specimen, dummy seeder dan indentasi model patisit 2025-10-09 13:04:05 +07:00
mikael-zakaria
90ad785e49 Update Patient Seeders 2025-10-06 09:54:50 +07:00