diff --git a/AGENTS.md b/AGENTS.md
index 5a98dc9..fe4396c 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -58,7 +58,8 @@ app/
├── Models/{Domain}/
│ └── DomainModel.php
├── Libraries/
-│ └── Lookups.php
+│ └── ValueSet.php # Base lookup class (loads from JSON)
+│ └── Lookups.php # Extends ValueSet - use this for lookups
└── Views/v2/
```
@@ -199,19 +200,32 @@ try {
- Modals use `x-show` with `@click.self` backdrop close
### Lookups Library
-Use `App\Libraries\Lookups` for all static lookup values - no database queries:
+Use `App\Libraries\Lookups` (extends `ValueSet`) for all static lookup values. Data is loaded from JSON files in `app/Libraries/Data/valuesets/`:
```php
use App\Libraries\Lookups;
-// Frontend dropdown format
-Lookups::get('gender'); // [{value: '1', label: 'Female'}, ...]
-Lookups::get('test_type'); // [{value: 'TEST', label: 'Test'}, ...]
+// Get formatted for frontend dropdowns [{value: 'X', label: 'Y'}, ...]
+$gender = Lookups::get('gender');
+$priorities = Lookups::get('order_priority');
-// Raw key-value pairs
-Lookups::getRaw('gender'); // ['1' => 'Female', ...]
+// Get raw data [{key: 'X', value: 'Y'}, ...]
+$raw = Lookups::getRaw('gender');
-// All lookups
-Lookups::getAll();
+// Get single label by key
+$label = Lookups::getLabel('gender', '1'); // Returns 'Female'
+
+// Get options with key/value pairs
+$options = Lookups::getOptions('gender');
+// Returns: [['key' => '1', 'value' => 'Female'], ...]
+
+// Transform data with lookup labels
+$patients = Lookups::transformLabels($patients, [
+ 'Sex' => 'gender',
+ 'Priority' => 'order_priority'
+]);
+
+// Clear cache after data changes
+Lookups::clearCache();
```
### Important Notes
diff --git a/README.md b/README.md
index 040195b..6fb829e 100644
--- a/README.md
+++ b/README.md
@@ -50,81 +50,124 @@ Key documents:
---
-## 🔧 Valueset Reference (VSetDefID)
+## Lookups Library (`app/Libraries/ValueSet.php`)
-When working on UI components or dropdowns, **always check for existing ValueSets** before hardcoding options. Use the API endpoint `/api/valueset/valuesetdef/{ID}` to fetch options dynamically.
+CLQMS uses a **JSON file-based lookup system** loaded via `App\Libraries\Lookups` class. All lookup data is stored as JSON files in `app/Libraries/Data/valuesets/` for easy maintenance and versioning.
-| VSetDefID | Purpose | Usage |
-|-----------|---------|-------|
-| 27 | Test Types | TEST, PARAM, GROUP, CALC, TITLE |
-| 28 | Methods | Lab test methods |
-| 29 | Specimen Types | Blood, Urine, etc. |
-| 30 | Ref Types | NMRC (Numeric), TEXT, LIST |
-| 31 | Range Types | STD (Standard), AGSX (Age/Sex), COND |
+### How It Works
-> **Important:** Always use ValueSet lookups for configurable options. This ensures consistency and allows administrators to modify options without code changes.
-
----
-
-## 📚 Static Lookups Library (`app/Libraries/Lookups.php`)
-
-For frequently used lookup values, CLQMS provides a **static library** with all values hardcoded. This eliminates database queries for common dropdowns and improves performance.
+- `Lookups` class extends `ValueSet` which handles caching and file loading
+- Each lookup is stored as `app/Libraries/Data/valuesets/{name}.json`
+- Lookup names are lowercase with underscores (e.g., `gender.json`, `order_priority.json`)
### Available Lookups
-| Constant | VSetID | Description |
-|----------|--------|-------------|
-| `WS_TYPE` | 1 | Workstation type (Primary, Secondary) |
-| `ENABLE_DISABLE` | 2 | Enable/disable flags |
-| `GENDER` | 3 | Gender (Female, Male, Unknown) |
-| `MARITAL_STATUS` | 4 | Marital status (A/D/M/S/W/B/U/O) |
-| `DEATH_INDICATOR` | 5 | Death indicator (Y/N) |
-| `IDENTIFIER_TYPE` | 6 | ID types (KTP, Passport, SSN, SIM) |
-| `OPERATION` | 7 | CRUD operations (Create, Read, Update, Delete) |
-| `ORDER_PRIORITY` | 10 | Order priority (S=Stat, A=ASAP, R=Routine, P=Preop, etc.) |
-| `ORDER_STATUS` | 11 | Order status (A/CA/CM/DC/ER/HD/IP/RP/SC/CL/AC/DL) |
-| `SPECIMEN_TYPE` | 15 | Specimen types (BLD, SER, PLAS, UR, CSF, etc.) |
-| `SPECIMEN_STATUS` | 20 | Specimen status (STC, SCtd, SArrv, SRcvd, SAna, etc.) |
-| `SPECIMEN_CONDITION` | 21 | Specimen condition (HEM, ITC, LIP, etc.) |
-| `TEST_TYPE` | 27 | Test types (TEST, PARAM, CALC, GROUP, TITLE) |
-| `RESULT_UNIT` | 28 | Result units (g/dL, mg/dL, x10^6/mL, etc.) |
-| `RACE` | 30 | Ethnicity/race (Jawa, Sunda, Batak, etc.) |
-| `RELIGION` | 31 | Religion (Islam, Kristen, Katolik, Hindu, Budha, etc.) |
-| `SITE_TYPE` | 37 | Site type (GH, PH, GHL, PHL, GL, PL) |
-| `SITE_CLASS` | 38 | Site class (A/B/C/D/Utm/Ptm) |
-| `RESULT_TYPE` | 43 | Result type (NMRIC, RANGE, TEXT, VSET) |
-| `RANGE_TYPE` | 45 | Range type (REF, CRTC, VAL, RERUN) |
-| `HIV_RESULT` | 1001 | HIV results (NEG, POS, GZ) |
-
-**Plus 25+ more categories** - see [`app/Libraries/Lookups.php`](app/Libraries/Lookups.php) for complete list.
+| Lookup File | Description | Example Values |
+|-------------|-------------|----------------|
+| `gender` | Patient gender | Female, Male, Unknown |
+| `order_priority` | Order priority levels | Stat, ASAP, Routine, Preop |
+| `order_status` | Order lifecycle status | STC, SCtd, SArrv, SRcvd |
+| `specimen_type` | Specimen types | BLD, SER, PLAS, UR, CSF |
+| `specimen_status` | Specimen status | Ordered, Collected, Received |
+| `specimen_condition` | Specimen quality flags | HEM, ITC, LIP, CLOT |
+| `specimen_activity` | Specimen workflow events | COLLECT, RECEIVE, REJECT |
+| `result_type` | Result data types | NMRIC, RANGE, TEXT, VSET |
+| `result_unit` | Common measurement units | g/dL, mg/dL, x10^6/mL |
+| `result_status` | Result validation status | Preliminary, Final, Corrected |
+| `test_type` | Test definition types | TEST, PARAM, CALC, GROUP |
+| `test_activity` | Test workflow activities | Order, Analyse, VER, REV |
+| `test_status` | Test active status | Active, Inactive, Discontinued |
+| `priority` | General priority values | STAT, HIGH, NORMAL, LOW |
+| `race` | Ethnicity/race categories | Jawa, Sunda, Batak, etc. |
+| `religion` | Religious affiliations | Islam, Kristen, Katolik, Hindu |
+| `marital_status` | Marital status | Single, Married, Divorced |
+| `death_indicator` | Death status flags | Yes, No |
+| `identifier_type` | ID document types | KTP, Passport, SSN, SIM |
+| `operation` | CRUD operation types | Create, Read, Update, Delete |
+| `site_type` | Healthcare facility types | GH, PH, GHL, PHL, GL, PL |
+| `site_class` | Facility classification | A, B, C, D, Utm, Ptm |
+| `ws_type` | Workstation types | Primary, Secondary |
+| `enable_disable` | Boolean toggle states | Enabled, Disabled |
+| `entity_type` | Entity classification | Patient, Provider, Site |
+| `requested_entity` | Requestor types | Physician, Nurse, Lab |
+| `location_type` | Location categories | OPD, IPD, ER, LAB |
+| `area_class` | Geographic classifications | Urban, Rural, Suburban |
+| `adt_event` | ADT event types | Admission, Transfer, Discharge |
+| `body_site` | Collection sites | Left Arm, Right Arm, Finger |
+| `collection_method` | Specimen collection methods | Venipuncture, Fingerstick |
+| `container_size` | Tube/container volumes | 3mL, 5mL, 10mL |
+| `container_class` | Container types | Vacutainer, Tube, Cup |
+| `container_cap_color` | Tube cap colors | Red, Purple, Blue, Green |
+| `additive` | Tube additives | EDTA, Heparin, Fluoride |
+| `fasting_status` | Fasting requirement flags | Fasting, Non-Fasting |
+| `ethnic` | Ethnicity categories | Various regional groups |
+| `math_sign` | Mathematical operators | +, -, *, /, =, <, > |
+| `formula_language` | Formula expression types | Formula, Expression |
+| `generate_by` | Generation methods | Auto, Manual, Import |
+| `did_type` | Device identification types | Serial, MAC, UUID |
+| `activity_result` | Activity outcomes | Success, Fail, Retry |
+| `reference_type` | Reference value types | NMRIC, TEXT, LIST |
+| `range_type` | Range calculation types | REF, CRTC, VAL, RERUN |
+| `numeric_ref_type` | Numeric ref types | Reference, Critical, Valid |
+| `text_ref_type` | Text reference types | Normal, Abnormal, Critical |
+| `request_status` | Request status | Pending, Approved, Rejected |
+| `v_category` | ValueSet categories | Various categories |
### Usage
```php
use App\Libraries\Lookups;
-// Get all lookups formatted for frontend
+// Get all lookups (loads all JSON files, cached)
$allLookups = Lookups::getAll();
-// Get single lookup (returns [{value: 'X', label: 'Y'}, ...])
-$gender = Lookups::get('GENDER');
+// Get single lookup formatted for dropdowns
+$gender = Lookups::get('gender');
+// Returns: [{"value":"1","label":"Female"},{"value":"2","label":"Male"},...]
-// Get raw associative array
-$priorities = Lookups::getRaw('ORDER_PRIORITY');
-// Returns: ['S' => 'Stat', 'A' => 'ASAP', 'R' => 'Routine', ...]
+// Get raw data without formatting
+$raw = Lookups::getRaw('gender');
+// Returns: [{"key":"1","value":"Female"},{"key":"2","value":"Male"},...]
-// Get label by key
-$label = Lookups::getLabel('GENDER', '1'); // Returns 'Female'
+// Get label for a specific key
+$label = Lookups::getLabel('gender', '1'); // Returns 'Female'
+
+// Get key/value pairs for select inputs
+$options = Lookups::getOptions('gender');
+// Returns: [["key":"1","value":"Female"],...]
+
+// Transform database records with lookup text labels
+$patients = [
+ ['ID' => 1, 'Sex' => '1', 'Priority' => 'S'],
+ ['ID' => 2, 'Sex' => '2', 'Priority' => 'R'],
+];
+$labeled = Lookups::transformLabels($patients, [
+ 'Sex' => 'gender',
+ 'Priority' => 'order_priority'
+]);
+// Result: [['ID'=>1, 'Sex'=>'1', 'SexText'=>'Female', 'Priority'=>'S', 'PriorityText'=>'Stat'],...]
+
+// Clear cache after modifying valueset data
+Lookups::clearCache();
```
### Frontend Usage (Alpine.js)
```php
+
```
@@ -132,8 +175,25 @@ console.log(LOOKUPS.gender);
| Approach | Use Case |
|----------|----------|
-| **Static Lookups** | Frequently used values that rarely change (gender, status, types) |
-| **API `/api/valueset*`** | Dynamic values that may be modified by admins at runtime |
+| **Lookups Library** | Static values that rarely change (gender, status, types) - fast, cached |
+| **API `/api/valueset*`** | Dynamic values managed by admins at runtime |
+
+### Adding New Lookups
+
+1. Create `app/Libraries/Data/valuesets/{name}.json`:
+```json
+{
+ "name": "example_lookup",
+ "description": "Example lookup description",
+ "values": [
+ {"key": "1", "value": "Option One"},
+ {"key": "2", "value": "Option Two"},
+ {"key": "3", "value": "Option Three"}
+ ]
+}
+```
+
+2. Access via `Lookups::get('example_lookup')`
---
diff --git a/MVP_TODO.md b/TODO.md
similarity index 100%
rename from MVP_TODO.md
rename to TODO.md
diff --git a/app/Database/Migrations/2025-09-10-141522_Location.php b/app/Database/Migrations/2025-09-10-141522_Location.php
deleted file mode 100644
index 16d8fea..0000000
--- a/app/Database/Migrations/2025-09-10-141522_Location.php
+++ /dev/null
@@ -1,46 +0,0 @@
-forge->addField([
- 'LocationID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
- 'SiteID' => ['type' => 'INT', 'null' => true],
- 'LocCode' => ['type' => 'VARCHAR', 'constraint' => 6, 'null' => false],
- 'Parent' => ['type' => 'INT', 'null' => true],
- 'LocFull' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
- 'Description' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
- 'LocType' => ['type' => 'int', 'null' => true],
- 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
- 'EndDate' => ['type' => 'DATETIME', 'null' => true]
- ]);
- $this->forge->addKey('LocationID', true);
- $this->forge->createTable('location');
-
- $this->forge->addField([
- 'LocationID' => ['type' => 'INT', 'unsigned' => true],
- 'Street1' => ['type' => 'Varchar', 'constraint' => 255, 'null' => true],
- 'Street2' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
- 'City' => ['type' => 'int', 'null' => true],
- 'Province' => ['type' => 'int', 'null' => true],
- 'PostCode' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
- 'GeoLocationSystem' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
- 'GeoLocationData' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
- 'Phone' => ['type' => 'varchar', 'constraint' => 100, 'null' => true],
- 'Email' => ['type' => 'varchar', 'constraint' => 150, 'null' => true],
- 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
- 'EndDate' => ['type' => 'DATETIME', 'null' => true]
- ]);
- $this->forge->addKey('LocationID', true);
- $this->forge->createTable('locationaddress');
- }
-
- public function down() {
- $this->forge->dropTable('location');
- $this->forge->dropTable('locationaddress');
- }
-}
\ No newline at end of file
diff --git a/app/Database/Migrations/2025-09-10-141522_Users.php b/app/Database/Migrations/2025-09-10-141522_Users.php
deleted file mode 100644
index 4314ef9..0000000
--- a/app/Database/Migrations/2025-09-10-141522_Users.php
+++ /dev/null
@@ -1,22 +0,0 @@
-forge->addField([
- 'id' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
- 'role_id' => ['type' => 'TINYINT', 'null' => false],
- 'username' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
- 'password' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
- ]);
- $this->forge->addKey('id', true);
- $this->forge->createTable('users');
- }
-
- public function down() {
- $this->forge->dropTable('users');
- }
-}
\ No newline at end of file
diff --git a/app/Database/Migrations/2025-09-12-011643_Contact.php b/app/Database/Migrations/2025-09-12-011643_Contact.php
deleted file mode 100644
index 41339dd..0000000
--- a/app/Database/Migrations/2025-09-12-011643_Contact.php
+++ /dev/null
@@ -1,84 +0,0 @@
-forge->addField([
- 'ContactID' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true ],
- 'NameFirst' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
- 'NameLast' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
- 'Title' => [ 'type' => 'VARCHAR', 'constraint' => 50, 'null' => true ],
- 'Initial' => [ 'type' => 'VARCHAR', 'constraint' => 10, 'null' => true ],
- 'Birthdate' => [ 'type' => 'DATE', 'null' => true ],
- 'EmailAddress1' => [ 'type' => 'VARCHAR', 'constraint' => 150, 'null' => true ],
- 'EmailAddress2' => [ 'type' => 'VARCHAR', 'constraint' => 150, 'null' => true ],
- 'Phone' => [ 'type' => 'VARCHAR', 'constraint' => 50, 'null' => true ],
- 'MobilePhone1' => [ 'type' => 'VARCHAR', 'constraint' => 50, 'null' => true ],
- 'MobilePhone2' => [ 'type' => 'VARCHAR', 'constraint' => 50, 'null' => true ],
- 'Specialty' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
- 'SubSpecialty' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
- 'Password' => [ 'type' => 'VARCHAR', 'constraint' => 255, 'null' => true ],
-
- // Untuk Auth
- 'LockedAt' => [ 'type' => 'DATETIME', 'null' => true ],
- 'LockReason' => [ 'type' => 'VARCHAR', 'constraint' => 150, 'null' => true ],
- 'Role' => [ 'type' => "ENUM('admin','staff','user')", 'default' => 'user', 'null' => false ],
-
- 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
- 'EndDate' => [ 'type' => 'DATETIME', 'null' => true ],
- ]);
- $this->forge->addKey('ContactID', true);
- $this->forge->addUniqueKey('EmailAddress1');
- $this->forge->createTable('contact');
-
- // ContactDetail
- $this->forge->addField([
- 'ContactDetID' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true ],
- 'ContactID' => [ 'type' => 'INT', 'constraint' => 11 ],
- 'SiteID' => [ 'type' => 'INT', 'constraint' => 11, 'null' => true ],
- 'ContactCode' => [ 'type' => 'varchar', 'constraint' => 11, 'null' => false ],
- 'ContactEmail' => [ 'type' => 'VARCHAR', 'constraint' => 150, 'null' => true ],
- 'OccupationID' => [ 'type' => 'VARCHAR', 'constraint' => 50, 'null' => true ],
- 'JobTitle' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
- 'Department' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
- 'ContactStartDate' => [ 'type' => 'DATETIME', 'null' => true ],
- 'ContactEndDate' => [ 'type' => 'DATETIME ', 'null' => true ],
- ]);
- $this->forge->addKey('ContactDetID', true);
- $this->forge->addUniqueKey(['SiteID','ContactID']);
- $this->forge->createTable('contactdetail');
-
- // Occupation
- $this->forge->addField([
- 'OccupationID' => [ 'type' => 'INT', 'constraint' => 11, 'auto_increment' => true],
- 'OccCode' => [ 'type' => 'VARCHAR', 'constraint' => 5, 'null' => true ],
- 'OccText' => [ 'type' => 'VARCHAR', 'constraint' => 255, 'null' => true ],
- 'Description' => [ 'type' => 'TEXT', 'null' => true ],
- 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
- ]);
- $this->forge->addKey('OccupationID', true);
- $this->forge->createTable('occupation');
-
- $this->forge->addField([
- 'SpecialtyID' => ['type' => 'INT', 'unsigned' => true, 'auto_increment' => true],
- 'SpecialtyText' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
- 'Parent' => ['type' => 'int', 'null' => true],
- 'Title' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => false],
- 'CreateDate' => ['type' => 'datetime', 'null' => true],
- 'EndDate' => ['type' => 'datetime', 'null' => true],
- ]);
- $this->forge->addKey('SpecialtyID', true);
- $this->forge->createTable('medicalspecialty');
- }
-
- public function down() {
- $this->forge->dropTable('contact');
- $this->forge->dropTable('contactdetail');
- $this->forge->dropTable('occupation');
- $this->forge->dropTable('medicalspecialty');
- }
-}
diff --git a/app/Database/Migrations/2025-09-15-130122_ValueSet.php b/app/Database/Migrations/2025-09-15-130122_ValueSet.php
deleted file mode 100644
index c1ca970..0000000
--- a/app/Database/Migrations/2025-09-15-130122_ValueSet.php
+++ /dev/null
@@ -1,41 +0,0 @@
-forge->addField([
- 'VID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
- 'SiteID' => ['type' => 'INT', 'null' => true],
- 'VSetID' => ['type' => 'INT', 'null' => true],
- 'VOrder' => ['type' => 'INT', 'null' => true],
- 'VValue' => ['type' => 'varchar', 'constraint' => 10],
- 'VDesc' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
- 'VCategory' => ['type' => 'int', 'null' => true],
- 'CreateDate' => ['type' => 'Datetime', 'null' => true],
- 'EndDate' => ['type' => 'DATETIME', 'null' => true]
- ]);
- $this->forge->addKey('VID', true);
- $this->forge->createTable('valueset');
-
- $this->forge->addField([
- 'VSetID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
- 'SiteID' => ['type' => 'INT', 'null' => true],
- 'VSName' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => false],
- 'VSDesc' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => false],
- 'CreateDate' => ['type' => 'Datetime', 'null' => true],
- 'EndDate' => ['type' => 'DATETIME', 'null' => true]
- ]);
- $this->forge->addKey('VSetID', true);
- $this->forge->createTable('valuesetdef');
- }
-
- public function down() {
- $this->forge->dropTable('valueset');
- $this->forge->dropTable('valuesetdef');
- }
-
-}
\ No newline at end of file
diff --git a/app/Database/Migrations/2025-09-22-155700_Counter.php b/app/Database/Migrations/2025-09-22-155700_Counter.php
deleted file mode 100644
index 8431680..0000000
--- a/app/Database/Migrations/2025-09-22-155700_Counter.php
+++ /dev/null
@@ -1,27 +0,0 @@
-forge->addField([
- 'CounterID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
- 'CounterValue' => ['type' => 'INT', 'null' => false],
- 'CounterStart' => ['type' => 'INT', 'null' => false],
- 'CounterEnd' => ['type' => 'INT', 'null' => false],
- 'CounterDesc' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
- 'CounterReset' => ['type' => 'varchar', 'constraint' => 1, 'null' => true],
- 'CreateDate' => ['type' => 'Datetime', 'null' => true],
- 'EndDate' => ['type' => 'DATETIME', 'null' => true]
- ]);
- $this->forge->addKey('CounterID', true);
- $this->forge->createTable('counter');
- }
-
- public function down() {
- $this->forge->dropTable('counter');
- }
-}
\ No newline at end of file
diff --git a/app/Database/Migrations/2025-10-12-100001_RefRange.php b/app/Database/Migrations/2025-10-12-100001_RefRange.php
deleted file mode 100644
index 9f27f0e..0000000
--- a/app/Database/Migrations/2025-10-12-100001_RefRange.php
+++ /dev/null
@@ -1,61 +0,0 @@
-forge->addField([
- 'RefNumID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
- 'SiteID' => ['type' => 'INT', 'null' => true],
- 'TestSiteID' => ['type' => 'INT', 'null' => false],
- 'SpcType' => ['type' => 'INT', 'null' => true],
- 'Sex' => ['type' => 'INT', 'null' => true],
- 'Criteria' => ['type' => 'varchar', 'constraint'=>100, 'null' => true],
- 'AgeStart' => ['type' => 'INT', 'null' => true],
- 'AgeEnd' => ['type' => 'int', 'null' => true],
- 'NumRefType' => ['type' => 'INT', 'null' => true],
- 'RangeType' => ['type' => 'INT', 'null' => true],
- 'LowSign' => ['type' => 'INT', 'null' => true],
- 'Low' => ['type' => 'INT', 'null' => true],
- 'HighSign' => ['type' => 'INT', 'null' => true],
- 'High' => ['type' => 'INT', 'null' => true],
- 'Display' => ['type' => 'INT', 'null' => true],
- 'Flag' => ['type' => 'varchar', 'constraint'=>10, 'null' => true],
- 'Interpretation' => ['type' => 'varchar', 'constraint'=>255, 'null' => true],
- 'Notes' => ['type' => 'varchar', 'constraint'=>255, 'null' => true],
- 'CreateDate' => ['type' => 'Datetime', 'null' => true],
- 'StartDate' => ['type' => 'Datetime', 'null' => true],
- 'EndDate' => ['type' => 'Datetime', 'null' => true],
- ]);
- $this->forge->addKey('RefNumID', true);
- $this->forge->createTable('refnum');
-
- $this->forge->addField([
- 'RefTxtID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
- 'SiteID' => ['type' => 'INT', 'null' => true],
- 'TestSiteID' => ['type' => 'INT', 'null' => false],
- 'SpcType' => ['type' => 'varchar', 'constraint'=> 10, 'null' => false],
- 'Sex' => ['type' => 'INT', 'null' => true],
- 'Criteria' => ['type' => 'varchar', 'constraint'=>100, 'null' => true],
- 'AgeStart' => ['type' => 'INT', 'null' => true],
- 'AgeEnd' => ['type' => 'int', 'null' => true],
- 'TxtRefType' => ['type' => 'INT', 'null' => true],
- 'RefTxt' => ['type' => 'varchar', 'constraint'=>255, 'null' => true],
- 'Flag' => ['type' => 'varchar', 'constraint'=>10, 'null' => true],
- 'Notes' => ['type' => 'varchar', 'constraint'=>255, 'null' => true],
- 'CreateDate' => ['type' => 'Datetime', 'null' => true],
- 'StartDate' => ['type' => 'Datetime', 'null' => true],
- 'EndDate' => ['type' => 'Datetime', 'null' => true],
- ]);
- $this->forge->addKey('RefTxtID', true);
- $this->forge->createTable('reftxt');
- }
-
- public function down() {
- $this->forge->dropTable('refnum');
- $this->forge->dropTable('reftxt');
- }
-}
\ No newline at end of file
diff --git a/app/Database/Migrations/2025-10-23-100001_CRMOrganizations.php b/app/Database/Migrations/2025-10-23-100001_CRMOrganizations.php
deleted file mode 100644
index e972ae9..0000000
--- a/app/Database/Migrations/2025-10-23-100001_CRMOrganizations.php
+++ /dev/null
@@ -1,53 +0,0 @@
-forge->addField([
- 'AccountID' => ['type' => 'INT', 'unsigned' => true, 'auto_increment' => true],
- 'Parent' => ['type' => 'INT', 'null' => true],
- 'AccountName' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => false],
- 'Initial' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => false],
- 'Street_1' => ['type' => 'VARCHAR', 'constraint' => 150, 'null' => true],
- 'Street_2' => ['type' => 'VARCHAR', 'constraint' => 150, 'null' => true],
- 'Street_3' => ['type' => 'VARCHAR', 'constraint' => 150, 'null' => true],
- 'City' => ['type' => 'varchar', 'constraint' => 150, 'null' => true],
- 'Province' => ['type' => 'varchar', 'constraint' => 150, 'null' => true],
- 'ZIP' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'Country' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
- 'AreaCode' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
- 'EmailAddress1' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
- 'EmailAddress2' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
- 'Phone' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
- 'Fax' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
- 'CreateDate' => ['type' => 'datetime', 'null'=> true],
- 'EndDate' => ['type' => 'datetime', 'null'=> true]
- ]);
- $this->forge->addKey('AccountID', true);
- $this->forge->createTable('account');
-
- $this->forge->addField([
- 'SiteID' => ['type' => 'INT', 'unsigned' => true, 'auto_increment' => true],
- 'SiteCode' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => false],
- 'SiteName' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => false],
- 'AccountID' => ['type' => 'int', 'null' => true],
- 'SiteTypeID' => ['type' => 'int', 'null' => true],
- 'Parent' => ['type' => 'int', 'null' => true],
- 'SiteClassID' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
- 'ME' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
- 'CreateDate' => ['type' => 'datetime', 'null'=> true],
- 'EndDate' => ['type' => 'datetime', 'null'=> true]
- ]);
- $this->forge->addKey('SiteID', true);
- $this->forge->createTable('site');
- }
-
- public function down() {
- $this->forge->dropTable('accounts');
- $this->forge->dropTable('sites');
- }
-}
\ No newline at end of file
diff --git a/app/Database/Migrations/2025-10-23-110105_Organization.php b/app/Database/Migrations/2025-10-23-110105_Organization.php
deleted file mode 100644
index 320e879..0000000
--- a/app/Database/Migrations/2025-10-23-110105_Organization.php
+++ /dev/null
@@ -1,54 +0,0 @@
-forge->addField([
- 'DisciplineID' => ['type' => 'int', 'unsigned' => true, 'auto_increment'=> true],
- 'SiteID' => ['type' => 'int', 'null'=> false],
- 'DisciplineCode' => ['type' => 'varchar', 'constraint'=> 10, 'null'=> false],
- 'DisciplineName' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
- 'Parent' => ['type' => 'int', 'null'=> true],
- 'CreateDate' => ['type'=>'DATETIME', 'null' => true],
- 'EndDate' => ['type'=>'DATETIME', 'null' => true]
- ]);
- $this->forge->addKey('DisciplineID', true);
- $this->forge->createTable('discipline');
-
- $this->forge->addField([
- 'DepartmentID' => ['type' => 'int', 'unsigned' => true, 'auto_increment'=> true],
- 'DisciplineID' => ['type' => 'int', 'null'=> false],
- 'SiteID' => ['type' => 'int', 'null'=> false],
- 'DepartmentCode' => ['type' => 'varchar', 'constraint'=>10, 'null'=> false],
- 'DepartmentName' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
- 'CreateDate' => ['type'=>'DATETIME', 'null' => true],
- 'EndDate' => ['type'=>'DATETIME', 'null' => true]
- ]);
- $this->forge->addKey('DepartmentID', true);
- $this->forge->createTable('department');
-
- $this->forge->addField([
- 'WorkstationID' => ['type' => 'int', 'unsigned' => true, 'auto_increment'=> true],
- 'DepartmentID' => ['type' => 'int', 'null'=> false],
- 'WorkstationCode' => ['type' => 'varchar', 'constraint'=>10, 'null'=> false],
- 'WorkstationName' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
- 'Type' => ['type' => 'tinyint', 'null'=> true],
- 'LinkTo' => ['type' => 'int', 'null'=> true],
- 'Enable' => ['type' => 'int', 'null'=> true],
- 'CreateDate' => ['type'=>'DATETIME', 'null' => true],
- 'EndDate' => ['type'=>'DATETIME', 'null' => true]
- ]);
- $this->forge->addKey('WorkstationID', true);
- $this->forge->createTable('workstation');
-
- }
-
- public function down() {
- $this->forge->dropTable('discipline', true);
- $this->forge->dropTable('department', true);
- $this->forge->dropTable('workstation', true);
- }
-}
diff --git a/app/Database/Migrations/2025-12-01-100001_AreaGeo.php b/app/Database/Migrations/2025-12-01-100001_AreaGeo.php
deleted file mode 100644
index c3dfffa..0000000
--- a/app/Database/Migrations/2025-12-01-100001_AreaGeo.php
+++ /dev/null
@@ -1,24 +0,0 @@
-forge->addField([
- 'AreaGeoID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
- 'AreaCode' => ['type' => 'varchar', 'constraint' => 20, 'null' => true],
- 'Class' => ['type' => 'int', 'null' => true],
- 'AreaName' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => false],
- 'Parent' => ['type' => 'int', 'null' => true],
- ]);
-
- $this->forge->addKey('AreaGeoID', true);
- $this->forge->createTable('areageo');
- }
-
- public function down() {
- $this->forge->dropTable('areageo');
- }
-}
\ No newline at end of file
diff --git a/app/Database/Migrations/2025-12-01-100001_DeviceLogin.php b/app/Database/Migrations/2025-12-01-100001_DeviceLogin.php
deleted file mode 100644
index a79055e..0000000
--- a/app/Database/Migrations/2025-12-01-100001_DeviceLogin.php
+++ /dev/null
@@ -1,55 +0,0 @@
-forge->addField([
- 'UserDeviceId' => ['type' => 'CHAR', 'constraint' => 36],
- 'ContactID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true],
- 'DeviceFingerprint' => ['type' => 'CHAR', 'constraint' => 64],
-
- 'DeviceLabel' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => true],
- 'Browser' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
- 'BrowserVersion' => ['type' => 'VARCHAR', 'constraint' => 20, 'null' => true],
- 'Platform' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
- 'Timezone' => ['type' => 'VARCHAR', 'constraint' => 50],
- 'Language' => ['type' => 'VARCHAR', 'constraint' => 10],
- 'IpAddress' => ['type' => 'VARCHAR', 'constraint' => 45],
- 'FirstLoginAt' => ['type' => 'DATETIME'],
- 'LastLoginAt' => ['type' => 'DATETIME'],
- 'IsActive' => ['type' => 'TINYINT', 'constraint' => 1, 'default' => 1],
- ]);
-
- $this->forge->addKey('UserDeviceId', true);
- $this->forge->addKey(['ContactID', 'DeviceFingerprint'], false, true);
- $this->forge->createTable('userdevices', true);
-
- // ===== loginattempts =====
- $this->forge->addField([
- 'LoginAttemptId' => ['type' => 'BIGINT', 'unsigned' => true, 'auto_increment' => true],
- 'ContactID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true],
- 'DeviceId' => ['type' => 'CHAR', 'constraint' => 36, 'null' => true],
- 'IpAddress' => ['type' => 'VARCHAR', 'constraint' => 45],
- 'AttemptAt' => ['type' => 'DATETIME'],
- 'IsSuccess' => ['type' => 'TINYINT', 'constraint' => 1],
- 'FailureReason' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
- ]);
-
- $this->forge->addKey('LoginAttemptId', true);
- $this->forge->addKey('ContactID');
- $this->forge->addKey(['IpAddress', 'AttemptAt']);
- $this->forge->addKey(['ContactID', 'AttemptAt']);
-
- $this->forge->createTable('loginattempts', true);
- }
-
- public function down() {
- $this->forge->dropTable('loginattempts', true);
- $this->forge->dropTable('userdevices', true);
- }
-}
diff --git a/app/Database/Migrations/2025-12-29-150000_EdgeRes.php b/app/Database/Migrations/2025-12-29-150000_EdgeRes.php
deleted file mode 100644
index 2e5a886..0000000
--- a/app/Database/Migrations/2025-12-29-150000_EdgeRes.php
+++ /dev/null
@@ -1,58 +0,0 @@
-forge->addField([
- 'EdgeResID' => ['type' => 'INT', 'auto_increment' => true],
- 'SiteID' => ['type' => 'INT', 'null' => true],
- 'InstrumentID' => ['type' => 'varchar', 'constraint' => 100, 'null' => true],
- 'SampleID' => ['type' => 'varchar', 'constraint' => 30, 'null' => true],
- 'PatientID' => ['type' => 'varchar', 'constraint' => 50, 'null' => true],
- 'Payload' => ['type' => 'TEXT', 'null' => true],
- 'Status' => ['type' => 'varchar', 'constraint' => 20, 'default' => 'pending'],
- 'AutoProcess' => ['type' => 'TINYINT', 'default' => 0, 'null' => true],
- 'ProcessedAt' => ['type' => 'DATETIME', 'null' => true],
- 'ErrorMessage' => ['type' => 'TEXT', 'null' => true],
- 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
- 'EndDate' => ['type' => 'DATETIME', 'null' => true],
- 'ArchiveDate' => ['type' => 'DATETIME', 'null' => true],
- 'DelDate' => ['type' => 'DATETIME', 'null' => true],
- ]);
- $this->forge->addPrimaryKey('EdgeResID');
- $this->forge->createTable('edgeres');
-
- // Edge status log - for instrument status tracking
- $this->forge->addField([
- 'EdgeStatusID' => ['type' => 'INT', 'auto_increment' => true],
- 'InstrumentID' => ['type' => 'varchar', 'constraint' => 100, 'null' => true],
- 'Status' => ['type' => 'varchar', 'constraint' => 50, 'null' => true],
- 'LastActivity' => ['type' => 'DATETIME', 'null' => true],
- 'Timestamp' => ['type' => 'DATETIME', 'null' => true],
- 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
- ]);
- $this->forge->addPrimaryKey('EdgeStatusID');
- $this->forge->createTable('edgestatus');
-
- // Edge order acknowledgment log
- $this->forge->addField([
- 'EdgeAckID' => ['type' => 'INT', 'auto_increment' => true],
- 'OrderID' => ['type' => 'INT', 'null' => true],
- 'InstrumentID' => ['type' => 'varchar', 'constraint' => 100, 'null' => true],
- 'AckDate' => ['type' => 'DATETIME', 'null' => true],
- 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
- ]);
- $this->forge->addPrimaryKey('EdgeAckID');
- $this->forge->createTable('edgeack');
- }
-
- public function down() {
- $this->forge->dropTable('edgeack', true);
- $this->forge->dropTable('edgestatus', true);
- $this->forge->dropTable('edgeres', true);
- }
-}
diff --git a/app/Database/Migrations/2026-01-01-000001_CreateLookups.php b/app/Database/Migrations/2026-01-01-000001_CreateLookups.php
new file mode 100644
index 0000000..68c3b28
--- /dev/null
+++ b/app/Database/Migrations/2026-01-01-000001_CreateLookups.php
@@ -0,0 +1,93 @@
+forge->addField([
+ 'VID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
+ 'SiteID' => ['type' => 'INT', 'null' => true],
+ 'VSetID' => ['type' => 'INT', 'null' => true],
+ 'VOrder' => ['type' => 'INT', 'null' => true],
+ 'VValue' => ['type' => 'varchar', 'constraint' => 10],
+ 'VDesc' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
+ 'VCategory' => ['type' => 'int', 'null' => true],
+ 'CreateDate' => ['type' => 'Datetime', 'null' => true],
+ 'EndDate' => ['type' => 'DATETIME', 'null' => true]
+ ]);
+ $this->forge->addKey('VID', true);
+ $this->forge->createTable('valueset');
+
+ $this->forge->addField([
+ 'VSetID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
+ 'SiteID' => ['type' => 'INT', 'null' => true],
+ 'VSName' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => false],
+ 'VSDesc' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => false],
+ 'CreateDate' => ['type' => 'Datetime', 'null' => true],
+ 'EndDate' => ['type' => 'DATETIME', 'null' => true]
+ ]);
+ $this->forge->addKey('VSetID', true);
+ $this->forge->createTable('valuesetdef');
+
+ $this->forge->addField([
+ 'CounterID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
+ 'CounterValue' => ['type' => 'INT', 'null' => false],
+ 'CounterStart' => ['type' => 'INT', 'null' => false],
+ 'CounterEnd' => ['type' => 'INT', 'null' => false],
+ 'CounterDesc' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
+ 'CounterReset' => ['type' => 'varchar', 'constraint' => 1, 'null' => true],
+ 'CreateDate' => ['type' => 'Datetime', 'null' => true],
+ 'EndDate' => ['type' => 'DATETIME', 'null' => true]
+ ]);
+ $this->forge->addKey('CounterID', true);
+ $this->forge->createTable('counter');
+
+ $this->forge->addField([
+ 'ConDefID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
+ 'SiteID' => ['type' => 'INT', 'null' => true],
+ 'ConCode' => ['type' => 'VARCHAR', 'constraint' => 3, 'null' => false],
+ 'ConName' => ['type' => 'varchar', 'constraint' => 50, 'null' => true],
+ 'ConDesc' => ['type' => 'varchar', 'constraint' => 50, 'null' => true],
+ 'Additive' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'ConClass' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'Color' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'CreateDate' => ['type' => 'Datetime', 'null' => true],
+ 'EndDate' => ['type' => 'DATETIME', 'null' => true]
+ ]);
+ $this->forge->addKey('ConDefID', true);
+ $this->forge->addUniqueKey('ConCode');
+ $this->forge->createTable('containerdef');
+
+ $this->forge->addField([
+ 'OccupationID' => [ 'type' => 'INT', 'constraint' => 11, 'auto_increment' => true],
+ 'OccCode' => [ 'type' => 'VARCHAR', 'constraint' => 5, 'null' => true ],
+ 'OccText' => [ 'type' => 'VARCHAR', 'constraint' => 255, 'null' => true ],
+ 'Description' => [ 'type' => 'TEXT', 'null' => true ],
+ 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
+ ]);
+ $this->forge->addKey('OccupationID', true);
+ $this->forge->createTable('occupation');
+
+ $this->forge->addField([
+ 'SpecialtyID' => ['type' => 'INT', 'unsigned' => true, 'auto_increment' => true],
+ 'SpecialtyText' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
+ 'Parent' => ['type' => 'int', 'null' => true],
+ 'Title' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => false],
+ 'CreateDate' => ['type' => 'datetime', 'null' => true],
+ 'EndDate' => ['type' => 'datetime', 'null' => true],
+ ]);
+ $this->forge->addKey('SpecialtyID', true);
+ $this->forge->createTable('medicalspecialty');
+ }
+
+ public function down() {
+ $this->forge->dropTable('medicalspecialty');
+ $this->forge->dropTable('occupation');
+ $this->forge->dropTable('containerdef');
+ $this->forge->dropTable('counter');
+ $this->forge->dropTable('valuesetdef');
+ $this->forge->dropTable('valueset');
+ }
+}
diff --git a/app/Database/Migrations/2026-01-01-000002_CreateOrganization.php b/app/Database/Migrations/2026-01-01-000002_CreateOrganization.php
new file mode 100644
index 0000000..a50bf54
--- /dev/null
+++ b/app/Database/Migrations/2026-01-01-000002_CreateOrganization.php
@@ -0,0 +1,111 @@
+forge->addField([
+ 'AccountID' => ['type' => 'INT', 'unsigned' => true, 'auto_increment' => true],
+ 'Parent' => ['type' => 'INT', 'null' => true],
+ 'AccountName' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => false],
+ 'Initial' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => false],
+ 'Street_1' => ['type' => 'VARCHAR', 'constraint' => 150, 'null' => true],
+ 'Street_2' => ['type' => 'VARCHAR', 'constraint' => 150, 'null' => true],
+ 'Street_3' => ['type' => 'VARCHAR', 'constraint' => 150, 'null' => true],
+ 'City' => ['type' => 'varchar', 'constraint' => 150, 'null' => true],
+ 'Province' => ['type' => 'varchar', 'constraint' => 150, 'null' => true],
+ 'ZIP' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'Country' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'AreaCode' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
+ 'EmailAddress1' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
+ 'EmailAddress2' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
+ 'Phone' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
+ 'Fax' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
+ 'CreateDate' => ['type' => 'datetime', 'null'=> true],
+ 'EndDate' => ['type' => 'datetime', 'null'=> true]
+ ]);
+ $this->forge->addKey('AccountID', true);
+ $this->forge->createTable('account');
+
+ $this->forge->addField([
+ 'SiteID' => ['type' => 'INT', 'unsigned' => true, 'auto_increment' => true],
+ 'SiteCode' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => false],
+ 'SiteName' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => false],
+ 'AccountID' => ['type' => 'int', 'null' => true],
+ 'SiteTypeID' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'Parent' => ['type' => 'int', 'null' => true],
+ 'SiteClassID' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
+ 'ME' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
+ 'CreateDate' => ['type' => 'datetime', 'null'=> true],
+ 'EndDate' => ['type' => 'datetime', 'null'=> true]
+ ]);
+ $this->forge->addKey('SiteID', true);
+ $this->forge->createTable('site');
+
+ $this->forge->addField([
+ 'LocationID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
+ 'SiteID' => ['type' => 'INT', 'null' => true],
+ 'LocCode' => ['type' => 'VARCHAR', 'constraint' => 6, 'null' => false],
+ 'Parent' => ['type' => 'INT', 'null' => true],
+ 'LocFull' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
+ 'Description' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
+ 'LocType' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
+ 'EndDate' => ['type' => 'DATETIME', 'null' => true]
+ ]);
+ $this->forge->addKey('LocationID', true);
+ $this->forge->createTable('location');
+
+ $this->forge->addField([
+ 'LocationID' => ['type' => 'INT', 'unsigned' => true],
+ 'Street1' => ['type' => 'Varchar', 'constraint' => 255, 'null' => true],
+ 'Street2' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
+ 'City' => ['type' => 'int', 'null' => true],
+ 'Province' => ['type' => 'int', 'null' => true],
+ 'PostCode' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
+ 'GeoLocationSystem' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
+ 'GeoLocationData' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
+ 'Phone' => ['type' => 'varchar', 'constraint' => 100, 'null' => true],
+ 'Email' => ['type' => 'varchar', 'constraint' => 150, 'null' => true],
+ 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
+ 'EndDate' => ['type' => 'DATETIME', 'null' => true]
+ ]);
+ $this->forge->addKey('LocationID', true);
+ $this->forge->createTable('locationaddress');
+
+ $this->forge->addField([
+ 'DisciplineID' => ['type' => 'int', 'unsigned' => true, 'auto_increment'=> true],
+ 'SiteID' => ['type' => 'int', 'null'=> false],
+ 'DisciplineCode' => ['type' => 'varchar', 'constraint'=> 10, 'null'=> false],
+ 'DisciplineName' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
+ 'Parent' => ['type' => 'int', 'null'=> true],
+ 'CreateDate' => ['type'=>'DATETIME', 'null' => true],
+ 'EndDate' => ['type'=>'DATETIME', 'null' => true]
+ ]);
+ $this->forge->addKey('DisciplineID', true);
+ $this->forge->createTable('discipline');
+
+ $this->forge->addField([
+ 'DepartmentID' => ['type' => 'int', 'unsigned' => true, 'auto_increment'=> true],
+ 'DisciplineID' => ['type' => 'int', 'null'=> false],
+ 'SiteID' => ['type' => 'int', 'null'=> false],
+ 'DepartmentCode' => ['type' => 'varchar', 'constraint'=>10, 'null'=> false],
+ 'DepartmentName' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
+ 'CreateDate' => ['type'=>'DATETIME', 'null' => true],
+ 'EndDate' => ['type'=>'DATETIME', 'null' => true]
+ ]);
+ $this->forge->addKey('DepartmentID', true);
+ $this->forge->createTable('department');
+ }
+
+ public function down() {
+ $this->forge->dropTable('department');
+ $this->forge->dropTable('discipline');
+ $this->forge->dropTable('locationaddress');
+ $this->forge->dropTable('location');
+ $this->forge->dropTable('site');
+ $this->forge->dropTable('account');
+ }
+}
diff --git a/app/Database/Migrations/2025-09-02-070826_PatientReg.php b/app/Database/Migrations/2026-01-01-000003_CreatePatientCore.php
similarity index 87%
rename from app/Database/Migrations/2025-09-02-070826_PatientReg.php
rename to app/Database/Migrations/2026-01-01-000003_CreatePatientCore.php
index 5c9f024..8ff00c4 100644
--- a/app/Database/Migrations/2025-09-02-070826_PatientReg.php
+++ b/app/Database/Migrations/2026-01-01-000003_CreatePatientCore.php
@@ -4,48 +4,8 @@ namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
-class CreatePatientRegTables extends Migration {
+class CreatePatientCore extends Migration {
public function up() {
- // patatt
- $this->forge->addField([
- 'PatAttID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
- 'InternalPID'=> ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'Address' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
- 'UserID' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
- 'DelDate' => ['type' => 'DATETIME', 'null' => true],
- ]);
- $this->forge->addKey('PatAttID', true);
- $this->forge->addUniqueKey('Address');
- $this->forge->createTable('patatt');
-
- // patcom
- $this->forge->addField([
- 'PatComID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
- 'InternalPID'=> ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'Comment' => ['type' => 'TEXT', 'null' => true],
- 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
- 'EndDate' => ['type' => 'DATETIME', 'null' => true],
- ]);
- $this->forge->addKey('PatComID', true);
- $this->forge->addUniqueKey('InternalPID');
- $this->forge->createTable('patcom');
-
- // patidt
- $this->forge->addField([
- 'PatIdtID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
- 'InternalPID' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'IdentifierType'=> ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
- 'Identifier' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
- 'EffectiveDate' => ['type' => 'DATETIME', 'null' => true],
- 'ExpirationDate'=> ['type' => 'DATETIME', 'null' => true],
- 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
- 'DelDate' => ['type' => 'DATETIME', 'null' => true],
- ]);
- $this->forge->addKey('PatIdtID', true);
- $this->forge->createTable('patidt');
-
- // patient
$this->forge->addField([
'InternalPID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
'PatientID' => ['type' => 'VARCHAR', 'constraint' => 255],
@@ -57,7 +17,7 @@ class CreatePatientRegTables extends Migration {
'NameLast' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
'Suffix' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
'NameAlias' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
- 'Gender' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
+ 'Sex' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
'PlaceOfBirth' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
'Birthdate' => ['type' => 'DATE', 'null' => true],
'Street_1' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
@@ -72,13 +32,13 @@ class CreatePatientRegTables extends Migration {
'MobilePhone' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
'Custodian' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
'AccountNumber' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'Country' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'Race' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'MaritalStatus' => ['type' => 'TINYINT', 'null' => true],
- 'Religion' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'Ethnic' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
+ 'Country' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'Race' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'MaritalStatus' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'Religion' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'Ethnic' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
'Citizenship' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
- 'DeathIndicator'=> ['type' => 'INT', 'constraint' => 11, 'null' => true],
+ 'DeathIndicator'=> ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
'TimeOfDeath' => ['type' => 'DATETIME', 'null' => true],
'LinkTo' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
'CreateDate' => ['type' => 'DATETIME', 'null' => true],
@@ -86,11 +46,55 @@ class CreatePatientRegTables extends Migration {
]);
$this->forge->addKey('InternalPID', true);
$this->forge->addUniqueKey('PatientID');
- $this->forge->addUniqueKey('AlternatePID');
+ $this->forge->addUniqueKey('AlternatePID');
$this->forge->addUniqueKey('EmailAddress1');
$this->forge->createTable('patient');
- // patreglog
+ $this->forge->addField([
+ 'PatAttID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
+ 'InternalPID'=> ['type' => 'INT', 'constraint' => 11, 'null' => true],
+ 'Address' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
+ 'UserID' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
+ 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
+ 'DelDate' => ['type' => 'DATETIME', 'null' => true],
+ ]);
+ $this->forge->addKey('PatAttID', true);
+ $this->forge->addUniqueKey('Address');
+ $this->forge->createTable('patatt');
+
+ $this->forge->addField([
+ 'PatComID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
+ 'InternalPID'=> ['type' => 'INT', 'constraint' => 11, 'null' => true],
+ 'Comment' => ['type' => 'TEXT', 'null' => true],
+ 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
+ 'EndDate' => ['type' => 'DATETIME', 'null' => true],
+ ]);
+ $this->forge->addKey('PatComID', true);
+ $this->forge->addUniqueKey('InternalPID');
+ $this->forge->createTable('patcom');
+
+ $this->forge->addField([
+ 'PatIdtID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
+ 'InternalPID' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
+ 'IdentifierType'=> ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
+ 'Identifier' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
+ 'EffectiveDate' => ['type' => 'DATETIME', 'null' => true],
+ 'ExpirationDate'=> ['type' => 'DATETIME', 'null' => true],
+ 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
+ 'DelDate' => ['type' => 'DATETIME', 'null' => true],
+ ]);
+ $this->forge->addKey('PatIdtID', true);
+ $this->forge->createTable('patidt');
+
+ $this->forge->addField([
+ 'PatRelID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
+ 'InternalPID'=> ['type' => 'INT', 'constraint' => 11, 'null' => true],
+ 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
+ 'EndDate' => ['type' => 'DATETIME', 'null' => true],
+ ]);
+ $this->forge->addKey('PatRelID', true);
+ $this->forge->createTable('patrelation');
+
$this->forge->addField([
'PatRegLogID'=> ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
'TblName' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
@@ -113,24 +117,14 @@ class CreatePatientRegTables extends Migration {
]);
$this->forge->addKey('PatRegLogID', true);
$this->forge->createTable('patreglog');
-
- // patrelation
- $this->forge->addField([
- 'PatRelID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
- 'InternalPID'=> ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
- 'EndDate' => ['type' => 'DATETIME', 'null' => true],
- ]);
- $this->forge->addKey('PatRelID', true);
- $this->forge->createTable('patrelation');
}
public function down() {
- $this->forge->dropTable('patatt', true);
- $this->forge->dropTable('patcom', true);
- $this->forge->dropTable('patidt', true);
- $this->forge->dropTable('patient', true);
- $this->forge->dropTable('patreglog', true);
- $this->forge->dropTable('patrelation', true);
+ $this->forge->dropTable('patreglog');
+ $this->forge->dropTable('patrelation');
+ $this->forge->dropTable('patidt');
+ $this->forge->dropTable('patcom');
+ $this->forge->dropTable('patatt');
+ $this->forge->dropTable('patient');
}
}
diff --git a/app/Database/Migrations/2026-01-01-000004_CreateSecurity.php b/app/Database/Migrations/2026-01-01-000004_CreateSecurity.php
new file mode 100644
index 0000000..004bdde
--- /dev/null
+++ b/app/Database/Migrations/2026-01-01-000004_CreateSecurity.php
@@ -0,0 +1,101 @@
+forge->addField([
+ 'id' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
+ 'role_id' => ['type' => 'TINYINT', 'null' => false],
+ 'username' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
+ 'password' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
+ ]);
+ $this->forge->addKey('id', true);
+ $this->forge->createTable('users');
+
+ $this->forge->addField([
+ 'ContactID' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true ],
+ 'NameFirst' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
+ 'NameLast' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
+ 'Title' => [ 'type' => 'VARCHAR', 'constraint' => 50, 'null' => true ],
+ 'Initial' => [ 'type' => 'VARCHAR', 'constraint' => 10, 'null' => true ],
+ 'Birthdate' => [ 'type' => 'DATE', 'null' => true ],
+ 'EmailAddress1' => [ 'type' => 'VARCHAR', 'constraint' => 150, 'null' => true ],
+ 'EmailAddress2' => [ 'type' => 'VARCHAR', 'constraint' => 150, 'null' => true ],
+ 'Phone' => [ 'type' => 'VARCHAR', 'constraint' => 50, 'null' => true ],
+ 'MobilePhone1' => [ 'type' => 'VARCHAR', 'constraint' => 50, 'null' => true ],
+ 'MobilePhone2' => [ 'type' => 'VARCHAR', 'constraint' => 50, 'null' => true ],
+ 'Specialty' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
+ 'SubSpecialty' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
+ 'Password' => [ 'type' => 'VARCHAR', 'constraint' => 255, 'null' => true ],
+ 'LockedAt' => [ 'type' => 'DATETIME', 'null' => true ],
+ 'LockReason' => [ 'type' => 'VARCHAR', 'constraint' => 150, 'null' => true ],
+ 'Role' => [ 'type' => "ENUM('admin','staff','user')", 'default' => 'user', 'null' => false ],
+ 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
+ 'EndDate' => [ 'type' => 'DATETIME', 'null' => true ],
+ ]);
+ $this->forge->addKey('ContactID', true);
+ $this->forge->addUniqueKey('EmailAddress1');
+ $this->forge->createTable('contact');
+
+ $this->forge->addField([
+ 'ContactDetID' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true ],
+ 'ContactID' => [ 'type' => 'INT', 'constraint' => 11 ],
+ 'SiteID' => [ 'type' => 'INT', 'constraint' => 11, 'null' => true ],
+ 'ContactCode' => [ 'type' => 'varchar', 'constraint' => 11, 'null' => false ],
+ 'ContactEmail' => [ 'type' => 'VARCHAR', 'constraint' => 150, 'null' => true ],
+ 'OccupationID' => [ 'type' => 'VARCHAR', 'constraint' => 50, 'null' => true ],
+ 'JobTitle' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
+ 'Department' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
+ 'ContactStartDate' => [ 'type' => 'DATETIME', 'null' => true ],
+ 'ContactEndDate' => [ 'type' => 'DATETIME ', 'null' => true ],
+ ]);
+ $this->forge->addKey('ContactDetID', true);
+ $this->forge->addUniqueKey(['SiteID','ContactID']);
+ $this->forge->createTable('contactdetail');
+
+ $this->forge->addField([
+ 'UserDeviceId' => ['type' => 'CHAR', 'constraint' => 36],
+ 'ContactID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true],
+ 'DeviceFingerprint' => ['type' => 'CHAR', 'constraint' => 64],
+ 'DeviceLabel' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => true],
+ 'Browser' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
+ 'BrowserVersion' => ['type' => 'VARCHAR', 'constraint' => 20, 'null' => true],
+ 'Platform' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
+ 'Timezone' => ['type' => 'VARCHAR', 'constraint' => 50],
+ 'Language' => ['type' => 'VARCHAR', 'constraint' => 10],
+ 'IpAddress' => ['type' => 'VARCHAR', 'constraint' => 45],
+ 'FirstLoginAt' => ['type' => 'DATETIME'],
+ 'LastLoginAt' => ['type' => 'DATETIME'],
+ 'IsActive' => ['type' => 'TINYINT', 'constraint' => 1, 'default' => 1],
+ ]);
+ $this->forge->addKey('UserDeviceId', true);
+ $this->forge->addKey(['ContactID', 'DeviceFingerprint'], false, true);
+ $this->forge->createTable('userdevices', true);
+
+ $this->forge->addField([
+ 'LoginAttemptId' => ['type' => 'BIGINT', 'unsigned' => true, 'auto_increment' => true],
+ 'ContactID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true],
+ 'DeviceId' => ['type' => 'CHAR', 'constraint' => 36, 'null' => true],
+ 'IpAddress' => ['type' => 'VARCHAR', 'constraint' => 45],
+ 'AttemptAt' => ['type' => 'DATETIME'],
+ 'IsSuccess' => ['type' => 'TINYINT', 'constraint' => 1],
+ 'FailureReason' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
+ ]);
+ $this->forge->addKey('LoginAttemptId', true);
+ $this->forge->addKey('ContactID');
+ $this->forge->addKey(['IpAddress', 'AttemptAt']);
+ $this->forge->addKey(['ContactID', 'AttemptAt']);
+ $this->forge->createTable('loginattempts', true);
+ }
+
+ public function down() {
+ $this->forge->dropTable('loginattempts');
+ $this->forge->dropTable('userdevices');
+ $this->forge->dropTable('contactdetail');
+ $this->forge->dropTable('contact');
+ $this->forge->dropTable('users');
+ }
+}
diff --git a/app/Database/Migrations/2025-09-09-155526_PatVisit.php b/app/Database/Migrations/2026-01-01-000005_CreatePatientVisits.php
similarity index 91%
rename from app/Database/Migrations/2025-09-09-155526_PatVisit.php
rename to app/Database/Migrations/2026-01-01-000005_CreatePatientVisits.php
index fd4f1b3..981cbbb 100644
--- a/app/Database/Migrations/2025-09-09-155526_PatVisit.php
+++ b/app/Database/Migrations/2026-01-01-000005_CreatePatientVisits.php
@@ -4,9 +4,8 @@ namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
-class CreatePVTables extends Migration {
+class CreatePatientVisits extends Migration {
public function up() {
- // patvisit
$this->forge->addField([
'SiteID' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
'InternalPVID'=> ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
@@ -16,14 +15,12 @@ class CreatePVTables extends Migration {
'CreateDate' => ['type' => 'DATETIME', 'null' => true],
'EndDate' => ['type' => 'DATETIME', 'null' => true],
'ArchivedDate'=> ['type' => 'DATETIME', 'null' => true],
- 'DelDate' => ['type' => 'DATETIME', 'null' => true],
+ 'DelDate' => ['type' => 'DATETIME', 'null' => true],
]);
-
$this->forge->addKey('InternalPVID', true);
$this->forge->addUniqueKey('PVID');
$this->forge->createTable('patvisit');
- // patdiag
$this->forge->addField([
'InternalPVID' => ['type' => 'INT', 'constraint' => 11],
'InternalPID' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
@@ -37,7 +34,6 @@ class CreatePVTables extends Migration {
$this->forge->addKey('InternalPVID', true);
$this->forge->createTable('patdiag');
- // patvisitadt
$this->forge->addField([
'PVADTID' => ['type' => 'INT', 'unsigned' => true, 'auto_increment' => true],
'InternalPVID'=> ['type' => 'INT', 'null' => true],
@@ -55,7 +51,6 @@ class CreatePVTables extends Migration {
$this->forge->addKey('PVADTID', true);
$this->forge->createTable('patvisitadt');
- // patvisitlog
$this->forge->addField([
'PatVisLogID'=> ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
'TblName' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
@@ -82,9 +77,9 @@ class CreatePVTables extends Migration {
}
public function down() {
- $this->forge->dropTable('patdiag', true);
- $this->forge->dropTable('patvisit', true);
- $this->forge->dropTable('patvisitadt', true);
- $this->forge->dropTable('patvisitlog', true);
+ $this->forge->dropTable('patvisitlog');
+ $this->forge->dropTable('patvisitadt');
+ $this->forge->dropTable('patdiag');
+ $this->forge->dropTable('patvisit');
}
-}
\ No newline at end of file
+}
diff --git a/app/Database/Migrations/2025-10-11-100001_OrderTest.php b/app/Database/Migrations/2026-01-01-000006_CreateOrders.php
similarity index 94%
rename from app/Database/Migrations/2025-10-11-100001_OrderTest.php
rename to app/Database/Migrations/2026-01-01-000006_CreateOrders.php
index cd74209..40378a2 100644
--- a/app/Database/Migrations/2025-10-11-100001_OrderTest.php
+++ b/app/Database/Migrations/2026-01-01-000006_CreateOrders.php
@@ -4,7 +4,7 @@ namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
-class CreateOrdersTable extends Migration {
+class CreateOrders extends Migration {
public function up() {
$this->forge->addField([
'InternalOID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
@@ -14,7 +14,7 @@ class CreateOrdersTable extends Migration {
'SiteID' => ['type' => 'VARCHAR', 'constraint'=> 15, 'null' => false],
'PVADTID' => ['type' => 'INT', 'null' => false],
'ReqApp' => ['type' => 'VARCHAR', 'constraint'=> 15, 'null' => true],
- 'Priority' => ['type' => 'VARCHAR', 'constraint' => 50, 'null' => true],
+ 'Priority' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
'TrnDate' => ['type' => 'Datetime', 'null' => true],
'EffDate' => ['type' => 'Datetime', 'null' => true],
'CreateDate' => ['type' => 'Datetime', 'null' => true],
@@ -53,7 +53,7 @@ class CreateOrdersTable extends Migration {
$this->forge->addField([
'OrderStatID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
'InternalOID' => ['type' => 'INT', 'null' => false],
- 'OrderStatus' => ['type' => 'INT', 'null' => false],
+ 'OrderStatus' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => false],
'CreateDate' => ['type' => 'Datetime', 'null' => true],
'EndDate' => ['type' => 'Datetime', 'null' => true],
'ArchiveDate' => ['type' => 'Datetime', 'null' => true],
@@ -61,13 +61,12 @@ class CreateOrdersTable extends Migration {
]);
$this->forge->addKey('OrderStatID', true);
$this->forge->createTable('orderstatus');
-
}
public function down() {
- $this->forge->dropTable('ordertest');
- $this->forge->dropTable('ordercom');
- $this->forge->dropTable('orderatt');
$this->forge->dropTable('orderstatus');
+ $this->forge->dropTable('orderatt');
+ $this->forge->dropTable('ordercom');
+ $this->forge->dropTable('ordertest');
}
-}
\ No newline at end of file
+}
diff --git a/app/Database/Migrations/2025-10-07-132705_Specimen.php b/app/Database/Migrations/2026-01-01-000007_CreateSpecimens.php
similarity index 76%
rename from app/Database/Migrations/2025-10-07-132705_Specimen.php
rename to app/Database/Migrations/2026-01-01-000007_CreateSpecimens.php
index 20fe325..64e35ca 100644
--- a/app/Database/Migrations/2025-10-07-132705_Specimen.php
+++ b/app/Database/Migrations/2026-01-01-000007_CreateSpecimens.php
@@ -4,25 +4,8 @@ namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
-class CreateSpecimenTable extends Migration {
+class CreateSpecimens extends Migration {
public function up() {
-
- $this->forge->addField([
- 'ConDefID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
- 'SiteID' => ['type' => 'INT', 'null' => true],
- 'ConCode' => ['type' => 'VARCHAR', 'constraint' => 3, 'null' => false],
- 'ConName' => ['type' => 'varchar', 'constraint' => 50, 'null' => true],
- 'ConDesc' => ['type' => 'varchar', 'constraint' => 50, 'null' => true],
- 'Additive' => ['type' => 'int', 'null' => true],
- 'ConClass' => ['type' => 'int', 'null' => true],
- 'Color' => ['type' => 'int', 'null' => true],
- 'CreateDate' => ['type' => 'Datetime', 'null' => true],
- 'EndDate' => ['type' => 'DATETIME', 'null' => true]
- ]);
- $this->forge->addKey('ConDefID', true);
- $this->forge->addUniqueKey('ConCode');
- $this->forge->createTable('containerdef');
-
$this->forge->addField([
'InternalSID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
'SID' => ['type' => 'VARCHAR', 'constraint' => 30, 'null' => false],
@@ -32,14 +15,14 @@ class CreateSpecimenTable extends Migration {
'Parent' => ['type' => 'varchar', 'constraint' => 30, 'null' => true],
'Qty' => ['type' => 'INT', 'null' => true],
'Unit' => ['type' => 'varchar', 'constraint'=> 30, 'null' => true],
- 'GenerateBy' => ['type' => 'int', 'null' => true],
+ 'GenerateBy' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
'SchDateTime' => ['type' => 'datetime', 'null' => true],
'CreateDate' => ['type' => 'Datetime', 'null' => true],
'EndDate' => ['type' => 'DATETIME', 'null' => true],
'ArchiveDate' => ['type' => 'DATETIME', 'null' => true]
]);
$this->forge->addKey('InternalSID', true);
- $this->forge->addUniqueKey('SID');
+ $this->forge->addUniqueKey('SID');
$this->forge->createTable('specimen');
$this->forge->addField([
@@ -48,10 +31,10 @@ class CreateSpecimenTable extends Migration {
'OrderID' => ['type' => 'int', 'null' => false],
'SpcAct' => ['type' => 'varchar', 'constraint' => 15, 'null' => true],
'ActRes' => ['type' => 'INT', 'null' => true],
- 'SpcStatus' => ['type' => 'int', 'null' => true],
+ 'SpcStatus' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
'Qty' => ['type' => 'INT', 'null' => true],
- 'Unit' => ['type' => 'INT', 'null' => true], //['type' => 'varchar' , 'constraint'=> 30, 'null' => true],
- 'SpcCon' => ['type' => 'INT', 'null' => true], //['type' => 'varchar', 'constraint'=> 30, 'null' => true],
+ 'Unit' => ['type' => 'INT', 'null' => true],
+ 'SpcCon' => ['type' => 'INT', 'null' => true],
'Comment' => ['type' => 'varchar', 'constraint'=>150, 'null' => true],
'CurrSiteID' => ['type' => 'int', 'null' => true ],
'CurrLocID' => ['type' => 'int', 'null' => true ],
@@ -71,10 +54,10 @@ class CreateSpecimenTable extends Migration {
$this->forge->addField([
'SpcColID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
'SpcStaID' => ['type' => 'INT', 'unsigned' => true],
- 'SpcRole' => ['type' => 'int', 'null' => true],
- 'ColMethod' => ['type' => 'int', 'null' => true],
- 'BodySite' => ['type' => 'int', 'null' => true],
- 'CntSize' => ['type' => 'INT', 'null' => true],
+ 'SpcRole' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'ColMethod' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'BodySite' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'CntSize' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
'FastingVolume' => ['type' => 'varchar', 'constraint'=> 2, 'null' => true],
'ColStart' => ['type' => 'datetime', 'null' => true],
'ColEnd' => ['type' => 'datetime', 'null' => true],
@@ -89,10 +72,10 @@ class CreateSpecimenTable extends Migration {
'SpcPrpID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
'SpcStaID' => ['type' => 'INT', 'unsigned' => true],
'Description' => ['type' => 'varchar', 'constraint' => 150, 'null' => true],
- 'Method' => ['type' => 'int', 'null' => true],
- 'Additive' => ['type' => 'int', 'null' => true],
+ 'Method' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'Additive' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
'AddQty' => ['type' => 'float', 'null' => true],
- 'AddUnit' => ['type' => 'int', 'null' => true],
+ 'AddUnit' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
'PrepStart' => ['type' => 'datetime', 'null' => true],
'PrepEnd' => ['type' => 'datetime', 'null' => true],
'CreateDate' => ['type' => 'Datetime', 'null' => true],
@@ -127,11 +110,10 @@ class CreateSpecimenTable extends Migration {
}
public function down() {
- $this->forge->dropTable('containerdef');
- $this->forge->dropTable('specimens');
- $this->forge->dropTable('specimenstatus');
- $this->forge->dropTable('specimencollection');
- $this->forge->dropTable('specimenprep');
$this->forge->dropTable('specimenlog');
+ $this->forge->dropTable('specimenprep');
+ $this->forge->dropTable('specimencollection');
+ $this->forge->dropTable('specimenstatus');
+ $this->forge->dropTable('specimen');
}
-}
\ No newline at end of file
+}
diff --git a/app/Database/Migrations/2025-10-11-100001_Test.php b/app/Database/Migrations/2026-01-01-000008_CreateTestDefinitions.php
similarity index 62%
rename from app/Database/Migrations/2025-10-11-100001_Test.php
rename to app/Database/Migrations/2026-01-01-000008_CreateTestDefinitions.php
index 1c23faf..ea2312c 100644
--- a/app/Database/Migrations/2025-10-11-100001_Test.php
+++ b/app/Database/Migrations/2026-01-01-000008_CreateTestDefinitions.php
@@ -4,15 +4,14 @@ namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
-class CreateTestsTable extends Migration {
+class CreateTestDefinitions extends Migration {
public function up() {
- // testdefsite - Main test definition table per site
$this->forge->addField([
'TestSiteID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
'SiteID' => ['type' => 'INT', 'null' => false],
'TestSiteCode' => ['type' => 'varchar', 'constraint'=> 6, 'null' => false],
'TestSiteName' => ['type' => 'varchar', 'constraint'=> 100, 'null' => false],
- 'TestType' => ['type' => 'int', 'null' => false],
+ 'TestType' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => false],
'Description' => ['type' => 'varchar', 'constraint'=> 255, 'null' => true],
'SeqScr' => ['type' => 'int', 'null' => true],
'SeqRpt' => ['type' => 'int', 'null' => true],
@@ -28,15 +27,14 @@ class CreateTestsTable extends Migration {
$this->forge->addKey('TestSiteID', true);
$this->forge->createTable('testdefsite');
- // testdeftech - Technical definition for TEST and PARAM types
$this->forge->addField([
'TestTechID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
'TestSiteID' => ['type' => 'INT', 'unsigned' => true, 'null' => false],
- 'DisciplineID' => ['type' => 'int', 'null' => true],
- 'DepartmentID' => ['type' => 'int', 'null' => true],
- 'ResultType' => ['type' => 'varchar', 'constraint'=> 20, 'null' => true],
- 'RefType' => ['type' => 'varchar', 'constraint'=> 10, 'null' => true],
- 'VSet' => ['type' => 'int', 'null' => true],
+ 'DisciplineID' => ['type' => 'INT', 'null' => true],
+ 'DepartmentID' => ['type' => 'INT', 'null' => true],
+ 'ResultType' => ['type' => 'VARCHAR', 'constraint'=> 20, 'null' => true],
+ 'RefType' => ['type' => 'VARCHAR', 'constraint'=> 10, 'null' => true],
+ 'VSet' => ['type' => 'INT', 'null' => true],
'ReqQty' => ['type' => 'DECIMAL', 'constraint'=> '10,2', 'null' => true],
'ReqQtyUnit' => ['type' => 'varchar', 'constraint'=> 20, 'null' => true],
'Unit1' => ['type' => 'varchar', 'constraint'=> 20, 'null' => true],
@@ -53,7 +51,6 @@ class CreateTestsTable extends Migration {
$this->forge->addForeignKey('TestSiteID', 'testdefsite', 'TestSiteID', 'CASCADE', 'CASCADE');
$this->forge->createTable('testdeftech');
- // testdefcal - Calculation definition for CALC type
$this->forge->addField([
'TestCalID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
'TestSiteID' => ['type' => 'INT', 'unsigned' => true, 'null' => false],
@@ -74,7 +71,6 @@ class CreateTestsTable extends Migration {
$this->forge->addForeignKey('TestSiteID', 'testdefsite', 'TestSiteID', 'CASCADE', 'CASCADE');
$this->forge->createTable('testdefcal');
- // testdefgrp - Group definition for GROUP type
$this->forge->addField([
'TestGrpID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
'TestSiteID' => ['type' => 'INT', 'unsigned' => true, 'null' => false],
@@ -87,7 +83,6 @@ class CreateTestsTable extends Migration {
$this->forge->addForeignKey('Member', 'testdefsite', 'TestSiteID', 'CASCADE', 'CASCADE');
$this->forge->createTable('testdefgrp');
- // testmap - Test mapping for all types
$this->forge->addField([
'TestMapID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
'TestSiteID' => ['type' => 'INT', 'unsigned' => true, 'null' => false],
@@ -108,13 +103,70 @@ class CreateTestsTable extends Migration {
$this->forge->addKey('TestMapID', true);
$this->forge->addForeignKey('TestSiteID', 'testdefsite', 'TestSiteID', 'CASCADE', 'CASCADE');
$this->forge->createTable('testmap');
+
+ $this->forge->addField([
+ 'RefNumID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
+ 'SiteID' => ['type' => 'INT', 'null' => true],
+ 'TestSiteID' => ['type' => 'INT', 'null' => false],
+ 'SpcType' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'Sex' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'Criteria' => ['type' => 'varchar', 'constraint'=>100, 'null' => true],
+ 'AgeStart' => ['type' => 'INT', 'null' => true],
+ 'AgeEnd' => ['type' => 'int', 'null' => true],
+ 'NumRefType' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'RangeType' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'LowSign' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'Low' => ['type' => 'DECIMAL', 'constraint' => '10,2', 'null' => true],
+ 'HighSign' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'High' => ['type' => 'DECIMAL', 'constraint' => '10,2', 'null' => true],
+ 'Display' => ['type' => 'INT', 'null' => true],
+ 'Flag' => ['type' => 'varchar', 'constraint'=>10, 'null' => true],
+ 'Interpretation' => ['type' => 'varchar', 'constraint'=>255, 'null' => true],
+ 'Notes' => ['type' => 'varchar', 'constraint'=>255, 'null' => true],
+ 'CreateDate' => ['type' => 'Datetime', 'null' => true],
+ 'StartDate' => ['type' => 'Datetime', 'null' => true],
+ 'EndDate' => ['type' => 'Datetime', 'null' => true],
+ ]);
+ $this->forge->addKey('RefNumID', true);
+ $this->forge->createTable('refnum');
+
+ $this->forge->addField([
+ 'RefTxtID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
+ 'SiteID' => ['type' => 'INT', 'null' => true],
+ 'TestSiteID' => ['type' => 'INT', 'null' => false],
+ 'SpcType' => ['type' => 'varchar', 'constraint'=> 10, 'null' => false],
+ 'Sex' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'Criteria' => ['type' => 'varchar', 'constraint'=>100, 'null' => true],
+ 'AgeStart' => ['type' => 'INT', 'null' => true],
+ 'AgeEnd' => ['type' => 'int', 'null' => true],
+ 'TxtRefType' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
+ 'RefTxt' => ['type' => 'varchar', 'constraint'=>255, 'null' => true],
+ 'Flag' => ['type' => 'varchar', 'constraint'=>10, 'null' => true],
+ 'Notes' => ['type' => 'varchar', 'constraint'=>255, 'null' => true],
+ 'CreateDate' => ['type' => 'Datetime', 'null' => true],
+ 'StartDate' => ['type' => 'Datetime', 'null' => true],
+ 'EndDate' => ['type' => 'Datetime', 'null' => true],
+ ]);
+ $this->forge->addKey('RefTxtID', true);
+ $this->forge->createTable('reftxt');
+
+ $this->forge->addField([
+ 'FlagDefID' => ['type' => 'INT', 'auto_increment' => true],
+ 'InstrumentName' => ['type' => 'varchar', 'constraint' => 100, 'null' => true],
+ 'Flag' => ['type' => 'varchar', 'constraint' => 50, 'null' => true],
+ ]);
+ $this->forge->addKey('FlagDefID', true);
+ $this->forge->createTable('flagdef');
}
public function down() {
- $this->forge->dropTable('testdefsite');
- $this->forge->dropTable('testdeftech');
- $this->forge->dropTable('testdefcal');
- $this->forge->dropTable('testdefgrp');
+ $this->forge->dropTable('flagdef');
+ $this->forge->dropTable('reftxt');
+ $this->forge->dropTable('refnum');
$this->forge->dropTable('testmap');
+ $this->forge->dropTable('testdefgrp');
+ $this->forge->dropTable('testdefcal');
+ $this->forge->dropTable('testdeftech');
+ $this->forge->dropTable('testdefsite');
}
}
diff --git a/app/Database/Migrations/2025-12-11-100002_PatRes.php b/app/Database/Migrations/2026-01-01-000009_CreateResults.php
similarity index 76%
rename from app/Database/Migrations/2025-12-11-100002_PatRes.php
rename to app/Database/Migrations/2026-01-01-000009_CreateResults.php
index 728bfd0..79e0380 100644
--- a/app/Database/Migrations/2025-12-11-100002_PatRes.php
+++ b/app/Database/Migrations/2026-01-01-000009_CreateResults.php
@@ -4,7 +4,7 @@ namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
-class CreatePatresTables extends Migration {
+class CreateResults extends Migration {
public function up() {
$this->forge->addField([
'ResultID' => ['type' => 'INT', 'auto_increment' => true],
@@ -66,27 +66,11 @@ class CreatePatresTables extends Migration {
]);
$this->forge->addPrimaryKey('ResStatusID');
$this->forge->createTable('patrestatus');
-
- $this->forge->addField([
- 'FlagDefID' => ['type' => 'INT', 'auto_increment' => true],
- 'InstrumentName' => ['type' => 'varchar', 'constraint' => 100, 'null' => true],
- 'Flag' => ['type' => 'varchar', 'constraint' => 50, 'null' => true],
- 'FlagText' => ['type' => 'varchar', 'constraint' => 100, 'null' => true],
- 'FlagDesc' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
- 'OnScreen' => ['type' => 'int', 'null' => true],
- 'OnResult' => ['type' => 'int', 'null' => true],
- 'CreateDate' => ['type' => 'DATETIME', 'null' => true],
- 'EndDate' => ['type' => 'DATETIME', 'null' => true],
- ]);
- $this->forge->addPrimaryKey('FlagDefID');
- $this->forge->createTable('flagdef');
}
public function down() {
- $this->forge->dropTable('flagdef', true);
- $this->forge->dropTable('patrestatus', true);
- $this->forge->dropTable('patrestech', true);
- $this->forge->dropTable('patresflag', true);
- $this->forge->dropTable('patres', true);
+ $this->forge->dropTable('patrestatus');
+ $this->forge->dropTable('patresflag');
+ $this->forge->dropTable('patres');
}
-}
\ No newline at end of file
+}
diff --git a/app/Database/Migrations/2025-10-29-100201_Equipment.php b/app/Database/Migrations/2026-01-01-000010_CreateLabInfrastructure.php
similarity index 61%
rename from app/Database/Migrations/2025-10-29-100201_Equipment.php
rename to app/Database/Migrations/2026-01-01-000010_CreateLabInfrastructure.php
index 1ff7bd1..ba6b29d 100644
--- a/app/Database/Migrations/2025-10-29-100201_Equipment.php
+++ b/app/Database/Migrations/2026-01-01-000010_CreateLabInfrastructure.php
@@ -1,15 +1,29 @@
forge->addField([
+ 'WorkstationID' => ['type' => 'int', 'unsigned' => true, 'auto_increment'=> true],
+ 'DepartmentID' => ['type' => 'int', 'null'=> false],
+ 'WorkstationCode' => ['type' => 'varchar', 'constraint'=>10, 'null'=> false],
+ 'WorkstationName' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
+ 'Type' => ['type' => 'VARCHAR', 'constraint' => 10, 'null'=> true],
+ 'LinkTo' => ['type' => 'int', 'null'=> true],
+ 'Enable' => ['type' => 'VARCHAR', 'constraint' => 10, 'null'=> true],
+ 'CreateDate' => ['type'=>'DATETIME', 'null' => true],
+ 'EndDate' => ['type'=>'DATETIME', 'null' => true]
+ ]);
+ $this->forge->addKey('WorkstationID', true);
+ $this->forge->createTable('workstation');
- public function up() {
$this->forge->addField([
'EquipmentID' => ['type' => 'int', 'unsigned' => true, 'auto_increment'=> true],
'DepartmentID' => ['type' => 'int', 'constraint'=> 10, 'null'=> false],
- 'InstrumentID' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
+ 'InstrumentID' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
'InstrumentName' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
'Enable' => ['type' => 'bit', 'null'=> false],
'EquipmentRole' => ['type' => 'varchar', 'constraint' => 1, 'null'=> false],
@@ -24,7 +38,7 @@ class Equipment extends Migration {
'InstrumentID' => ['type' => 'int', 'null'=> false],
'SiteID' => ['type' => 'int', 'null'=> true],
'InterfaceName' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
- 'InterfaceDesc' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
+ 'InterfaceDesc' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
'Protocol' => ['type' => 'varchar', 'constraint'=> 50, 'null'=> true],
'IPAddress' => ['type' => 'varchar', 'constraint'=> 50, 'null'=> true],
'Port' => ['type' => 'varchar', 'constraint'=> 25, 'null'=> true],
@@ -55,11 +69,22 @@ class Equipment extends Migration {
$this->forge->addKey('EquipmentID', true);
$this->forge->createTable('devicelist');
- }
+ $this->forge->addField([
+ 'AreaGeoID' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
+ 'AreaCode' => ['type' => 'varchar', 'constraint' => 20, 'null' => true],
+ 'Class' => ['type' => 'int', 'null' => true],
+ 'AreaName' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => false],
+ 'Parent' => ['type' => 'int', 'null' => true],
+ ]);
+ $this->forge->addKey('AreaGeoID', true);
+ $this->forge->createTable('areageo');
+ }
public function down() {
- $this->forge->dropTable('equipmentlist', true);
- $this->forge->dropTable('comparameters', true);
- $this->forge->dropTable('devicelist', true);
+ $this->forge->dropTable('areageo');
+ $this->forge->dropTable('devicelist');
+ $this->forge->dropTable('comparameters');
+ $this->forge->dropTable('equipmentlist');
+ $this->forge->dropTable('workstation');
}
}
diff --git a/app/Database/Migrations/2026-01-12-000001_ValuesetVidToVvalue.php b/app/Database/Migrations/2026-01-12-000001_ValuesetVidToVvalue.php
deleted file mode 100644
index b9dae01..0000000
--- a/app/Database/Migrations/2026-01-12-000001_ValuesetVidToVvalue.php
+++ /dev/null
@@ -1,124 +0,0 @@
-forge->modifyColumn('patient', [
- 'Gender' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'Country' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'Race' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'Religion' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'Ethnic' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'MaritalStatus' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'DeathIndicator' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('testdefsite', [
- 'TestType' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => false],
- ]);
-
- $this->forge->modifyColumn('containerdef', [
- 'Additive' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'ConClass' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'Color' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('location', [
- 'LocType' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('workstation', [
- 'Type' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'Enable' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('site', [
- 'SiteTypeID' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'SiteClassID' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('account', [
- 'Country' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('refnum', [
- 'Sex' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'NumRefType' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'RangeType' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'LowSign' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'HighSign' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('reftxt', [
- 'Sex' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'TxtRefType' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('orderstatus', [
- 'OrderStatus' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => false],
- ]);
- }
-
- public function down()
- {
- $this->forge->modifyColumn('patient', [
- 'Gender' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'Country' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'Race' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'Religion' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'Ethnic' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'MaritalStatus' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
- 'DeathIndicator' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('testdefsite', [
- 'TestType' => ['type' => 'INT', 'null' => false],
- ]);
-
- $this->forge->modifyColumn('containerdef', [
- 'Additive' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'ConClass' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'Color' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('location', [
- 'LocType' => ['type' => 'INT', 'null' => true],
- ]);
-
- $this->forge->modifyColumn('workstation', [
- 'Type' => ['type' => 'TINYINT', 'null' => true],
- 'Enable' => ['type' => 'INT', 'null' => true],
- ]);
-
- $this->forge->modifyColumn('site', [
- 'SiteTypeID' => ['type' => 'INT', 'null' => true],
- 'SiteClassID' => ['type' => 'INT', 'null' => true],
- ]);
-
- $this->forge->modifyColumn('account', [
- 'Country' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('refnum', [
- 'Sex' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'NumRefType' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'RangeType' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'LowSign' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'HighSign' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('reftxt', [
- 'Sex' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- 'TxtRefType' => ['type' => 'INT', 'constraint' => 11, 'null' => true],
- ]);
-
- $this->forge->modifyColumn('orderstatus', [
- 'OrderStatus' => ['type' => 'INT', 'null' => false],
- ]);
- }
-}
diff --git a/app/Database/Migrations/2026-01-12-000002_RenamePatientGenderToSex.php b/app/Database/Migrations/2026-01-12-000002_RenamePatientGenderToSex.php
deleted file mode 100644
index ee32856..0000000
--- a/app/Database/Migrations/2026-01-12-000002_RenamePatientGenderToSex.php
+++ /dev/null
@@ -1,19 +0,0 @@
-forge->modifyColumn('patient', [
- 'Gender' => ['name' => 'Sex', 'type' => 'INT', 'constraint' => 11, 'null' => true],
- ]);
- }
-
- public function down() {
- $this->forge->modifyColumn('patient', [
- 'Sex' => ['name' => 'Gender', 'type' => 'INT', 'constraint' => 11, 'null' => true],
- ]);
- }
-}
diff --git a/app/Database/Seeds/ValueSetCountrySeeder.php b/app/Database/Seeds/ValueSetCountrySeeder.php
deleted file mode 100644
index 21c7116..0000000
--- a/app/Database/Seeds/ValueSetCountrySeeder.php
+++ /dev/null
@@ -1,264 +0,0 @@
- 33, 'VOrder' => 1, 'VValue' => 'AFG', 'VDesc' => "Afghanistan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 2, 'VValue' => 'ALA', 'VDesc' => "Åland Islands", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 3, 'VValue' => 'ALB', 'VDesc' => "Albania", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 4, 'VValue' => 'DZA', 'VDesc' => "Algeria", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 5, 'VValue' => 'ASM', 'VDesc' => "American Samoa", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 6, 'VValue' => 'AND', 'VDesc' => "Andorra", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 7, 'VValue' => 'AGO', 'VDesc' => "Angola", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 8, 'VValue' => 'AIA', 'VDesc' => "Anguilla", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 9, 'VValue' => 'ATA', 'VDesc' => "Antarctica", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 10, 'VValue' => 'ATG', 'VDesc' => "Antigua and Barbuda", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 11, 'VValue' => 'ARG', 'VDesc' => "Argentina", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 12, 'VValue' => 'ARM', 'VDesc' => "Armenia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 13, 'VValue' => 'ABW', 'VDesc' => "Aruba", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 14, 'VValue' => 'AUS', 'VDesc' => "Australia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 15, 'VValue' => 'AUT', 'VDesc' => "Austria", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 16, 'VValue' => 'AZE', 'VDesc' => "Azerbaijan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 17, 'VValue' => 'BHS', 'VDesc' => "Bahamas", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 18, 'VValue' => 'BHR', 'VDesc' => "Bahrain", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 19, 'VValue' => 'BGD', 'VDesc' => "Bangladesh", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 20, 'VValue' => 'BRB', 'VDesc' => "Barbados", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 21, 'VValue' => 'BLR', 'VDesc' => "Belarus", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 22, 'VValue' => 'BEL', 'VDesc' => "Belgium", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 23, 'VValue' => 'BLZ', 'VDesc' => "Belize", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 24, 'VValue' => 'BEN', 'VDesc' => "Benin", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 25, 'VValue' => 'BMU', 'VDesc' => "Bermuda", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 26, 'VValue' => 'BTN', 'VDesc' => "Bhutan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 27, 'VValue' => 'BOL', 'VDesc' => "Bolivia, Plurinational State of", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 28, 'VValue' => 'BES', 'VDesc' => "Bonaire, Sint Eustatius and Saba[d]", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 29, 'VValue' => 'BIH', 'VDesc' => "Bosnia and Herzegovina", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 30, 'VValue' => 'BWA', 'VDesc' => "Botswana", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 31, 'VValue' => 'BVT', 'VDesc' => "Bouvet Island", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 32, 'VValue' => 'BRA', 'VDesc' => "Brazil", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 33, 'VValue' => 'IOT', 'VDesc' => "British Indian Ocean Territory", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 34, 'VValue' => 'BRN', 'VDesc' => "Brunei Darussalam", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 35, 'VValue' => 'BGR', 'VDesc' => "Bulgaria", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 36, 'VValue' => 'BFA', 'VDesc' => "Burkina Faso", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 37, 'VValue' => 'BDI', 'VDesc' => "Burundi", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 38, 'VValue' => 'CPV', 'VDesc' => "Cabo Verde", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 39, 'VValue' => 'KHM', 'VDesc' => "Cambodia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 40, 'VValue' => 'CMR', 'VDesc' => "Cameroon", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 41, 'VValue' => 'CAN', 'VDesc' => "Canada", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 42, 'VValue' => 'CYM', 'VDesc' => "Cayman Islands", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 43, 'VValue' => 'CAF', 'VDesc' => "Central African Republic", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 44, 'VValue' => 'TCD', 'VDesc' => "Chad", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 45, 'VValue' => 'CHL', 'VDesc' => "Chile", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 46, 'VValue' => 'CHN', 'VDesc' => "China[c]", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 47, 'VValue' => 'CXR', 'VDesc' => "Christmas Island", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 48, 'VValue' => 'CCK', 'VDesc' => "Cocos (Keeling) Islands", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 49, 'VValue' => 'COL', 'VDesc' => "Colombia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 50, 'VValue' => 'COM', 'VDesc' => "Comoros", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 51, 'VValue' => 'COG', 'VDesc' => "Congo", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 52, 'VValue' => 'COD', 'VDesc' => "Congo, Democratic Republic of the", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 53, 'VValue' => 'COK', 'VDesc' => "Cook Islands", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 54, 'VValue' => 'CRI', 'VDesc' => "Costa Rica", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 55, 'VValue' => 'CIV', 'VDesc' => "Côte d'Ivoire", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 56, 'VValue' => 'HRV', 'VDesc' => "Croatia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 57, 'VValue' => 'CUB', 'VDesc' => "Cuba", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 58, 'VValue' => 'CUW', 'VDesc' => "Curaçao", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 59, 'VValue' => 'CYP', 'VDesc' => "Cyprus[c]", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 60, 'VValue' => 'CZE', 'VDesc' => "Czechia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 61, 'VValue' => 'DNK', 'VDesc' => "Denmark", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 62, 'VValue' => 'DJI', 'VDesc' => "Djibouti", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 63, 'VValue' => 'DMA', 'VDesc' => "Dominica", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 64, 'VValue' => 'DOM', 'VDesc' => "Dominican Republic", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 65, 'VValue' => 'ECU', 'VDesc' => "Ecuador", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 66, 'VValue' => 'EGY', 'VDesc' => "Egypt", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 67, 'VValue' => 'SLV', 'VDesc' => "El Salvador", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 68, 'VValue' => 'GNQ', 'VDesc' => "Equatorial Guinea", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 69, 'VValue' => 'ERI', 'VDesc' => "Eritrea", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 70, 'VValue' => 'EST', 'VDesc' => "Estonia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 71, 'VValue' => 'SWZ', 'VDesc' => "Eswatini", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 72, 'VValue' => 'ETH', 'VDesc' => "Ethiopia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 73, 'VValue' => 'FLK', 'VDesc' => "Falkland Islands (Malvinas)[c]", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 74, 'VValue' => 'FRO', 'VDesc' => "Faroe Islands", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 75, 'VValue' => 'FJI', 'VDesc' => "Fiji", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 76, 'VValue' => 'FIN', 'VDesc' => "Finland", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 77, 'VValue' => 'FRA', 'VDesc' => "France", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 78, 'VValue' => 'GUF', 'VDesc' => "French Guiana", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 79, 'VValue' => 'PYF', 'VDesc' => "French Polynesia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 80, 'VValue' => 'ATF', 'VDesc' => "French Southern Territories", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 81, 'VValue' => 'GAB', 'VDesc' => "Gabon", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 82, 'VValue' => 'GMB', 'VDesc' => "Gambia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 83, 'VValue' => 'GEO', 'VDesc' => "Georgia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 84, 'VValue' => 'DEU', 'VDesc' => "Germany", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 85, 'VValue' => 'GHA', 'VDesc' => "Ghana", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 86, 'VValue' => 'GIB', 'VDesc' => "Gibraltar", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 87, 'VValue' => 'GRC', 'VDesc' => "Greece", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 88, 'VValue' => 'GRL', 'VDesc' => "Greenland", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 89, 'VValue' => 'GRD', 'VDesc' => "Grenada", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 90, 'VValue' => 'GLP', 'VDesc' => "Guadeloupe", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 91, 'VValue' => 'GUM', 'VDesc' => "Guam", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 92, 'VValue' => 'GTM', 'VDesc' => "Guatemala", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 93, 'VValue' => 'GGY', 'VDesc' => "Guernsey", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 94, 'VValue' => 'GIN', 'VDesc' => "Guinea", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 95, 'VValue' => 'GNB', 'VDesc' => "Guinea-Bissau", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 96, 'VValue' => 'GUY', 'VDesc' => "Guyana", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 97, 'VValue' => 'HTI', 'VDesc' => "Haiti", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 98, 'VValue' => 'HMD', 'VDesc' => "Heard Island and McDonald Islands", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 99, 'VValue' => 'VAT', 'VDesc' => "Holy See", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 100, 'VValue' => 'HND', 'VDesc' => "Honduras", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 101, 'VValue' => 'HKG', 'VDesc' => "Hong Kong", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 102, 'VValue' => 'HUN', 'VDesc' => "Hungary", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 103, 'VValue' => 'ISL', 'VDesc' => "Iceland", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 104, 'VValue' => 'IND', 'VDesc' => "India", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 105, 'VValue' => 'IDN', 'VDesc' => "Indonesia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 106, 'VValue' => 'IRN', 'VDesc' => "Iran, Islamic Republic of", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 107, 'VValue' => 'IRQ', 'VDesc' => "Iraq", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 108, 'VValue' => 'IRL', 'VDesc' => "Ireland", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 109, 'VValue' => 'IMN', 'VDesc' => "Isle of Man", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 110, 'VValue' => 'ISR', 'VDesc' => "Israel", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 111, 'VValue' => 'ITA', 'VDesc' => "Italy", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 112, 'VValue' => 'JAM', 'VDesc' => "Jamaica", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 113, 'VValue' => 'JPN', 'VDesc' => "Japan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 114, 'VValue' => 'JEY', 'VDesc' => "Jersey", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 115, 'VValue' => 'JOR', 'VDesc' => "Jordan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 116, 'VValue' => 'KAZ', 'VDesc' => "Kazakhstan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 117, 'VValue' => 'KEN', 'VDesc' => "Kenya", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 118, 'VValue' => 'KIR', 'VDesc' => "Kiribati", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 119, 'VValue' => 'PRK', 'VDesc' => "Korea, Democratic People's Republic of", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 120, 'VValue' => 'KOR', 'VDesc' => "Korea, Republic of", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 121, 'VValue' => 'KWT', 'VDesc' => "Kuwait", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 122, 'VValue' => 'KGZ', 'VDesc' => "Kyrgyzstan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 123, 'VValue' => 'LAO', 'VDesc' => "Lao People's Democratic Republic", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 124, 'VValue' => 'LVA', 'VDesc' => "Latvia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 125, 'VValue' => 'LBN', 'VDesc' => "Lebanon", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 126, 'VValue' => 'LSO', 'VDesc' => "Lesotho", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 127, 'VValue' => 'LBR', 'VDesc' => "Liberia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 128, 'VValue' => 'LBY', 'VDesc' => "Libya", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 129, 'VValue' => 'LIE', 'VDesc' => "Liechtenstein", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 130, 'VValue' => 'LTU', 'VDesc' => "Lithuania", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 131, 'VValue' => 'LUX', 'VDesc' => "Luxembourg", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 132, 'VValue' => 'MAC', 'VDesc' => "Macao", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 133, 'VValue' => 'MDG', 'VDesc' => "Madagascar", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 134, 'VValue' => 'MWI', 'VDesc' => "Malawi", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 135, 'VValue' => 'MYS', 'VDesc' => "Malaysia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 136, 'VValue' => 'MDV', 'VDesc' => "Maldives", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 137, 'VValue' => 'MLI', 'VDesc' => "Mali", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 138, 'VValue' => 'MLT', 'VDesc' => "Malta", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 139, 'VValue' => 'MHL', 'VDesc' => "Marshall Islands", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 140, 'VValue' => 'MTQ', 'VDesc' => "Martinique", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 141, 'VValue' => 'MRT', 'VDesc' => "Mauritania", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 142, 'VValue' => 'MUS', 'VDesc' => "Mauritius", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 143, 'VValue' => 'MYT', 'VDesc' => "Mayotte", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 144, 'VValue' => 'MEX', 'VDesc' => "Mexico", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 145, 'VValue' => 'FSM', 'VDesc' => "Micronesia, Federated States of", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 146, 'VValue' => 'MDA', 'VDesc' => "Moldova, Republic of", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 147, 'VValue' => 'MCO', 'VDesc' => "Monaco", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 148, 'VValue' => 'MNG', 'VDesc' => "Mongolia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 149, 'VValue' => 'MNE', 'VDesc' => "Montenegro", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 150, 'VValue' => 'MSR', 'VDesc' => "Montserrat", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 151, 'VValue' => 'MAR', 'VDesc' => "Morocco", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 152, 'VValue' => 'MOZ', 'VDesc' => "Mozambique", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 153, 'VValue' => 'MMR', 'VDesc' => "Myanmar", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 154, 'VValue' => 'NAM', 'VDesc' => "Namibia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 155, 'VValue' => 'NRU', 'VDesc' => "Nauru", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 156, 'VValue' => 'NPL', 'VDesc' => "Nepal", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 157, 'VValue' => 'NLD', 'VDesc' => "Netherlands, Kingdom of the", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 158, 'VValue' => 'NCL', 'VDesc' => "New Caledonia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 159, 'VValue' => 'NZL', 'VDesc' => "New Zealand", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 160, 'VValue' => 'NIC', 'VDesc' => "Nicaragua", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 161, 'VValue' => 'NER', 'VDesc' => "Niger", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 162, 'VValue' => 'NGA', 'VDesc' => "Nigeria", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 163, 'VValue' => 'NIU', 'VDesc' => "Niue", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 164, 'VValue' => 'NFK', 'VDesc' => "Norfolk Island", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 165, 'VValue' => 'MKD', 'VDesc' => "North Macedonia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 166, 'VValue' => 'MNP', 'VDesc' => "Northern Mariana Islands", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 167, 'VValue' => 'NOR', 'VDesc' => "Norway", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 168, 'VValue' => 'OMN', 'VDesc' => "Oman", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 169, 'VValue' => 'PAK', 'VDesc' => "Pakistan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 170, 'VValue' => 'PLW', 'VDesc' => "Palau", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 171, 'VValue' => 'PSE', 'VDesc' => "Palestine, State of[c]", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 172, 'VValue' => 'PAN', 'VDesc' => "Panama", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 173, 'VValue' => 'PNG', 'VDesc' => "Papua New Guinea", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 174, 'VValue' => 'PRY', 'VDesc' => "Paraguay", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 175, 'VValue' => 'PER', 'VDesc' => "Peru", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 176, 'VValue' => 'PHL', 'VDesc' => "Philippines", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 177, 'VValue' => 'PCN', 'VDesc' => "Pitcairn", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 178, 'VValue' => 'POL', 'VDesc' => "Poland", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 179, 'VValue' => 'PRT', 'VDesc' => "Portugal", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 180, 'VValue' => 'PRI', 'VDesc' => "Puerto Rico", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 181, 'VValue' => 'QAT', 'VDesc' => "Qatar", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 182, 'VValue' => 'REU', 'VDesc' => "Réunion", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 183, 'VValue' => 'ROU', 'VDesc' => "Romania", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 184, 'VValue' => 'RUS', 'VDesc' => "Russian Federation", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 185, 'VValue' => 'RWA', 'VDesc' => "Rwanda", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 186, 'VValue' => 'BLM', 'VDesc' => "Saint Barthélemy", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 187, 'VValue' => 'SHN', 'VDesc' => "Saint Helena, Ascension and Tristan da Cunha[e]", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 188, 'VValue' => 'KNA', 'VDesc' => "Saint Kitts and Nevis", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 189, 'VValue' => 'LCA', 'VDesc' => "Saint Lucia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 190, 'VValue' => 'MAF', 'VDesc' => "Saint Martin (French part)", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 191, 'VValue' => 'SPM', 'VDesc' => "Saint Pierre and Miquelon", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 192, 'VValue' => 'VCT', 'VDesc' => "Saint Vincent and the Grenadines", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 193, 'VValue' => 'WSM', 'VDesc' => "Samoa", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 194, 'VValue' => 'SMR', 'VDesc' => "San Marino", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 195, 'VValue' => 'STP', 'VDesc' => "Sao Tome and Principe", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 196, 'VValue' => 'SAU', 'VDesc' => "Saudi Arabia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 197, 'VValue' => 'SEN', 'VDesc' => "Senegal", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 198, 'VValue' => 'SRB', 'VDesc' => "Serbia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 199, 'VValue' => 'SYC', 'VDesc' => "Seychelles", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 200, 'VValue' => 'SLE', 'VDesc' => "Sierra Leone", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 201, 'VValue' => 'SGP', 'VDesc' => "Singapore", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 202, 'VValue' => 'SXM', 'VDesc' => "Sint Maarten (Dutch part)", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 203, 'VValue' => 'SVK', 'VDesc' => "Slovakia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 204, 'VValue' => 'SVN', 'VDesc' => "Slovenia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 205, 'VValue' => 'SLB', 'VDesc' => "Solomon Islands", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 206, 'VValue' => 'SOM', 'VDesc' => "Somalia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 207, 'VValue' => 'ZAF', 'VDesc' => "South Africa", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 208, 'VValue' => 'SGS', 'VDesc' => "South Georgia and the South Sandwich Islands", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 209, 'VValue' => 'SSD', 'VDesc' => "South Sudan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 210, 'VValue' => 'ESP', 'VDesc' => "Spain", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 211, 'VValue' => 'LKA', 'VDesc' => "Sri Lanka", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 212, 'VValue' => 'SDN', 'VDesc' => "Sudan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 213, 'VValue' => 'SUR', 'VDesc' => "Suriname", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 214, 'VValue' => 'SJM', 'VDesc' => "Svalbard and Jan Mayen[f]", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 215, 'VValue' => 'SWE', 'VDesc' => "Sweden", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 216, 'VValue' => 'CHE', 'VDesc' => "Switzerland", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 217, 'VValue' => 'SYR', 'VDesc' => "Syrian Arab Republic", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 218, 'VValue' => 'TWN', 'VDesc' => "Taiwan, Province of China[c]", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 219, 'VValue' => 'TJK', 'VDesc' => "Tajikistan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 220, 'VValue' => 'TZA', 'VDesc' => "Tanzania, United Republic of", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 221, 'VValue' => 'THA', 'VDesc' => "Thailand", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 222, 'VValue' => 'TLS', 'VDesc' => "Timor-Leste", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 223, 'VValue' => 'TGO', 'VDesc' => "Togo", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 224, 'VValue' => 'TKL', 'VDesc' => "Tokelau", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 225, 'VValue' => 'TON', 'VDesc' => "Tonga", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 226, 'VValue' => 'TTO', 'VDesc' => "Trinidad and Tobago", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 227, 'VValue' => 'TUN', 'VDesc' => "Tunisia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 228, 'VValue' => 'TUR', 'VDesc' => "Türkiye", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 229, 'VValue' => 'TKM', 'VDesc' => "Turkmenistan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 230, 'VValue' => 'TCA', 'VDesc' => "Turks and Caicos Islands", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 231, 'VValue' => 'TUV', 'VDesc' => "Tuvalu", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 232, 'VValue' => 'UGA', 'VDesc' => "Uganda", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 233, 'VValue' => 'UKR', 'VDesc' => "Ukraine", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 234, 'VValue' => 'ARE', 'VDesc' => "United Arab Emirates", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 235, 'VValue' => 'GBR', 'VDesc' => "United Kingdom of Great Britain and Northern Ireland", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 236, 'VValue' => 'USA', 'VDesc' => "United States of America", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 237, 'VValue' => 'UMI', 'VDesc' => "United States Minor Outlying Islands[g]", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 238, 'VValue' => 'URY', 'VDesc' => "Uruguay", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 239, 'VValue' => 'UZB', 'VDesc' => "Uzbekistan", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 240, 'VValue' => 'VUT', 'VDesc' => "Vanuatu", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 241, 'VValue' => 'VEN', 'VDesc' => "Venezuela, Bolivarian Republic of", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 242, 'VValue' => 'VNM', 'VDesc' => "Viet Nam", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 243, 'VValue' => 'VGB', 'VDesc' => "Virgin Islands (British)", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 244, 'VValue' => 'VIR', 'VDesc' => "Virgin Islands (U.S.)", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 245, 'VValue' => 'WLF', 'VDesc' => "Wallis and Futuna", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 246, 'VValue' => 'ESH', 'VDesc' => "Western Sahara[c]", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 247, 'VValue' => 'YEM', 'VDesc' => "Yemen", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 248, 'VValue' => 'ZMB', 'VDesc' => "Zambia", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VSetID' => 33, 'VOrder' => 249, 'VValue' => 'ZWE', 'VDesc' => "Zimbabwe", 'VCategory' => '1', 'CreateDate' => "$now"]
- ];
- $this->db->table('valueset')->insertBatch($data);
-
- }
-}
\ No newline at end of file
diff --git a/app/Database/Seeds/ValueSetSeeder.php b/app/Database/Seeds/ValueSetSeeder.php
deleted file mode 100644
index 548cb77..0000000
--- a/app/Database/Seeds/ValueSetSeeder.php
+++ /dev/null
@@ -1,383 +0,0 @@
- 1, 'VSetID' => 42,'VOrder' => 1, 'VValue' =>'0', 'VDesc' => "System", 'VCategory' => '1', 'CreateDate' => "$now"],
- ['VID'=> 2, 'VSetID' => 42,'VOrder' => 2, 'VValue' =>'1', 'VDesc' => "User-defined", 'VCategory' => '1', 'CreateDate' => "$now"]
- ];
- $this->db->table('valueset')->insertBatch($data);
-
- $data = [
- ['VSetID' => 1,'VOrder' => 1, 'VValue' =>'0', 'VDesc' => "Primary", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 1,'VOrder' => 2, 'VValue' =>'1', 'VDesc' => "Secondary", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 2,'VOrder' => 1, 'VValue' =>'0', 'VDesc' => "Disabled", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 2,'VOrder' => 2, 'VValue' =>'1', 'VDesc' => "Enabled", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 3,'VOrder' => 1, 'VValue' =>'1', 'VDesc' => "Female", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 3,'VOrder' => 2, 'VValue' =>'2', 'VDesc' => "Male", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 3,'VOrder' => 3, 'VValue' =>'3', 'VDesc' => "Unknown", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 4,'VOrder' => 1, 'VValue' =>'A', 'VDesc' => "Separated", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 4,'VOrder' => 2, 'VValue' =>'D', 'VDesc' => "Divorced", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 4,'VOrder' => 3, 'VValue' =>'M', 'VDesc' => "Married", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 4,'VOrder' => 4, 'VValue' =>'S', 'VDesc' => "Single", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 4,'VOrder' => 5, 'VValue' =>'W', 'VDesc' => "Widowed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 4,'VOrder' => 6, 'VValue' =>'B', 'VDesc' => "Unmarried", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 4,'VOrder' => 7, 'VValue' =>'U', 'VDesc' => "Unknown", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 4,'VOrder' => 8, 'VValue' =>'O', 'VDesc' => "Other", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 5,'VOrder' => 1, 'VValue' =>'Y', 'VDesc' => "Death", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 5,'VOrder' => 2, 'VValue' =>'N', 'VDesc' => "Life", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 6,'VOrder' => 1, 'VValue' =>'KTP', 'VDesc' => "Kartu Tanda Penduduk", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 6,'VOrder' => 2, 'VValue' =>'PASS', 'VDesc' => "Passport", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 6,'VOrder' => 3, 'VValue' =>'SSN', 'VDesc' => "Social Security Number", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 6,'VOrder' => 4, 'VValue' =>'SIM', 'VDesc' => "Surat Izin Mengemudi", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 6,'VOrder' => 5, 'VValue' =>'KTAS', 'VDesc' => "Kartu Izin Tinggal Terbatas", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 7,'VOrder' => 1, 'VValue' =>'Create', 'VDesc' => "create record", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 7,'VOrder' => 2, 'VValue' =>'Read', 'VDesc' => "read record/field", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 7,'VOrder' => 3, 'VValue' =>'Update', 'VDesc' => "update record/field", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 7,'VOrder' => 4, 'VValue' =>'Delete', 'VDesc' => "delete record/field", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 8,'VOrder' => 1, 'VValue' =>'WDID', 'VDesc' => "Windows Device ID", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 8,'VOrder' => 2, 'VValue' =>'AAID', 'VDesc' => "Android AAID", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 8,'VOrder' => 3, 'VValue' =>'IDFA', 'VDesc' => "IOS IDFA", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 9,'VOrder' => 1, 'VValue' =>'PAT', 'VDesc' => "Patient", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 9,'VOrder' => 2, 'VValue' =>'ISN', 'VDesc' => "Insurance", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 9,'VOrder' => 3, 'VValue' =>'ACC', 'VDesc' => "Account", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 9,'VOrder' => 4, 'VValue' =>'DOC', 'VDesc' => "Doctor", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 10,'VOrder' => 1, 'VValue' =>'S', 'VDesc' => "Stat", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 10,'VOrder' => 2, 'VValue' =>'A', 'VDesc' => "ASAP", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 10,'VOrder' => 3, 'VValue' =>'R', 'VDesc' => "Routine", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 10,'VOrder' => 4, 'VValue' =>'P', 'VDesc' => "Preop", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 10,'VOrder' => 5, 'VValue' =>'C', 'VDesc' => "Callback", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 10,'VOrder' => 6, 'VValue' =>'T', 'VDesc' => "Timing critical", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 10,'VOrder' => 7, 'VValue' =>'PRN', 'VDesc' => "As needed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 11,'VOrder' => 1, 'VValue' =>'A', 'VDesc' => "Some, not all results available", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 11,'VOrder' => 2, 'VValue' =>'CA', 'VDesc' => "Order is cancelled", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 11,'VOrder' => 3, 'VValue' =>'CM', 'VDesc' => "Order is completed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 11,'VOrder' => 4, 'VValue' =>'DC', 'VDesc' => "Order was discontinued", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 11,'VOrder' => 5, 'VValue' =>'ER', 'VDesc' => "Error, order not found", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 11,'VOrder' => 6, 'VValue' =>'HD', 'VDesc' => "Order “on hold”", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 11,'VOrder' => 7, 'VValue' =>'IP', 'VDesc' => "In process, unspecified", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 11,'VOrder' => 8, 'VValue' =>'RP', 'VDesc' => "Order has been replaced", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 11,'VOrder' => 9, 'VValue' =>'SC', 'VDesc' => "In process, scheduled", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 11,'VOrder' => 10, 'VValue' =>'CL', 'VDesc' => "Closed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 11,'VOrder' => 11, 'VValue' =>'AC', 'VDesc' => "Archived", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 11,'VOrder' => 12, 'VValue' =>'DL', 'VDesc' => "Deleted", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 12,'VOrder' => 1, 'VValue' =>'FCLT', 'VDesc' => "Facility. Organisasi atau lembaga tempat layanan disediakan, atau gedung tertentu dalam organisasi", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 12,'VOrder' => 2, 'VValue' =>'BLDG', 'VDesc' => "Building. Gedung", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 12,'VOrder' => 3, 'VValue' =>'FLOR', 'VDesc' => "Floor. Lantai dari gedung", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 12,'VOrder' => 4, 'VValue' =>'POC', 'VDesc' => "Point of Care", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 12,'VOrder' => 5, 'VValue' =>'ROOM', 'VDesc' => "Room. Ruangan dalam Gedung-lantai", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 12,'VOrder' => 6, 'VValue' =>'BED', 'VDesc' => "Bed. Tempat tidur pasien", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 12,'VOrder' => 7, 'VValue' =>'MOBL', 'VDesc' => "Mobile. Lokasi bergerak, ditandai dengan koordinat GPS, lokasi sementara, atau deskripsi lokasi unit bergerak saat ini.", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 12,'VOrder' => 8, 'VValue' =>'REMT', 'VDesc' => "Remote. Lokasi di luar lokasi utama", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 1, 'VValue' =>'Hep', 'VDesc' => "Heparin ammonium", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 2, 'VValue' =>'Apro', 'VDesc' => "Aprotinin (substance)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 3, 'VValue' =>'HepCa', 'VDesc' => "Heparin calcium", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 4, 'VValue' =>'H3BO3', 'VDesc' => "Boric acid", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 5, 'VValue' =>'CaOxa', 'VDesc' => "Calcium oxalate", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 6, 'VValue' =>'EDTA', 'VDesc' => "EDTA", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 7, 'VValue' =>'Ede', 'VDesc' => "Edetate (substance)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 8, 'VValue' =>'HCl', 'VDesc' => "Hydrochloric acid", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 9, 'VValue' =>'Hrdn', 'VDesc' => "Hirudin (substance)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 10, 'VValue' =>'EdeK', 'VDesc' => "Edetate dipotassium", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 11, 'VValue' =>'EdeTri', 'VDesc' => "Tripotassium edetate", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 12, 'VValue' =>'LiHep', 'VDesc' => "Heparin lithium (substance)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 13, 'VValue' =>'EdeNa', 'VDesc' => "Edetate disodium (substance)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 14, 'VValue' =>'NaCtrt', 'VDesc' => "Sodium citrate (substance)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 15, 'VValue' =>'NaHep', 'VDesc' => "Heparin sodium", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 16, 'VValue' =>'NaF', 'VDesc' => "Sodium fluoride", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 17, 'VValue' =>'Borax', 'VDesc' => "Sodium tetraborate", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 18, 'VValue' =>'Mntl', 'VDesc' => "Mannitol (substance)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 13,'VOrder' => 19, 'VValue' =>'NaFrm', 'VDesc' => "Sodium formate", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 14,'VOrder' => 1, 'VValue' =>'Pri', 'VDesc' => "primary, kontak langsung dengan spesimen", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 14,'VOrder' => 2, 'VValue' =>'Sec', 'VDesc' => "secondary, wadah primary container", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 14,'VOrder' => 3, 'VValue' =>'Ter', 'VDesc' => "tertiary, wadah secondary container.", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 1, 'VValue' =>'BLD', 'VDesc' => "Whole blood", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 2, 'VValue' =>'BLDA', 'VDesc' => "Blood arterial", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 3, 'VValue' =>'BLDCO', 'VDesc' => "Cord blood", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 4, 'VValue' =>'FBLOOD', 'VDesc' => "Blood, Fetal", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 5, 'VValue' =>'CSF', 'VDesc' => "Cerebral spinal fluid", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 6, 'VValue' =>'WB', 'VDesc' => "Blood, Whole", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 7, 'VValue' =>'BBL', 'VDesc' => "Blood bag", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 8, 'VValue' =>'SER', 'VDesc' => "Serum", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 9, 'VValue' =>'PLAS', 'VDesc' => "Plasma", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 10, 'VValue' =>'PLB', 'VDesc' => "Plasma bag", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 11, 'VValue' =>'MUCOS', 'VDesc' => "Mucosa", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 12, 'VValue' =>'MUCUS', 'VDesc' => "Mucus", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 13, 'VValue' =>'UR', 'VDesc' => "Urine", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 14, 'VValue' =>'RANDU', 'VDesc' => "Urine, Random", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 15,'VOrder' => 15, 'VValue' =>'URINM', 'VDesc' => "Urine, Midstream", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 16,'VOrder' => 1, 'VValue' =>'L', 'VDesc' => "Liter", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 16,'VOrder' => 2, 'VValue' =>'mL', 'VDesc' => "Mili Liter", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 16,'VOrder' => 3, 'VValue' =>'mL', 'VDesc' => "Micro Liter", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 16,'VOrder' => 4, 'VValue' =>'Pcs', 'VDesc' => "Pieces", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 17,'VOrder' => 1, 'VValue' =>'order', 'VDesc' => "Generate by order", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 17,'VOrder' => 2, 'VValue' =>'user', 'VDesc' => "Generate by user", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 18,'VOrder' => 1, 'VValue' =>'SColl', 'VDesc' => "Collection", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 18,'VOrder' => 2, 'VValue' =>'STran', 'VDesc' => "Transport", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 18,'VOrder' => 3, 'VValue' =>'SRec', 'VDesc' => "Reception", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 18,'VOrder' => 4, 'VValue' =>'SPrep', 'VDesc' => "Preparation", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 18,'VOrder' => 5, 'VValue' =>'SAlqt', 'VDesc' => "Aliquot", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 18,'VOrder' => 6, 'VValue' =>'SDisp', 'VDesc' => "Dispatching", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 18,'VOrder' => 7, 'VValue' =>'SDest', 'VDesc' => "Destruction", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 19,'VOrder' => 1, 'VValue' =>'0', 'VDesc' => "Failed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 19,'VOrder' => 2, 'VValue' =>'1', 'VDesc' => "Success with note", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 19,'VOrder' => 3, 'VValue' =>'2', 'VDesc' => "Success", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 1, 'VValue' =>'STC', 'VDesc' => "To be collected", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 2, 'VValue' =>'SCFld', 'VDesc' => "Collection failed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 3, 'VValue' =>'SCtd', 'VDesc' => "Collected", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 4, 'VValue' =>'STran', 'VDesc' => "In-transport", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 5, 'VValue' =>'STFld', 'VDesc' => "Transport failed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 6, 'VValue' =>'SArrv', 'VDesc' => "Arrived", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 7, 'VValue' =>'SRejc', 'VDesc' => "Rejected", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 8, 'VValue' =>'SRcvd', 'VDesc' => "Received", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 9, 'VValue' =>'SPAna', 'VDesc' => "Pre-analytical", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 10, 'VValue' =>'SPAF', 'VDesc' => "Pre-analytical failed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 11, 'VValue' =>'STA', 'VDesc' => "To be analyze", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 12, 'VValue' =>'SAFld', 'VDesc' => "Analytical failed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 13, 'VValue' =>'SAna', 'VDesc' => "Analytical", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 14, 'VValue' =>'STS', 'VDesc' => "To be stored", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 15, 'VValue' =>'SSFld', 'VDesc' => "Store failed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 16, 'VValue' =>'SStrd', 'VDesc' => "Stored", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 17, 'VValue' =>'SExp', 'VDesc' => "Expired", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 18, 'VValue' =>'STD', 'VDesc' => "To be destroyed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 19, 'VValue' =>'SDFld', 'VDesc' => "Failed to destroy", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 20,'VOrder' => 20, 'VValue' =>'SDstd', 'VDesc' => "Destroyed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 21,'VOrder' => 1, 'VValue' =>'HEM', 'VDesc' => "Hemolyzed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 21,'VOrder' => 2, 'VValue' =>'ITC', 'VDesc' => "Icteric", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 21,'VOrder' => 3, 'VValue' =>'LIP', 'VDesc' => "Lipemic", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 21,'VOrder' => 4, 'VValue' =>'CFU', 'VDesc' => "Centrifuged", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 21,'VOrder' => 5, 'VValue' =>'ROOM', 'VDesc' => "Room temperature", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 21,'VOrder' => 6, 'VValue' =>'COOL', 'VDesc' => "Cool", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 21,'VOrder' => 7, 'VValue' =>'FROZ', 'VDesc' => "Frozen", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 21,'VOrder' => 8, 'VValue' =>'CLOT', 'VDesc' => "Clotted", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 21,'VOrder' => 9, 'VValue' =>'AUT', 'VDesc' => "Autolyzed", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 21,'VOrder' => 10, 'VValue' =>'CON', 'VDesc' => "Contaminated", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 21,'VOrder' => 11, 'VValue' =>'LIVE', 'VDesc' => "Live", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 22,'VOrder' => 1, 'VValue' =>'P', 'VDesc' => "Patient", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 22,'VOrder' => 2, 'VValue' =>'B', 'VDesc' => "Blind Sample", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 22,'VOrder' => 3, 'VValue' =>'Q', 'VDesc' => "Control specimen", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 22,'VOrder' => 4, 'VValue' =>'E', 'VDesc' => "Electronic QC. Used with manufactured reference providing signals that simulate QC results", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 22,'VOrder' => 5, 'VValue' =>'F', 'VDesc' => "Filler Organization Proficiency. Specimen used for testing proficiency of the organization performing the testing (Filler) à PME", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 22,'VOrder' => 6, 'VValue' =>'O', 'VDesc' => "Operator Proficiency. Specimen used for testing Operator Proficiency.", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 22,'VOrder' => 7, 'VValue' =>'C', 'VDesc' => "Calibrator", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 22,'VOrder' => 8, 'VValue' =>'R', 'VDesc' => "Replicate (of patient sample as a control). Used when a patient sample is re-run as a control for a repeat test", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 22,'VOrder' => 9, 'VValue' =>'V', 'VDesc' => "Verifying Calibrator. Used for periodic calibration checks.", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 23,'VOrder' => 1, 'VValue' =>'pcntr', 'VDesc' => "Puncture", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 23,'VOrder' => 2, 'VValue' =>'fprk', 'VDesc' => "Finger-prick sampling", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 23,'VOrder' => 3, 'VValue' =>'ucct', 'VDesc' => "Urine specimen collection, clean catch", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 23,'VOrder' => 4, 'VValue' =>'utcl', 'VDesc' => "Timed urine collection", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 23,'VOrder' => 5, 'VValue' =>'ucth', 'VDesc' => "Urine specimen collection, catheterized", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 23,'VOrder' => 6, 'VValue' =>'scgh', 'VDesc' => "Collection of coughed sputum", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 23,'VOrder' => 7, 'VValue' =>'bpsy', 'VDesc' => "Biopsy", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 23,'VOrder' => 8, 'VValue' =>'aspn', 'VDesc' => "Aspiration", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 23,'VOrder' => 9, 'VValue' =>'excs', 'VDesc' => "Excision", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 23,'VOrder' => 10, 'VValue' =>'scrp', 'VDesc' => "Scraping", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 24,'VOrder' => 1, 'VValue' =>'LA', 'VDesc' => "Left Arm", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 24,'VOrder' => 2, 'VValue' =>'RA', 'VDesc' => "Right Arm", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 24,'VOrder' => 3, 'VValue' =>'LF', 'VDesc' => "Left Foot", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 24,'VOrder' => 4, 'VValue' =>'RF', 'VDesc' => "Right Foot", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 25,'VOrder' => 1, 'VValue' =>'5ml', 'VDesc' => "5 mL", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 25,'VOrder' => 2, 'VValue' =>'7ml', 'VDesc' => "7 mL", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 25,'VOrder' => 3, 'VValue' =>'10ml', 'VDesc' => "10 mL", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 25,'VOrder' => 4, 'VValue' =>'1l', 'VDesc' => "1 L", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 26,'VOrder' => 1, 'VValue' =>'F', 'VDesc' => "Fasting. Pasien puasa", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 26,'VOrder' => 2, 'VValue' =>'NF', 'VDesc' => "Not Fasting. Pasien tidak puasa", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 26,'VOrder' => 3, 'VValue' =>'NG', 'VDesc' => "Not Given. Pasien tidak ditanyakan status puasanya.", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 27,'VOrder' => 1, 'VValue' =>'TEST', 'VDesc' => "Test", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 27,'VOrder' => 2, 'VValue' =>'PARAM', 'VDesc' => "Parameter", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 27,'VOrder' => 3, 'VValue' =>'CALC', 'VDesc' => "Calculated Test", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 27,'VOrder' => 4, 'VValue' =>'GROUP', 'VDesc' => "Group Test", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 27,'VOrder' => 5, 'VValue' =>'TITLE', 'VDesc' => "Title.", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 28,'VOrder' => 1, 'VValue' =>'g/dL', 'VDesc' => "", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 28,'VOrder' => 2, 'VValue' =>'g/L', 'VDesc' => "", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 28,'VOrder' => 3, 'VValue' =>'mg/dL', 'VDesc' => "", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 28,'VOrder' => 4, 'VValue' =>'mg/L', 'VDesc' => "", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 28,'VOrder' => 5, 'VValue' =>'L/L', 'VDesc' => "", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 28,'VOrder' => 6, 'VValue' =>'x106/mL', 'VDesc' => "", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 28,'VOrder' => 7, 'VValue' =>'x1012/L', 'VDesc' => "", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 28,'VOrder' => 8, 'VValue' =>'fL', 'VDesc' => "", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 28,'VOrder' => 9, 'VValue' =>'pg', 'VDesc' => "", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 28,'VOrder' => 10, 'VValue' =>'x109/L', 'VDesc' => "", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 29,'VOrder' => 1, 'VValue' =>'Phyton', 'VDesc' => "Phyton", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 29,'VOrder' => 2, 'VValue' =>'CQL', 'VDesc' => "Clinical Quality Language", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 29,'VOrder' => 3, 'VValue' =>'FHIRP', 'VDesc' => "FHIRPath", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 29,'VOrder' => 4, 'VValue' =>'SQL', 'VDesc' => "SQL", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 1, 'VValue' =>'JAWA', 'VDesc' => "Jawa", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 2, 'VValue' =>'SUNDA', 'VDesc' => "Sunda", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 3, 'VValue' =>'BATAK', 'VDesc' => "Batak", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 4, 'VValue' =>'SULOR', 'VDesc' => "Suku asal Sulawesi lainnya", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 5, 'VValue' =>'MDRA', 'VDesc' => "Madura", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 6, 'VValue' =>'BTWI', 'VDesc' => "Betawi", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 7, 'VValue' =>'MNG', 'VDesc' => "Minangkabau", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 8, 'VValue' =>'BUGIS', 'VDesc' => "Bugis", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 9, 'VValue' =>'MLYU', 'VDesc' => "Melayu", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 10, 'VValue' =>'SUMSL', 'VDesc' => "Suku asal Sumatera Selatan", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 11, 'VValue' =>'BTNOR', 'VDesc' => "Suku asal Banten", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 12, 'VValue' =>'NTTOR', 'VDesc' => "Suku asal Nusa Tenggara Timur", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 13, 'VValue' =>'BNJAR', 'VDesc' => "Banjar", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 14, 'VValue' =>'ACEH', 'VDesc' => "Aceh", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 15, 'VValue' =>'BALI', 'VDesc' => "Bali", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 16, 'VValue' =>'SASAK', 'VDesc' => "Sasak", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 17, 'VValue' =>'DAYAK', 'VDesc' => "Dayak", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 18, 'VValue' =>'TNGHA', 'VDesc' => "Tionghoa", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 19, 'VValue' =>'PPAOR', 'VDesc' => "Suku asal Papua", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 20, 'VValue' =>'MKSSR', 'VDesc' => "Makassar", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 21, 'VValue' =>'SUMOR', 'VDesc' => "Suku asal Sumatera lainnya", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 22, 'VValue' =>'MLKOR', 'VDesc' => "Suku asal Maluku", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 23, 'VValue' =>'KLMOR', 'VDesc' => "Suku asal Kalimantan lainnya", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 24, 'VValue' =>'CRBON', 'VDesc' => "Cirebon", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 25, 'VValue' =>'JBIOR', 'VDesc' => "Suku asal Jambi", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 26, 'VValue' =>'LPGOR', 'VDesc' => "Suku Lampung", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 27, 'VValue' =>'NTBOR', 'VDesc' => "Suku asal Nusa Tenggara Barat lainnya", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 28, 'VValue' =>'GRTLO', 'VDesc' => "Gorontalo", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 29, 'VValue' =>'MNHSA', 'VDesc' => "Minahasa", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 30, 'VValue' =>'NIAS', 'VDesc' => "Nias", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 30,'VOrder' => 31, 'VValue' =>'FORGN', 'VDesc' => "Asing/luar negeri", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 31,'VOrder' => 1, 'VValue' =>'ISLAM', 'VDesc' => "Islam", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 31,'VOrder' => 2, 'VValue' =>'KRSTN', 'VDesc' => "Kristen", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 31,'VOrder' => 3, 'VValue' =>'KTLIK', 'VDesc' => "Katolik", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 31,'VOrder' => 4, 'VValue' =>'HINDU', 'VDesc' => "Hindu", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 31,'VOrder' => 5, 'VValue' =>'BUDHA', 'VDesc' => "Budha", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 31,'VOrder' => 6, 'VValue' =>'KHCU', 'VDesc' => "Khong Hu Cu", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 31,'VOrder' => 7, 'VValue' =>'OTHER', 'VDesc' => "Lainnya", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 32,'VOrder' => 1, 'VValue' =>'PPMLN', 'VDesc' => "Papua Melanezoid", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 32,'VOrder' => 2, 'VValue' =>'NGRID', 'VDesc' => "Negroid", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 32,'VOrder' => 3, 'VValue' =>'WDOID', 'VDesc' => "Weddoid", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 32,'VOrder' => 4, 'VValue' =>'MMPM', 'VDesc' => "Melayu Mongoloid_Proto Melayu", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 32,'VOrder' => 5, 'VValue' =>'MMDM', 'VDesc' => "Melayu Mongoloid_Deutro Melayu", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 32,'VOrder' => 6, 'VValue' =>'TNGHA', 'VDesc' => "Tionghoa", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 32,'VOrder' => 7, 'VValue' =>'INDIA', 'VDesc' => "India", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 32,'VOrder' => 8, 'VValue' =>'ARAB', 'VDesc' => "Arab", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 34,'VOrder' => 1, 'VValue' =>'PRPL', 'VDesc' => "Purple", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 34,'VOrder' => 2, 'VValue' =>'RED', 'VDesc' => "Red", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 34,'VOrder' => 3, 'VValue' =>'YLLW', 'VDesc' => "Yellow", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 34,'VOrder' => 4, 'VValue' =>'GRN', 'VDesc' => "Green", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 34,'VOrder' => 5, 'VValue' =>'PINK', 'VDesc' => "Pink", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 34,'VOrder' => 6, 'VValue' =>'LBLU', 'VDesc' => "Light Blue", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 34,'VOrder' => 7, 'VValue' =>'RBLU', 'VDesc' => "Royal Blue", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 34,'VOrder' => 8, 'VValue' =>'GRAY', 'VDesc' => "Gray", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 35,'VOrder' => 1, 'VValue' =>'ORD', 'VDesc' => "Order", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 35,'VOrder' => 2, 'VValue' =>'ANA', 'VDesc' => "Analyse", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 35,'VOrder' => 3, 'VValue' =>'VER', 'VDesc' => "Result Verification/Technical Validation", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 35,'VOrder' => 4, 'VValue' =>'REV', 'VDesc' => "Clinical Review/Clinical Validation", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 35,'VOrder' => 5, 'VValue' =>'REP', 'VDesc' => "Reporting", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 1, 'VValue' =>'A01', 'VDesc' => "Admit", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 2, 'VValue' =>'A02', 'VDesc' => "Transfer", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 3, 'VValue' =>'A03', 'VDesc' => "Discharge", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 4, 'VValue' =>'A04', 'VDesc' => "Register", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 5, 'VValue' =>'A08', 'VDesc' => "Update patient information", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 6, 'VValue' =>'A11', 'VDesc' => "Cancel admit", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 7, 'VValue' =>'A12', 'VDesc' => "Cancel transfer", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 8, 'VValue' =>'A13', 'VDesc' => "Cancel discharge", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 9, 'VValue' =>'A23', 'VDesc' => "Delete patient record", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 10, 'VValue' =>'A24', 'VDesc' => "Link patient information", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 11, 'VValue' =>'A37', 'VDesc' => "Unlink patient information", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 12, 'VValue' =>'A54', 'VDesc' => "Change attending doctor", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 36,'VOrder' => 13, 'VValue' =>'A61', 'VDesc' => "Change consulting doctor", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 37,'VOrder' => 1, 'VValue' =>'GH', 'VDesc' => "Government Hospital (rumah sakit pemerintah)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 37,'VOrder' => 2, 'VValue' =>'PH', 'VDesc' => "Private Hospital (rumah sakit swasta)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 37,'VOrder' => 3, 'VValue' =>'GHL', 'VDesc' => "Government Hospital Lab (lab RS pemerintah)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 37,'VOrder' => 4, 'VValue' =>'PHL', 'VDesc' => "Private Hospital Lab (Lab RS swasta)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 37,'VOrder' => 5, 'VValue' =>'GL', 'VDesc' => "Government Lab (laboratorium mandiri pemerintah)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 37,'VOrder' => 6, 'VValue' =>'PL', 'VDesc' => "Private Lab (laboratorium mandiri swasta)", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 38,'VOrder' => 1, 'VValue' =>'A', 'VDesc' => "Kelas A", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 38,'VOrder' => 2, 'VValue' =>'B', 'VDesc' => "Kelas B", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 38,'VOrder' => 3, 'VValue' =>'C', 'VDesc' => "Kelas C", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 38,'VOrder' => 4, 'VValue' =>'D', 'VDesc' => "Kelas D", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 38,'VOrder' => 5, 'VValue' =>'Utm', 'VDesc' => "Utama", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 38,'VOrder' => 6, 'VValue' =>'Ptm', 'VDesc' => "Pratama", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 39,'VOrder' => 1, 'VValue' =>'HIS', 'VDesc' => "HIS", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 39,'VOrder' => 2, 'VValue' =>'SITE', 'VDesc' => "Site", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 39,'VOrder' => 3, 'VValue' =>'WST', 'VDesc' => "Workstation", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 39,'VOrder' => 4, 'VValue' =>'INST', 'VDesc' => "Equipment/Instrument", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 40,'VOrder' => 1, 'VValue' =>'PROP', 'VDesc' => "Propinsi", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 40,'VOrder' => 2, 'VValue' =>'KAB', 'VDesc' => "Kabupaten", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 40,'VOrder' => 3, 'VValue' =>'KOTA', 'VDesc' => "Kota", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 41,'VOrder' => 1, 'VValue' =>'=', 'VDesc' => "Equal", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 41,'VOrder' => 2, 'VValue' =>'<', 'VDesc' => "Greater than", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 41,'VOrder' => 3, 'VValue' =>'>', 'VDesc' => "More than", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 41,'VOrder' => 4, 'VValue' =>'<=', 'VDesc' => "Less than or equal to", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 41,'VOrder' => 5, 'VValue' =>'>=', 'VDesc' => "Greater than or equal to", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 43,'VOrder' => 1, 'VValue' =>'NMRIC', 'VDesc' => "Numeric ", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 43,'VOrder' => 2, 'VValue' =>'RANGE', 'VDesc' => "Range", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 43,'VOrder' => 3, 'VValue' =>'TEXT', 'VDesc' => "Text", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 43,'VOrder' => 4, 'VValue' =>'VSET', 'VDesc' => "Value set", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 44,'VOrder' => 1, 'VValue' =>'NMRC', 'VDesc' => "Numeric", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 44,'VOrder' => 2, 'VValue' =>'TEXT', 'VDesc' => "Text", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 45,'VOrder' => 1, 'VValue' =>'REF', 'VDesc' => "Reference Range", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 45,'VOrder' => 2, 'VValue' =>'CRTC', 'VDesc' => "Critical Range", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 45,'VOrder' => 3, 'VValue' =>'VAL', 'VDesc' => "Validation Range", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 45,'VOrder' => 4, 'VValue' =>'RERUN', 'VDesc' => "Rerun Range", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 46,'VOrder' => 1, 'VValue' =>'RANGE', 'VDesc' => "Range", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 46,'VOrder' => 2, 'VValue' =>'THOLD', 'VDesc' => "Threshold", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 47,'VOrder' => 1, 'VValue' =>'VSET', 'VDesc' => "Value Set", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 47,'VOrder' => 2, 'VValue' =>'TEXT', 'VDesc' => "Text.", 'VCategory' => 1, 'CreateDate' => "$now"],
- ['VSetID' => 1001,'VOrder' => 1, 'VValue' =>'NEG', 'VDesc' => "Negative", 'VCategory' => 2, 'CreateDate' => "$now"],
- ['VSetID' => 1001,'VOrder' => 2, 'VValue' =>'POS', 'VDesc' => "Positive", 'VCategory' => 2, 'CreateDate' => "$now"],
- ['VSetID' => 1001,'VOrder' => 3, 'VValue' =>'GZ', 'VDesc' => "Grayzone", 'VCategory' => 2, 'CreateDate' => "$now"],
- ['VSetID' => 1002,'VOrder' => 1, 'VValue' =>'KNG', 'VDesc' => "Kuning", 'VCategory' => 2, 'CreateDate' => "$now"],
- ['VSetID' => 1002,'VOrder' => 2, 'VValue' =>'JNG', 'VDesc' => "Jingga", 'VCategory' => 2, 'CreateDate' => "$now"],
- ['VSetID' => 1002,'VOrder' => 3, 'VValue' =>'MRH', 'VDesc' => "Merah", 'VCategory' => 2, 'CreateDate' => "$now"],
- ['VSetID' => 1002,'VOrder' => 4, 'VValue' =>'CKLT', 'VDesc' => "Coklat tua", 'VCategory' => 2, 'CreateDate' => "$now"]
- ];
- $this->db->table('valueset')->insertBatch($data);
-
- $data = [
- ['VSName' => 'WSType','VSDesc' =>'workstation.Type', 'VSetID' => '1', 'CreateDate' => "$now"],
- ['VSName' => 'Enable/Disable','VSDesc' =>'workstation.Enable, equipmentlist.Enable, testdef.CountStat, testdefsite.CountStat, testdefsite.VisibleScr, testdefsite.VisibleRpt', 'VSetID' => '2', 'CreateDate' => "$now"],
- ['VSName' => 'Gender','VSDesc' =>'patient.Gender, refnum.Sex', 'VSetID' => '3', 'CreateDate' => "$now"],
- ['VSName' => 'Marital Status','VSDesc' =>'patient.MaritalStatus', 'VSetID' => '4', 'CreateDate' => "$now"],
- ['VSName' => 'Death Indicator','VSDesc' =>'patient.DeathIndicator', 'VSetID' => '5', 'CreateDate' => "$now"],
- ['VSName' => 'Identifier Type','VSDesc' =>'patidt.IdentifierType', 'VSetID' => '6', 'CreateDate' => "$now"],
- ['VSName' => 'Operation','VSDesc' =>'patreglog.Operation, patvisitlog.Operation, orderlog.Operation', 'VSetID' => '7', 'CreateDate' => "$now"],
- ['VSName' => 'DID Type','VSDesc' =>'patreglog.DIDType, patvisitlog.DIDType', 'VSetID' => '8', 'CreateDate' => "$now"],
- ['VSName' => 'Requested Entity','VSDesc' =>'order.ReqEntity', 'VSetID' => '9', 'CreateDate' => "$now"],
- ['VSName' => 'Order Priority','VSDesc' =>'order.Priority', 'VSetID' => '10', 'CreateDate' => "$now"],
- ['VSName' => 'Order Status','VSDesc' =>'orderststatus.OrderStatus', 'VSetID' => '11', 'CreateDate' => "$now"],
- ['VSName' => 'Location TypeTable 34 location','VSDesc' =>'location.LocationType', 'VSetID' => '12', 'CreateDate' => "$now"],
- ['VSName' => 'Additive','VSDesc' =>'containertype.Additive, specimenprep.Additive', 'VSetID' => '13', 'CreateDate' => "$now"],
- ['VSName' => 'Container Class','VSDesc' =>'containertype.ConClass', 'VSetID' => '14', 'CreateDate' => "$now"],
- ['VSName' => 'Specimen Type','VSDesc' =>'testdeftech.SpcType, refnum.SpcType, reftxt.SpcType', 'VSetID' => '15', 'CreateDate' => "$now"],
- ['VSName' => 'Unit','VSDesc' =>'spcdef.Unit, specimens.Unit, specimenstatus.Unit, specimenprep.AddUnit', 'VSetID' => '16', 'CreateDate' => "$now"],
- ['VSName' => 'GenerateBy','VSDesc' =>'specimens. GenerateBy', 'VSetID' => '17', 'CreateDate' => "$now"],
- ['VSName' => 'Specimen Activity','VSDesc' =>'specimenstatus.SpcAct', 'VSetID' => '18', 'CreateDate' => "$now"],
- ['VSName' => 'Activity Result','VSDesc' =>'specimenstatus.ActRes, patrestatus.ActRes', 'VSetID' => '19', 'CreateDate' => "$now"],
- ['VSName' => 'Specimen Status','VSDesc' =>'specimenstatus.SpcStatus', 'VSetID' => '20', 'CreateDate' => "$now"],
- ['VSName' => 'Specimen Condition','VSDesc' =>'specimenstatus.SpcCon', 'VSetID' => '21', 'CreateDate' => "$now"],
- ['VSName' => 'Specimen Role','VSDesc' =>'specimencollection.SpcRole', 'VSetID' => '22', 'CreateDate' => "$now"],
- ['VSName' => 'Collection Method','VSDesc' =>'specimencollection.ColMethod', 'VSetID' => '23', 'CreateDate' => "$now"],
- ['VSName' => 'Body Site','VSDesc' =>'specimencollection.BodySite', 'VSetID' => '24', 'CreateDate' => "$now"],
- ['VSName' => 'Container Size','VSDesc' =>'specimencollection.CntSize', 'VSetID' => '25', 'CreateDate' => "$now"],
- ['VSName' => 'Fasting Status','VSDesc' =>'specimencollection.Fasting', 'VSetID' => '26', 'CreateDate' => "$now"],
- ['VSName' => 'Test Type','VSDesc' =>'testdefsite.TestType', 'VSetID' => '27', 'CreateDate' => "$now"],
- ['VSName' => 'Result Unit','VSDesc' =>'testdefsite.Unit1, testdefsite.Unit2', 'VSetID' => '28', 'CreateDate' => "$now"],
- ['VSName' => 'Formula Languange','VSDesc' =>'testdefcal.FormulaLang', 'VSetID' => '29', 'CreateDate' => "$now"],
- ['VSName' => 'Race','VSDesc' =>'patient.Race', 'VSetID' => '30', 'CreateDate' => "$now"],
- ['VSName' => 'Religion','VSDesc' =>'patient.Religion', 'VSetID' => '31', 'CreateDate' => "$now"],
- ['VSName' => 'Ethnic','VSDesc' =>'patient.Ethnic', 'VSetID' => '32', 'CreateDate' => "$now"],
- ['VSName' => 'Country','VSDesc' =>'patient.Country', 'VSetID' => '33', 'CreateDate' => "$now"],
- ['VSName' => 'Container cap color','VSDesc' =>'containerdef.Color', 'VSetID' => '34', 'CreateDate' => "$now"],
- ['VSName' => 'Test Activity','VSDesc' =>'patrestatus.TestAct', 'VSetID' => '35', 'CreateDate' => "$now"],
- ['VSName' => 'ADT Event','VSDesc' =>'patvisitadt.Code', 'VSetID' => '36', 'CreateDate' => "$now"],
- ['VSName' => 'Site Type','VSDesc' =>'Site.SiteType', 'VSetID' => '37', 'CreateDate' => "$now"],
- ['VSName' => 'Site Class','VSDesc' =>'Site.SiteClass', 'VSetID' => '38', 'CreateDate' => "$now"],
- ['VSName' => 'Entity Type','VSDesc' =>'testmap.HostType, testmap.ClientType', 'VSetID' => '39', 'CreateDate' => "$now"],
- ['VSName' => 'Area Class','VSDesc' =>'AreaGeo', 'VSetID' => '40', 'CreateDate' => "$now"],
- ['VSName' => 'Math Sign','VSDesc' =>'refnum.LowSign, refnum.HighSign', 'VSetID' => '41', 'CreateDate' => "$now"],
- ['VSName' => 'VCategory','VSDesc' =>'valueset. VCategory', 'VSetID' => '42', 'CreateDate' => "$now"],
- ['VSName' => 'Result Type','VSDesc' =>'testdeftech.ResultType', 'VSetID' => '43', 'CreateDate' => "$now"],
- ['VSName' => 'Reference Type','VSDesc' =>'testdeftech.RefType', 'VSetID' => '44', 'CreateDate' => "$now"],
- ['VSName' => 'Range Type','VSDesc' =>'refnum.RangeType', 'VSetID' => '45', 'CreateDate' => "$now"],
- ['VSName' => 'Numeric Reference Type','VSDesc' =>'refnum.NumRefType', 'VSetID' => '46', 'CreateDate' => "$now"],
- ['VSName' => 'Text Reference Type','VSDesc' =>'reftxt. TxtRefType', 'VSetID' => '47', 'CreateDate' => "$now"],
- ['VSName' => 'HIV','VSDesc' =>'Value set untuk hasil HIV', 'VSetID' => '1001', 'CreateDate' => "$now"],
-
- ];
- $this->db->table('valuesetdef')->insertBatch($data);
- }
-
-}
diff --git a/app/Libraries/Data/Countries.php b/app/Libraries/Data/Countries.php
deleted file mode 100644
index 936e265..0000000
--- a/app/Libraries/Data/Countries.php
+++ /dev/null
@@ -1,259 +0,0 @@
- 'Afghanistan',
- 'ALA' => 'Åland Islands',
- 'ALB' => 'Albania',
- 'DZA' => 'Algeria',
- 'ASM' => 'American Samoa',
- 'AND' => 'Andorra',
- 'AGO' => 'Angola',
- 'AIA' => 'Anguilla',
- 'ATA' => 'Antarctica',
- 'ATG' => 'Antigua and Barbuda',
- 'ARG' => 'Argentina',
- 'ARM' => 'Armenia',
- 'ABW' => 'Aruba',
- 'AUS' => 'Australia',
- 'AUT' => 'Austria',
- 'AZE' => 'Azerbaijan',
- 'BHS' => 'Bahamas',
- 'BHR' => 'Bahrain',
- 'BGD' => 'Bangladesh',
- 'BRB' => 'Barbados',
- 'BLR' => 'Belarus',
- 'BEL' => 'Belgium',
- 'BLZ' => 'Belize',
- 'BEN' => 'Benin',
- 'BMU' => 'Bermuda',
- 'BTN' => 'Bhutan',
- 'BOL' => 'Bolivia, Plurinational State of',
- 'BES' => 'Bonaire, Sint Eustatius and Saba',
- 'BIH' => 'Bosnia and Herzegovina',
- 'BWA' => 'Botswana',
- 'BVT' => 'Bouvet Island',
- 'BRA' => 'Brazil',
- 'IOT' => 'British Indian Ocean Territory',
- 'BRN' => 'Brunei Darussalam',
- 'BGR' => 'Bulgaria',
- 'BFA' => 'Burkina Faso',
- 'BDI' => 'Burundi',
- 'CPV' => 'Cabo Verde',
- 'KHM' => 'Cambodia',
- 'CMR' => 'Cameroon',
- 'CAN' => 'Canada',
- 'CYM' => 'Cayman Islands',
- 'CAF' => 'Central African Republic',
- 'TCD' => 'Chad',
- 'CHL' => 'Chile',
- 'CHN' => 'China',
- 'CXR' => 'Christmas Island',
- 'CCK' => 'Cocos (Keeling) Islands',
- 'COL' => 'Colombia',
- 'COM' => 'Comoros',
- 'COG' => 'Congo',
- 'COD' => 'Congo, Democratic Republic of the',
- 'COK' => 'Cook Islands',
- 'CRI' => 'Costa Rica',
- 'CIV' => "Côte d'Ivoire",
- 'HRV' => 'Croatia',
- 'CUB' => 'Cuba',
- 'CUW' => 'Curaçao',
- 'CYP' => 'Cyprus',
- 'CZE' => 'Czechia',
- 'DNK' => 'Denmark',
- 'DJI' => 'Djibouti',
- 'DMA' => 'Dominica',
- 'DOM' => 'Dominican Republic',
- 'ECU' => 'Ecuador',
- 'EGY' => 'Egypt',
- 'SLV' => 'El Salvador',
- 'GNQ' => 'Equatorial Guinea',
- 'ERI' => 'Eritrea',
- 'EST' => 'Estonia',
- 'SWZ' => 'Eswatini',
- 'ETH' => 'Ethiopia',
- 'FLK' => 'Falkland Islands (Malvinas)',
- 'FRO' => 'Faroe Islands',
- 'FJI' => 'Fiji',
- 'FIN' => 'Finland',
- 'FRA' => 'France',
- 'GUF' => 'French Guiana',
- 'PYF' => 'French Polynesia',
- 'ATF' => 'French Southern Territories',
- 'GAB' => 'Gabon',
- 'GMB' => 'Gambia',
- 'GEO' => 'Georgia',
- 'DEU' => 'Germany',
- 'GHA' => 'Ghana',
- 'GIB' => 'Gibraltar',
- 'GRC' => 'Greece',
- 'GRL' => 'Greenland',
- 'GRD' => 'Grenada',
- 'GLP' => 'Guadeloupe',
- 'GUM' => 'Guam',
- 'GTM' => 'Guatemala',
- 'GGY' => 'Guernsey',
- 'GIN' => 'Guinea',
- 'GNB' => 'Guinea-Bissau',
- 'GUY' => 'Guyana',
- 'HTI' => 'Haiti',
- 'HMD' => 'Heard Island and McDonald Islands',
- 'VAT' => 'Holy See',
- 'HND' => 'Honduras',
- 'HKG' => 'Hong Kong',
- 'HUN' => 'Hungary',
- 'ISL' => 'Iceland',
- 'IND' => 'India',
- 'IDN' => 'Indonesia',
- 'IRN' => 'Iran, Islamic Republic of',
- 'IRQ' => 'Iraq',
- 'IRL' => 'Ireland',
- 'IMN' => 'Isle of Man',
- 'ISR' => 'Israel',
- 'ITA' => 'Italy',
- 'JAM' => 'Jamaica',
- 'JPN' => 'Japan',
- 'JEY' => 'Jersey',
- 'JOR' => 'Jordan',
- 'KAZ' => 'Kazakhstan',
- 'KEN' => 'Kenya',
- 'KIR' => 'Kiribati',
- 'PRK' => 'Korea, Democratic People\'s Republic of',
- 'KOR' => 'Korea, Republic of',
- 'KWT' => 'Kuwait',
- 'KGZ' => 'Kyrgyzstan',
- 'LAO' => 'Lao People\'s Democratic Republic',
- 'LVA' => 'Latvia',
- 'LBN' => 'Lebanon',
- 'LSO' => 'Lesotho',
- 'LBR' => 'Liberia',
- 'LBY' => 'Libya',
- 'LIE' => 'Liechtenstein',
- 'LTU' => 'Lithuania',
- 'LUX' => 'Luxembourg',
- 'MAC' => 'Macao',
- 'MDG' => 'Madagascar',
- 'MWI' => 'Malawi',
- 'MYS' => 'Malaysia',
- 'MDV' => 'Maldives',
- 'MLI' => 'Mali',
- 'MLT' => 'Malta',
- 'MHL' => 'Marshall Islands',
- 'MTQ' => 'Martinique',
- 'MRT' => 'Mauritania',
- 'MUS' => 'Mauritius',
- 'MYT' => 'Mayotte',
- 'MEX' => 'Mexico',
- 'FSM' => 'Micronesia, Federated States of',
- 'MDA' => 'Moldova, Republic of',
- 'MCO' => 'Monaco',
- 'MNG' => 'Mongolia',
- 'MNE' => 'Montenegro',
- 'MSR' => 'Montserrat',
- 'MAR' => 'Morocco',
- 'MOZ' => 'Mozambique',
- 'MMR' => 'Myanmar',
- 'NAM' => 'Namibia',
- 'NRU' => 'Nauru',
- 'NPL' => 'Nepal',
- 'NLD' => 'Netherlands, Kingdom of the',
- 'NCL' => 'New Caledonia',
- 'NZL' => 'New Zealand',
- 'NIC' => 'Nicaragua',
- 'NER' => 'Niger',
- 'NGA' => 'Nigeria',
- 'NIU' => 'Niue',
- 'NFK' => 'Norfolk Island',
- 'MKD' => 'North Macedonia',
- 'MNP' => 'Northern Mariana Islands',
- 'NOR' => 'Norway',
- 'OMN' => 'Oman',
- 'PAK' => 'Pakistan',
- 'PLW' => 'Palau',
- 'PSE' => 'Palestine, State of',
- 'PAN' => 'Panama',
- 'PNG' => 'Papua New Guinea',
- 'PRY' => 'Paraguay',
- 'PER' => 'Peru',
- 'PHL' => 'Philippines',
- 'PCN' => 'Pitcairn',
- 'POL' => 'Poland',
- 'PRT' => 'Portugal',
- 'PRI' => 'Puerto Rico',
- 'QAT' => 'Qatar',
- 'REU' => 'Réunion',
- 'ROU' => 'Romania',
- 'RUS' => 'Russian Federation',
- 'RWA' => 'Rwanda',
- 'BLM' => 'Saint Barthélemy',
- 'SHN' => 'Saint Helena, Ascension and Tristan da Cunha',
- 'KNA' => 'Saint Kitts and Nevis',
- 'LCA' => 'Saint Lucia',
- 'MAF' => 'Saint Martin (French part)',
- 'SPM' => 'Saint Pierre and Miquelon',
- 'VCT' => 'Saint Vincent and the Grenadines',
- 'WSM' => 'Samoa',
- 'SMR' => 'San Marino',
- 'STP' => 'Sao Tome and Principe',
- 'SAU' => 'Saudi Arabia',
- 'SEN' => 'Senegal',
- 'SRB' => 'Serbia',
- 'SYC' => 'Seychelles',
- 'SLE' => 'Sierra Leone',
- 'SGP' => 'Singapore',
- 'SXM' => 'Sint Maarten (Dutch part)',
- 'SVK' => 'Slovakia',
- 'SVN' => 'Slovenia',
- 'SLB' => 'Solomon Islands',
- 'SOM' => 'Somalia',
- 'ZAF' => 'South Africa',
- 'SGS' => 'South Georgia and the South Sandwich Islands',
- 'SSD' => 'South Sudan',
- 'ESP' => 'Spain',
- 'LKA' => 'Sri Lanka',
- 'SDN' => 'Sudan',
- 'SUR' => 'Suriname',
- 'SJM' => 'Svalbard and Jan Mayen',
- 'SWE' => 'Sweden',
- 'CHE' => 'Switzerland',
- 'SYR' => 'Syrian Arab Republic',
- 'TWN' => 'Taiwan, Province of China',
- 'TJK' => 'Tajikistan',
- 'TZA' => 'Tanzania, United Republic of',
- 'THA' => 'Thailand',
- 'TLS' => 'Timor-Leste',
- 'TGO' => 'Togo',
- 'TKL' => 'Tokelau',
- 'TON' => 'Tonga',
- 'TTO' => 'Trinidad and Tobago',
- 'TUN' => 'Tunisia',
- 'TUR' => 'Türkiye',
- 'TKM' => 'Turkmenistan',
- 'TCA' => 'Turks and Caicos Islands',
- 'TUV' => 'Tuvalu',
- 'UGA' => 'Uganda',
- 'UKR' => 'Ukraine',
- 'ARE' => 'United Arab Emirates',
- 'GBR' => 'United Kingdom of Great Britain and Northern Ireland',
- 'USA' => 'United States of America',
- 'UMI' => 'United States Minor Outlying Islands',
- 'URY' => 'Uruguay',
- 'UZB' => 'Uzbekistan',
- 'VUT' => 'Vanuatu',
- 'VEN' => 'Venezuela, Bolivarian Republic of',
- 'VNM' => 'Viet Nam',
- 'VGB' => 'Virgin Islands (British)',
- 'VIR' => 'Virgin Islands (U.S.)',
- 'WLF' => 'Wallis and Futuna',
- 'ESH' => 'Western Sahara',
- 'YEM' => 'Yemen',
- 'ZMB' => 'Zambia',
- 'ZWE' => 'Zimbabwe'
-];
diff --git a/app/Libraries/Data/_meta.json b/app/Libraries/Data/_meta.json
new file mode 100644
index 0000000..def0fd3
--- /dev/null
+++ b/app/Libraries/Data/_meta.json
@@ -0,0 +1,54 @@
+{
+ "version": "1.0.0",
+ "generated": "2026-01-12",
+ "description": "Value Set Definitions - Static lookup values for CLQMS",
+ "valuesets": [
+ {"file": "ws_type.json","VSName": "Workstation Type"},
+ {"file": "enable_disable.json","VSName": "Enable/Disable"},
+ {"file": "gender.json","VSName": "Gender"},
+ {"file": "marital_status.json","VSName": "Marital Status"},
+ {"file": "death_indicator.json","VSName": "Death Indicator"},
+ {"file": "identifier_type.json","VSName": "Identifier Type"},
+ {"file": "operation.json","VSName": "Operation (CRUD)"},
+ {"file": "did_type.json","VSName": "DID Type"},
+ {"file": "requested_entity.json","VSName": "Requested Entity"},
+ {"file": "order_priority.json","VSName": "Order Priority"},
+ {"file": "order_status.json","VSName": "Order Status"},
+ {"file": "location_type.json","VSName": "Location Type"},
+ {"file": "additive.json","VSName": "Additive"},
+ {"file": "container_class.json","VSName": "Container Class"},
+ {"file": "specimen_type.json","VSName": "Specimen Type"},
+ {"file": "unit.json","VSName": "Unit"},
+ {"file": "generate_by.json","VSName": "Generate By"},
+ {"file": "specimen_activity.json","VSName": "Specimen Activity"},
+ {"file": "activity_result.json","VSName": "Activity Result"},
+ {"file": "specimen_status.json","VSName": "Specimen Status"},
+ {"file": "specimen_condition.json","VSName": "Specimen Condition"},
+ {"file": "specimen_role.json","VSName": "Specimen Role"},
+ {"file": "collection_method.json","VSName": "Collection Method"},
+ {"file": "body_site.json","VSName": "Body Site"},
+ {"file": "container_size.json","VSName": "Container Size"},
+ {"file": "fasting_status.json","VSName": "Fasting Status"},
+ {"file": "test_type.json","VSName": "Test Type"},
+ {"file": "result_unit.json","VSName": "Result Unit"},
+ {"file": "formula_language.json","VSName": "Formula Language"},
+ {"file": "race.json","VSName": "Race (Ethnicity)"},
+ {"file": "religion.json","VSName": "Religion"},
+ {"file": "ethnic.json","VSName": "Ethnic"},
+ {"file": "country.json","VSName": "Country"},
+ {"file": "container_cap_color.json","VSName": "Container Cap Color"},
+ {"file": "test_activity.json","VSName": "Test Activity"},
+ {"file": "adt_event.json","VSName": "ADT Event"},
+ {"file": "site_type.json","VSName": "Site Type"},
+ {"file": "site_class.json","VSName": "Site Class"},
+ {"file": "entity_type.json","VSName": "Entity Type"},
+ {"file": "area_class.json","VSName": "Area Class"},
+ {"file": "math_sign.json","VSName": "Math Sign"},
+ {"file": "v_category.json","VSName": "VCategory"},
+ {"file": "result_type.json","VSName": "Result Type"},
+ {"file": "reference_type.json","VSName": "Reference Type"},
+ {"file": "range_type.json","VSName": "Range Type"},
+ {"file": "numeric_ref_type.json","VSName": "Numeric Reference Type"},
+ {"file": "text_ref_type.json","VSName": "Text Reference Type"}
+ ]
+}
diff --git a/app/Libraries/Data/valuesets/activity_result.json b/app/Libraries/Data/activity_result.json
similarity index 81%
rename from app/Libraries/Data/valuesets/activity_result.json
rename to app/Libraries/Data/activity_result.json
index 8a9fcdb..238647a 100644
--- a/app/Libraries/Data/valuesets/activity_result.json
+++ b/app/Libraries/Data/activity_result.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 19,
- "name": "activity_result",
+{"name": "activity_result",
"VSName": "Activity Result",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/additive.json b/app/Libraries/Data/additive.json
similarity index 96%
rename from app/Libraries/Data/valuesets/additive.json
rename to app/Libraries/Data/additive.json
index 1364ece..adfe244 100644
--- a/app/Libraries/Data/valuesets/additive.json
+++ b/app/Libraries/Data/additive.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 13,
- "name": "additive",
+{"name": "additive",
"VSName": "Additive",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/adt_event.json b/app/Libraries/Data/adt_event.json
similarity index 94%
rename from app/Libraries/Data/valuesets/adt_event.json
rename to app/Libraries/Data/adt_event.json
index 5174faf..a0938ff 100644
--- a/app/Libraries/Data/valuesets/adt_event.json
+++ b/app/Libraries/Data/adt_event.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 36,
- "name": "adt_event",
+{"name": "adt_event",
"VSName": "ADT Event",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/area_class.json b/app/Libraries/Data/area_class.json
similarity index 82%
rename from app/Libraries/Data/valuesets/area_class.json
rename to app/Libraries/Data/area_class.json
index 47ba62f..30d7415 100644
--- a/app/Libraries/Data/valuesets/area_class.json
+++ b/app/Libraries/Data/area_class.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 40,
- "name": "area_class",
+{"name": "area_class",
"VSName": "Area Class",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/body_site.json b/app/Libraries/Data/body_site.json
similarity index 85%
rename from app/Libraries/Data/valuesets/body_site.json
rename to app/Libraries/Data/body_site.json
index 991d550..1812af4 100644
--- a/app/Libraries/Data/valuesets/body_site.json
+++ b/app/Libraries/Data/body_site.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 24,
- "name": "body_site",
+{"name": "body_site",
"VSName": "Body Site",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/collection_method.json b/app/Libraries/Data/collection_method.json
similarity index 92%
rename from app/Libraries/Data/valuesets/collection_method.json
rename to app/Libraries/Data/collection_method.json
index 05f21a1..aeb5181 100644
--- a/app/Libraries/Data/valuesets/collection_method.json
+++ b/app/Libraries/Data/collection_method.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 23,
- "name": "collection_method",
+{"name": "collection_method",
"VSName": "Collection Method",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/container_cap_color.json b/app/Libraries/Data/container_cap_color.json
similarity index 88%
rename from app/Libraries/Data/valuesets/container_cap_color.json
rename to app/Libraries/Data/container_cap_color.json
index a030e81..2963b3a 100644
--- a/app/Libraries/Data/valuesets/container_cap_color.json
+++ b/app/Libraries/Data/container_cap_color.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 34,
- "name": "container_cap_color",
+{"name": "container_cap_color",
"VSName": "Container Cap Color",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/container_class.json b/app/Libraries/Data/container_class.json
similarity index 81%
rename from app/Libraries/Data/valuesets/container_class.json
rename to app/Libraries/Data/container_class.json
index c91ce3d..14f7e24 100644
--- a/app/Libraries/Data/valuesets/container_class.json
+++ b/app/Libraries/Data/container_class.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 14,
- "name": "container_class",
+{"name": "container_class",
"VSName": "Container Class",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/container_size.json b/app/Libraries/Data/container_size.json
similarity index 83%
rename from app/Libraries/Data/valuesets/container_size.json
rename to app/Libraries/Data/container_size.json
index 368bcaa..dbc4d4c 100644
--- a/app/Libraries/Data/valuesets/container_size.json
+++ b/app/Libraries/Data/container_size.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 25,
- "name": "container_size",
+{"name": "container_size",
"VSName": "Container Size",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/country.json b/app/Libraries/Data/country.json
new file mode 100644
index 0000000..632aac9
--- /dev/null
+++ b/app/Libraries/Data/country.json
@@ -0,0 +1,255 @@
+{"name": "country",
+ "VSName": "Country",
+ "VCategory": "User-defined",
+ "values": [
+ {"key": "AFG", "value": "Afghanistan"},
+ {"key": "ALA", "value": "Åland Islands"},
+ {"key": "ALB", "value": "Albania"},
+ {"key": "DZA", "value": "Algeria"},
+ {"key": "ASM", "value": "American Samoa"},
+ {"key": "AND", "value": "Andorra"},
+ {"key": "AGO", "value": "Angola"},
+ {"key": "AIA", "value": "Anguilla"},
+ {"key": "ATA", "value": "Antarctica"},
+ {"key": "ATG", "value": "Antigua and Barbuda"},
+ {"key": "ARG", "value": "Argentina"},
+ {"key": "ARM", "value": "Armenia"},
+ {"key": "ABW", "value": "Aruba"},
+ {"key": "AUS", "value": "Australia"},
+ {"key": "AUT", "value": "Austria"},
+ {"key": "AZE", "value": "Azerbaijan"},
+ {"key": "BHS", "value": "Bahamas"},
+ {"key": "BHR", "value": "Bahrain"},
+ {"key": "BGD", "value": "Bangladesh"},
+ {"key": "BRB", "value": "Barbados"},
+ {"key": "BLR", "value": "Belarus"},
+ {"key": "BEL", "value": "Belgium"},
+ {"key": "BLZ", "value": "Belize"},
+ {"key": "BEN", "value": "Benin"},
+ {"key": "BMU", "value": "Bermuda"},
+ {"key": "BTN", "value": "Bhutan"},
+ {"key": "BOL", "value": "Bolivia, Plurinational State of"},
+ {"key": "BES", "value": "Bonaire, Sint Eustatius and Saba"},
+ {"key": "BIH", "value": "Bosnia and Herzegovina"},
+ {"key": "BWA", "value": "Botswana"},
+ {"key": "BVT", "value": "Bouvet Island"},
+ {"key": "BRA", "value": "Brazil"},
+ {"key": "IOT", "value": "British Indian Ocean Territory"},
+ {"key": "BRN", "value": "Brunei Darussalam"},
+ {"key": "BGR", "value": "Bulgaria"},
+ {"key": "BFA", "value": "Burkina Faso"},
+ {"key": "BDI", "value": "Burundi"},
+ {"key": "CPV", "value": "Cabo Verde"},
+ {"key": "KHM", "value": "Cambodia"},
+ {"key": "CMR", "value": "Cameroon"},
+ {"key": "CAN", "value": "Canada"},
+ {"key": "CYM", "value": "Cayman Islands"},
+ {"key": "CAF", "value": "Central African Republic"},
+ {"key": "TCD", "value": "Chad"},
+ {"key": "CHL", "value": "Chile"},
+ {"key": "CHN", "value": "China"},
+ {"key": "CXR", "value": "Christmas Island"},
+ {"key": "CCK", "value": "Cocos (Keeling) Islands"},
+ {"key": "COL", "value": "Colombia"},
+ {"key": "COM", "value": "Comoros"},
+ {"key": "COG", "value": "Congo"},
+ {"key": "COD", "value": "Congo, Democratic Republic of the"},
+ {"key": "COK", "value": "Cook Islands"},
+ {"key": "CRI", "value": "Costa Rica"},
+ {"key": "CIV", "value": "Côte d'Ivoire"},
+ {"key": "HRV", "value": "Croatia"},
+ {"key": "CUB", "value": "Cuba"},
+ {"key": "CUW", "value": "Curaçao"},
+ {"key": "CYP", "value": "Cyprus"},
+ {"key": "CZE", "value": "Czechia"},
+ {"key": "DNK", "value": "Denmark"},
+ {"key": "DJI", "value": "Djibouti"},
+ {"key": "DMA", "value": "Dominica"},
+ {"key": "DOM", "value": "Dominican Republic"},
+ {"key": "ECU", "value": "Ecuador"},
+ {"key": "EGY", "value": "Egypt"},
+ {"key": "SLV", "value": "El Salvador"},
+ {"key": "GNQ", "value": "Equatorial Guinea"},
+ {"key": "ERI", "value": "Eritrea"},
+ {"key": "EST", "value": "Estonia"},
+ {"key": "SWZ", "value": "Eswatini"},
+ {"key": "ETH", "value": "Ethiopia"},
+ {"key": "FLK", "value": "Falkland Islands (Malvinas)"},
+ {"key": "FRO", "value": "Faroe Islands"},
+ {"key": "FJI", "value": "Fiji"},
+ {"key": "FIN", "value": "Finland"},
+ {"key": "FRA", "value": "France"},
+ {"key": "GUF", "value": "French Guiana"},
+ {"key": "PYF", "value": "French Polynesia"},
+ {"key": "ATF", "value": "French Southern Territories"},
+ {"key": "GAB", "value": "Gabon"},
+ {"key": "GMB", "value": "Gambia"},
+ {"key": "GEO", "value": "Georgia"},
+ {"key": "DEU", "value": "Germany"},
+ {"key": "GHA", "value": "Ghana"},
+ {"key": "GIB", "value": "Gibraltar"},
+ {"key": "GRC", "value": "Greece"},
+ {"key": "GRL", "value": "Greenland"},
+ {"key": "GRD", "value": "Grenada"},
+ {"key": "GLP", "value": "Guadeloupe"},
+ {"key": "GUM", "value": "Guam"},
+ {"key": "GTM", "value": "Guatemala"},
+ {"key": "GGY", "value": "Guernsey"},
+ {"key": "GIN", "value": "Guinea"},
+ {"key": "GNB", "value": "Guinea-Bissau"},
+ {"key": "GUY", "value": "Guyana"},
+ {"key": "HTI", "value": "Haiti"},
+ {"key": "HMD", "value": "Heard Island and McDonald Islands"},
+ {"key": "VAT", "value": "Holy See"},
+ {"key": "HND", "value": "Honduras"},
+ {"key": "HKG", "value": "Hong Kong"},
+ {"key": "HUN", "value": "Hungary"},
+ {"key": "ISL", "value": "Iceland"},
+ {"key": "IND", "value": "India"},
+ {"key": "IDN", "value": "Indonesia"},
+ {"key": "IRN", "value": "Iran, Islamic Republic of"},
+ {"key": "IRQ", "value": "Iraq"},
+ {"key": "IRL", "value": "Ireland"},
+ {"key": "IMN", "value": "Isle of Man"},
+ {"key": "ISR", "value": "Israel"},
+ {"key": "ITA", "value": "Italy"},
+ {"key": "JAM", "value": "Jamaica"},
+ {"key": "JPN", "value": "Japan"},
+ {"key": "JEY", "value": "Jersey"},
+ {"key": "JOR", "value": "Jordan"},
+ {"key": "KAZ", "value": "Kazakhstan"},
+ {"key": "KEN", "value": "Kenya"},
+ {"key": "KIR", "value": "Kiribati"},
+ {"key": "PRK", "value": "Korea, Democratic People's Republic of"},
+ {"key": "KOR", "value": "Korea, Republic of"},
+ {"key": "KWT", "value": "Kuwait"},
+ {"key": "KGZ", "value": "Kyrgyzstan"},
+ {"key": "LAO", "value": "Lao People's Democratic Republic"},
+ {"key": "LVA", "value": "Latvia"},
+ {"key": "LBN", "value": "Lebanon"},
+ {"key": "LSO", "value": "Lesotho"},
+ {"key": "LBR", "value": "Liberia"},
+ {"key": "LBY", "value": "Libya"},
+ {"key": "LIE", "value": "Liechtenstein"},
+ {"key": "LTU", "value": "Lithuania"},
+ {"key": "LUX", "value": "Luxembourg"},
+ {"key": "MAC", "value": "Macao"},
+ {"key": "MDG", "value": "Madagascar"},
+ {"key": "MWI", "value": "Malawi"},
+ {"key": "MYS", "value": "Malaysia"},
+ {"key": "MDV", "value": "Maldives"},
+ {"key": "MLI", "value": "Mali"},
+ {"key": "MLT", "value": "Malta"},
+ {"key": "MHL", "value": "Marshall Islands"},
+ {"key": "MTQ", "value": "Martinique"},
+ {"key": "MRT", "value": "Mauritania"},
+ {"key": "MUS", "value": "Mauritius"},
+ {"key": "MYT", "value": "Mayotte"},
+ {"key": "MEX", "value": "Mexico"},
+ {"key": "FSM", "value": "Micronesia, Federated States of"},
+ {"key": "MDA", "value": "Moldova, Republic of"},
+ {"key": "MCO", "value": "Monaco"},
+ {"key": "MNG", "value": "Mongolia"},
+ {"key": "MNE", "value": "Montenegro"},
+ {"key": "MSR", "value": "Montserrat"},
+ {"key": "MAR", "value": "Morocco"},
+ {"key": "MOZ", "value": "Mozambique"},
+ {"key": "MMR", "value": "Myanmar"},
+ {"key": "NAM", "value": "Namibia"},
+ {"key": "NRU", "value": "Nauru"},
+ {"key": "NPL", "value": "Nepal"},
+ {"key": "NLD", "value": "Netherlands, Kingdom of the"},
+ {"key": "NCL", "value": "New Caledonia"},
+ {"key": "NZL", "value": "New Zealand"},
+ {"key": "NIC", "value": "Nicaragua"},
+ {"key": "NER", "value": "Niger"},
+ {"key": "NGA", "value": "Nigeria"},
+ {"key": "NIU", "value": "Niue"},
+ {"key": "NFK", "value": "Norfolk Island"},
+ {"key": "MKD", "value": "North Macedonia"},
+ {"key": "MNP", "value": "Northern Mariana Islands"},
+ {"key": "NOR", "value": "Norway"},
+ {"key": "OMN", "value": "Oman"},
+ {"key": "PAK", "value": "Pakistan"},
+ {"key": "PLW", "value": "Palau"},
+ {"key": "PSE", "value": "Palestine, State of"},
+ {"key": "PAN", "value": "Panama"},
+ {"key": "PNG", "value": "Papua New Guinea"},
+ {"key": "PRY", "value": "Paraguay"},
+ {"key": "PER", "value": "Peru"},
+ {"key": "PHL", "value": "Philippines"},
+ {"key": "PCN", "value": "Pitcairn"},
+ {"key": "POL", "value": "Poland"},
+ {"key": "PRT", "value": "Portugal"},
+ {"key": "PRI", "value": "Puerto Rico"},
+ {"key": "QAT", "value": "Qatar"},
+ {"key": "REU", "value": "Réunion"},
+ {"key": "ROU", "value": "Romania"},
+ {"key": "RUS", "value": "Russian Federation"},
+ {"key": "RWA", "value": "Rwanda"},
+ {"key": "BLM", "value": "Saint Barthélemy"},
+ {"key": "SHN", "value": "Saint Helena, Ascension and Tristan da Cunha"},
+ {"key": "KNA", "value": "Saint Kitts and Nevis"},
+ {"key": "LCA", "value": "Saint Lucia"},
+ {"key": "MAF", "value": "Saint Martin (French part)"},
+ {"key": "SPM", "value": "Saint Pierre and Miquelon"},
+ {"key": "VCT", "value": "Saint Vincent and the Grenadines"},
+ {"key": "WSM", "value": "Samoa"},
+ {"key": "SMR", "value": "San Marino"},
+ {"key": "STP", "value": "Sao Tome and Principe"},
+ {"key": "SAU", "value": "Saudi Arabia"},
+ {"key": "SEN", "value": "Senegal"},
+ {"key": "SRB", "value": "Serbia"},
+ {"key": "SYC", "value": "Seychelles"},
+ {"key": "SLE", "value": "Sierra Leone"},
+ {"key": "SGP", "value": "Singapore"},
+ {"key": "SXM", "value": "Sint Maarten (Dutch part)"},
+ {"key": "SVK", "value": "Slovakia"},
+ {"key": "SVN", "value": "Slovenia"},
+ {"key": "SLB", "value": "Solomon Islands"},
+ {"key": "SOM", "value": "Somalia"},
+ {"key": "ZAF", "value": "South Africa"},
+ {"key": "SGS", "value": "South Georgia and the South Sandwich Islands"},
+ {"key": "SSD", "value": "South Sudan"},
+ {"key": "ESP", "value": "Spain"},
+ {"key": "LKA", "value": "Sri Lanka"},
+ {"key": "SDN", "value": "Sudan"},
+ {"key": "SUR", "value": "Suriname"},
+ {"key": "SJM", "value": "Svalbard and Jan Mayen"},
+ {"key": "SWE", "value": "Sweden"},
+ {"key": "CHE", "value": "Switzerland"},
+ {"key": "SYR", "value": "Syrian Arab Republic"},
+ {"key": "TWN", "value": "Taiwan, Province of China"},
+ {"key": "TJK", "value": "Tajikistan"},
+ {"key": "TZA", "value": "Tanzania, United Republic of"},
+ {"key": "THA", "value": "Thailand"},
+ {"key": "TLS", "value": "Timor-Leste"},
+ {"key": "TGO", "value": "Togo"},
+ {"key": "TKL", "value": "Tokelau"},
+ {"key": "TON", "value": "Tonga"},
+ {"key": "TTO", "value": "Trinidad and Tobago"},
+ {"key": "TUN", "value": "Tunisia"},
+ {"key": "TUR", "value": "Türkiye"},
+ {"key": "TKM", "value": "Turkmenistan"},
+ {"key": "TCA", "value": "Turks and Caicos Islands"},
+ {"key": "TUV", "value": "Tuvalu"},
+ {"key": "UGA", "value": "Uganda"},
+ {"key": "UKR", "value": "Ukraine"},
+ {"key": "ARE", "value": "United Arab Emirates"},
+ {"key": "GBR", "value": "United Kingdom of Great Britain and Northern Ireland"},
+ {"key": "USA", "value": "United States of America"},
+ {"key": "UMI", "value": "United States Minor Outlying Islands"},
+ {"key": "URY", "value": "Uruguay"},
+ {"key": "UZB", "value": "Uzbekistan"},
+ {"key": "VUT", "value": "Vanuatu"},
+ {"key": "VEN", "value": "Venezuela, Bolivarian Republic of"},
+ {"key": "VNM", "value": "Viet Nam"},
+ {"key": "VGB", "value": "Virgin Islands (British)"},
+ {"key": "VIR", "value": "Virgin Islands (U.S.)"},
+ {"key": "WLF", "value": "Wallis and Futuna"},
+ {"key": "ESH", "value": "Western Sahara"},
+ {"key": "YEM", "value": "Yemen"},
+ {"key": "ZMB", "value": "Zambia"},
+ {"key": "ZWE", "value": "Zimbabwe"}
+ ]
+}
diff --git a/app/Libraries/Data/valuesets/death_indicator.json b/app/Libraries/Data/death_indicator.json
similarity index 76%
rename from app/Libraries/Data/valuesets/death_indicator.json
rename to app/Libraries/Data/death_indicator.json
index a49f808..f59d732 100644
--- a/app/Libraries/Data/valuesets/death_indicator.json
+++ b/app/Libraries/Data/death_indicator.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 5,
- "name": "death_indicator",
+{"name": "death_indicator",
"VSName": "Death Indicator",
"VCategory": "System",
"values": [
diff --git a/app/Libraries/Data/valuesets/did_type.json b/app/Libraries/Data/did_type.json
similarity index 84%
rename from app/Libraries/Data/valuesets/did_type.json
rename to app/Libraries/Data/did_type.json
index 65e17f7..adf5a53 100644
--- a/app/Libraries/Data/valuesets/did_type.json
+++ b/app/Libraries/Data/did_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 8,
- "name": "did_type",
+{"name": "did_type",
"VSName": "DID Type",
"VCategory": "System",
"values": [
diff --git a/app/Libraries/Data/valuesets/enable_disable.json b/app/Libraries/Data/enable_disable.json
similarity index 77%
rename from app/Libraries/Data/valuesets/enable_disable.json
rename to app/Libraries/Data/enable_disable.json
index b612359..51734f3 100644
--- a/app/Libraries/Data/valuesets/enable_disable.json
+++ b/app/Libraries/Data/enable_disable.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 2,
- "name": "enable_disable",
+{"name": "enable_disable",
"VSName": "Enable/Disable",
"VCategory": "System",
"values": [
diff --git a/app/Libraries/Data/valuesets/entity_type.json b/app/Libraries/Data/entity_type.json
similarity index 84%
rename from app/Libraries/Data/valuesets/entity_type.json
rename to app/Libraries/Data/entity_type.json
index 081ff58..b0fbd50 100644
--- a/app/Libraries/Data/valuesets/entity_type.json
+++ b/app/Libraries/Data/entity_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 39,
- "name": "entity_type",
+{"name": "entity_type",
"VSName": "Entity Type",
"VCategory": "System",
"values": [
diff --git a/app/Libraries/Data/valuesets/ethnic.json b/app/Libraries/Data/ethnic.json
similarity index 92%
rename from app/Libraries/Data/valuesets/ethnic.json
rename to app/Libraries/Data/ethnic.json
index 40cfdcf..966eaea 100644
--- a/app/Libraries/Data/valuesets/ethnic.json
+++ b/app/Libraries/Data/ethnic.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 32,
- "name": "ethnic",
+{"name": "ethnic",
"VSName": "Ethnic",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/fasting_status.json b/app/Libraries/Data/fasting_status.json
similarity index 81%
rename from app/Libraries/Data/valuesets/fasting_status.json
rename to app/Libraries/Data/fasting_status.json
index f2f0681..f7b3414 100644
--- a/app/Libraries/Data/valuesets/fasting_status.json
+++ b/app/Libraries/Data/fasting_status.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 26,
- "name": "fasting_status",
+{"name": "fasting_status",
"VSName": "Fasting Status",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/formula_language.json b/app/Libraries/Data/formula_language.json
similarity index 84%
rename from app/Libraries/Data/valuesets/formula_language.json
rename to app/Libraries/Data/formula_language.json
index 544d857..b7bce89 100644
--- a/app/Libraries/Data/valuesets/formula_language.json
+++ b/app/Libraries/Data/formula_language.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 29,
- "name": "formula_language",
+{"name": "formula_language",
"VSName": "Formula Language",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/generate_by.json b/app/Libraries/Data/generate_by.json
similarity index 80%
rename from app/Libraries/Data/valuesets/generate_by.json
rename to app/Libraries/Data/generate_by.json
index 77ffca7..a483fba 100644
--- a/app/Libraries/Data/valuesets/generate_by.json
+++ b/app/Libraries/Data/generate_by.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 17,
- "name": "generate_by",
+{"name": "generate_by",
"VSName": "Generate By",
"VCategory": "System",
"values": [
diff --git a/app/Libraries/Data/valuesets/identifier_type.json b/app/Libraries/Data/identifier_type.json
similarity index 88%
rename from app/Libraries/Data/valuesets/identifier_type.json
rename to app/Libraries/Data/identifier_type.json
index b479d30..4d38c15 100644
--- a/app/Libraries/Data/valuesets/identifier_type.json
+++ b/app/Libraries/Data/identifier_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 6,
- "name": "identifier_type",
+{"name": "identifier_type",
"VSName": "Identifier Type",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/location_type.json b/app/Libraries/Data/location_type.json
similarity index 89%
rename from app/Libraries/Data/valuesets/location_type.json
rename to app/Libraries/Data/location_type.json
index 8a179ce..3374b9e 100644
--- a/app/Libraries/Data/valuesets/location_type.json
+++ b/app/Libraries/Data/location_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 12,
- "name": "location_type",
+{"name": "location_type",
"VSName": "Location Type",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/marital_status.json b/app/Libraries/Data/marital_status.json
similarity index 89%
rename from app/Libraries/Data/valuesets/marital_status.json
rename to app/Libraries/Data/marital_status.json
index 0de77e2..582ecc3 100644
--- a/app/Libraries/Data/valuesets/marital_status.json
+++ b/app/Libraries/Data/marital_status.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 4,
- "name": "marital_status",
+{"name": "marital_status",
"VSName": "Marital Status",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/math_sign.json b/app/Libraries/Data/math_sign.json
similarity index 88%
rename from app/Libraries/Data/valuesets/math_sign.json
rename to app/Libraries/Data/math_sign.json
index 8e1af8b..9197639 100644
--- a/app/Libraries/Data/valuesets/math_sign.json
+++ b/app/Libraries/Data/math_sign.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 41,
- "name": "math_sign",
+{"name": "math_sign",
"VSName": "Math Sign",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/numeric_ref_type.json b/app/Libraries/Data/numeric_ref_type.json
similarity index 78%
rename from app/Libraries/Data/valuesets/numeric_ref_type.json
rename to app/Libraries/Data/numeric_ref_type.json
index 3c583ce..4533bc4 100644
--- a/app/Libraries/Data/valuesets/numeric_ref_type.json
+++ b/app/Libraries/Data/numeric_ref_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 46,
- "name": "numeric_ref_type",
+{"name": "numeric_ref_type",
"VSName": "Numeric Reference Type",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/operation.json b/app/Libraries/Data/operation.json
similarity index 87%
rename from app/Libraries/Data/valuesets/operation.json
rename to app/Libraries/Data/operation.json
index 2b738fe..614a59d 100644
--- a/app/Libraries/Data/valuesets/operation.json
+++ b/app/Libraries/Data/operation.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 7,
- "name": "operation",
+{"name": "operation",
"VSName": "Operation (CRUD)",
"VCategory": "System",
"values": [
diff --git a/app/Libraries/Data/valuesets/order_priority.json b/app/Libraries/Data/order_priority.json
similarity index 88%
rename from app/Libraries/Data/valuesets/order_priority.json
rename to app/Libraries/Data/order_priority.json
index a3202f5..0864f8f 100644
--- a/app/Libraries/Data/valuesets/order_priority.json
+++ b/app/Libraries/Data/order_priority.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 10,
- "name": "order_priority",
+{"name": "order_priority",
"VSName": "Order Priority",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/order_status.json b/app/Libraries/Data/order_status.json
similarity index 93%
rename from app/Libraries/Data/valuesets/order_status.json
rename to app/Libraries/Data/order_status.json
index cc0e1a7..9fb4ce2 100644
--- a/app/Libraries/Data/valuesets/order_status.json
+++ b/app/Libraries/Data/order_status.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 11,
- "name": "order_status",
+{"name": "order_status",
"VSName": "Order Status",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/priority.json b/app/Libraries/Data/priority.json
similarity index 89%
rename from app/Libraries/Data/valuesets/priority.json
rename to app/Libraries/Data/priority.json
index 026d0b3..4ed812f 100644
--- a/app/Libraries/Data/valuesets/priority.json
+++ b/app/Libraries/Data/priority.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 10,
- "name": "priority",
+{"name": "priority",
"VSName": "Priority",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/race.json b/app/Libraries/Data/race.json
similarity index 97%
rename from app/Libraries/Data/valuesets/race.json
rename to app/Libraries/Data/race.json
index 8eab480..7dee89a 100644
--- a/app/Libraries/Data/valuesets/race.json
+++ b/app/Libraries/Data/race.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 30,
- "name": "race",
+{"name": "race",
"VSName": "Race (Ethnicity)",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/range_type.json b/app/Libraries/Data/range_type.json
similarity index 86%
rename from app/Libraries/Data/valuesets/range_type.json
rename to app/Libraries/Data/range_type.json
index efd3b9a..8e187d7 100644
--- a/app/Libraries/Data/valuesets/range_type.json
+++ b/app/Libraries/Data/range_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 45,
- "name": "range_type",
+{"name": "range_type",
"VSName": "Range Type",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/reference_type.json b/app/Libraries/Data/reference_type.json
similarity index 77%
rename from app/Libraries/Data/valuesets/reference_type.json
rename to app/Libraries/Data/reference_type.json
index 898cc74..639a3ee 100644
--- a/app/Libraries/Data/valuesets/reference_type.json
+++ b/app/Libraries/Data/reference_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 44,
- "name": "reference_type",
+{"name": "reference_type",
"VSName": "Reference Type",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/religion.json b/app/Libraries/Data/religion.json
similarity index 90%
rename from app/Libraries/Data/valuesets/religion.json
rename to app/Libraries/Data/religion.json
index b373db3..7cf774d 100644
--- a/app/Libraries/Data/valuesets/religion.json
+++ b/app/Libraries/Data/religion.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 31,
- "name": "religion",
+{"name": "religion",
"VSName": "Religion",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/request_status.json b/app/Libraries/Data/request_status.json
similarity index 95%
rename from app/Libraries/Data/valuesets/request_status.json
rename to app/Libraries/Data/request_status.json
index ab48ed9..53cdd52 100644
--- a/app/Libraries/Data/valuesets/request_status.json
+++ b/app/Libraries/Data/request_status.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 20,
- "name": "request_status",
+{"name": "request_status",
"VSName": "Request Status",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/requested_entity.json b/app/Libraries/Data/requested_entity.json
similarity index 83%
rename from app/Libraries/Data/valuesets/requested_entity.json
rename to app/Libraries/Data/requested_entity.json
index ba4d192..9a8f6f1 100644
--- a/app/Libraries/Data/valuesets/requested_entity.json
+++ b/app/Libraries/Data/requested_entity.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 9,
- "name": "requested_entity",
+{"name": "requested_entity",
"VSName": "Requested Entity",
"VCategory": "System",
"values": [
diff --git a/app/Libraries/Data/valuesets/result_status.json b/app/Libraries/Data/result_status.json
similarity index 85%
rename from app/Libraries/Data/valuesets/result_status.json
rename to app/Libraries/Data/result_status.json
index e84fc1e..d1e7895 100644
--- a/app/Libraries/Data/valuesets/result_status.json
+++ b/app/Libraries/Data/result_status.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 99,
- "name": "result_status",
+{"name": "result_status",
"VSName": "Result Status",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/result_type.json b/app/Libraries/Data/result_type.json
similarity index 84%
rename from app/Libraries/Data/valuesets/result_type.json
rename to app/Libraries/Data/result_type.json
index e59f160..d090590 100644
--- a/app/Libraries/Data/valuesets/result_type.json
+++ b/app/Libraries/Data/result_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 43,
- "name": "result_type",
+{"name": "result_type",
"VSName": "Result Type",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/result_unit.json b/app/Libraries/Data/result_unit.json
similarity index 91%
rename from app/Libraries/Data/valuesets/result_unit.json
rename to app/Libraries/Data/result_unit.json
index 9710db7..97d4553 100644
--- a/app/Libraries/Data/valuesets/result_unit.json
+++ b/app/Libraries/Data/result_unit.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 28,
- "name": "result_unit",
+{"name": "result_unit",
"VSName": "Result Unit",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/gender.json b/app/Libraries/Data/sex.json
similarity index 73%
rename from app/Libraries/Data/valuesets/gender.json
rename to app/Libraries/Data/sex.json
index bc3754b..11a3d16 100644
--- a/app/Libraries/Data/valuesets/gender.json
+++ b/app/Libraries/Data/sex.json
@@ -1,7 +1,5 @@
-{
- "VSetID": 3,
- "name": "gender",
- "VSName": "Gender",
+{"name": "sex",
+ "VSName": "Sex",
"VCategory": "User-defined",
"values": [
{"key": "1", "value": "Female"},
diff --git a/app/Libraries/Data/valuesets/site_class.json b/app/Libraries/Data/site_class.json
similarity index 87%
rename from app/Libraries/Data/valuesets/site_class.json
rename to app/Libraries/Data/site_class.json
index 949ba7f..cbe9988 100644
--- a/app/Libraries/Data/valuesets/site_class.json
+++ b/app/Libraries/Data/site_class.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 38,
- "name": "site_class",
+{"name": "site_class",
"VSName": "Site Class",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/site_type.json b/app/Libraries/Data/site_type.json
similarity index 90%
rename from app/Libraries/Data/valuesets/site_type.json
rename to app/Libraries/Data/site_type.json
index 019d8dc..e86ed50 100644
--- a/app/Libraries/Data/valuesets/site_type.json
+++ b/app/Libraries/Data/site_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 37,
- "name": "site_type",
+{"name": "site_type",
"VSName": "Site Type",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/specimen_activity.json b/app/Libraries/Data/specimen_activity.json
similarity index 88%
rename from app/Libraries/Data/valuesets/specimen_activity.json
rename to app/Libraries/Data/specimen_activity.json
index 6fc98be..66aac84 100644
--- a/app/Libraries/Data/valuesets/specimen_activity.json
+++ b/app/Libraries/Data/specimen_activity.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 18,
- "name": "specimen_activity",
+{"name": "specimen_activity",
"VSName": "Specimen Activity",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/specimen_condition.json b/app/Libraries/Data/specimen_condition.json
similarity index 91%
rename from app/Libraries/Data/valuesets/specimen_condition.json
rename to app/Libraries/Data/specimen_condition.json
index 6358077..ec4c31a 100644
--- a/app/Libraries/Data/valuesets/specimen_condition.json
+++ b/app/Libraries/Data/specimen_condition.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 21,
- "name": "specimen_condition",
+{"name": "specimen_condition",
"VSName": "Specimen Condition",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/specimen_role.json b/app/Libraries/Data/specimen_role.json
similarity index 91%
rename from app/Libraries/Data/valuesets/specimen_role.json
rename to app/Libraries/Data/specimen_role.json
index f3b0c0b..98dcd20 100644
--- a/app/Libraries/Data/valuesets/specimen_role.json
+++ b/app/Libraries/Data/specimen_role.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 22,
- "name": "specimen_role",
+{"name": "specimen_role",
"VSName": "Specimen Role",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/specimen_status.json b/app/Libraries/Data/specimen_status.json
similarity index 95%
rename from app/Libraries/Data/valuesets/specimen_status.json
rename to app/Libraries/Data/specimen_status.json
index e3647fc..2f0b3a4 100644
--- a/app/Libraries/Data/valuesets/specimen_status.json
+++ b/app/Libraries/Data/specimen_status.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 20,
- "name": "specimen_status",
+{"name": "specimen_status",
"VSName": "Specimen Status",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/specimen_type.json b/app/Libraries/Data/specimen_type.json
similarity index 94%
rename from app/Libraries/Data/valuesets/specimen_type.json
rename to app/Libraries/Data/specimen_type.json
index a3a97b6..4a391e7 100644
--- a/app/Libraries/Data/valuesets/specimen_type.json
+++ b/app/Libraries/Data/specimen_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 15,
- "name": "specimen_type",
+{"name": "specimen_type",
"VSName": "Specimen Type",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/test_activity.json b/app/Libraries/Data/test_activity.json
similarity index 88%
rename from app/Libraries/Data/valuesets/test_activity.json
rename to app/Libraries/Data/test_activity.json
index 64e1ab7..2af369d 100644
--- a/app/Libraries/Data/valuesets/test_activity.json
+++ b/app/Libraries/Data/test_activity.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 35,
- "name": "test_activity",
+{"name": "test_activity",
"VSName": "Test Activity",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/test_status.json b/app/Libraries/Data/test_status.json
similarity index 87%
rename from app/Libraries/Data/valuesets/test_status.json
rename to app/Libraries/Data/test_status.json
index 19f7af0..df4e306 100644
--- a/app/Libraries/Data/valuesets/test_status.json
+++ b/app/Libraries/Data/test_status.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 99,
- "name": "test_status",
+{"name": "test_status",
"VSName": "Test Status",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/test_type.json b/app/Libraries/Data/test_type.json
similarity index 87%
rename from app/Libraries/Data/valuesets/test_type.json
rename to app/Libraries/Data/test_type.json
index 6dfc543..ed91007 100644
--- a/app/Libraries/Data/valuesets/test_type.json
+++ b/app/Libraries/Data/test_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 27,
- "name": "test_type",
+{"name": "test_type",
"VSName": "Test Type",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/text_ref_type.json b/app/Libraries/Data/text_ref_type.json
similarity index 78%
rename from app/Libraries/Data/valuesets/text_ref_type.json
rename to app/Libraries/Data/text_ref_type.json
index a50d3e6..8b60c70 100644
--- a/app/Libraries/Data/valuesets/text_ref_type.json
+++ b/app/Libraries/Data/text_ref_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 47,
- "name": "text_ref_type",
+{"name": "text_ref_type",
"VSName": "Text Reference Type",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/unit.json b/app/Libraries/Data/unit.json
similarity index 83%
rename from app/Libraries/Data/valuesets/unit.json
rename to app/Libraries/Data/unit.json
index 555497e..c0facfc 100644
--- a/app/Libraries/Data/valuesets/unit.json
+++ b/app/Libraries/Data/unit.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 16,
- "name": "unit",
+{"name": "unit",
"VSName": "Unit",
"VCategory": "User-defined",
"values": [
diff --git a/app/Libraries/Data/valuesets/v_category.json b/app/Libraries/Data/v_category.json
similarity index 78%
rename from app/Libraries/Data/valuesets/v_category.json
rename to app/Libraries/Data/v_category.json
index 6d9f496..c73a107 100644
--- a/app/Libraries/Data/valuesets/v_category.json
+++ b/app/Libraries/Data/v_category.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 42,
- "name": "v_category",
+{"name": "v_category",
"VSName": "VCategory",
"VCategory": "System",
"values": [
diff --git a/app/Libraries/Data/valuesets/_meta.json b/app/Libraries/Data/valuesets/_meta.json
deleted file mode 100644
index c87e8cd..0000000
--- a/app/Libraries/Data/valuesets/_meta.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "version": "1.0.0",
- "generated": "2026-01-12",
- "description": "Value Set Definitions - Static lookup values for CLQMS",
- "valuesets": [
- {"file": "ws_type.json", "VSetID": 1, "VSName": "Workstation Type"},
- {"file": "enable_disable.json", "VSetID": 2, "VSName": "Enable/Disable"},
- {"file": "gender.json", "VSetID": 3, "VSName": "Gender"},
- {"file": "marital_status.json", "VSetID": 4, "VSName": "Marital Status"},
- {"file": "death_indicator.json", "VSetID": 5, "VSName": "Death Indicator"},
- {"file": "identifier_type.json", "VSetID": 6, "VSName": "Identifier Type"},
- {"file": "operation.json", "VSetID": 7, "VSName": "Operation (CRUD)"},
- {"file": "did_type.json", "VSetID": 8, "VSName": "DID Type"},
- {"file": "requested_entity.json", "VSetID": 9, "VSName": "Requested Entity"},
- {"file": "order_priority.json", "VSetID": 10, "VSName": "Order Priority"},
- {"file": "order_status.json", "VSetID": 11, "VSName": "Order Status"},
- {"file": "location_type.json", "VSetID": 12, "VSName": "Location Type"},
- {"file": "additive.json", "VSetID": 13, "VSName": "Additive"},
- {"file": "container_class.json", "VSetID": 14, "VSName": "Container Class"},
- {"file": "specimen_type.json", "VSetID": 15, "VSName": "Specimen Type"},
- {"file": "unit.json", "VSetID": 16, "VSName": "Unit"},
- {"file": "generate_by.json", "VSetID": 17, "VSName": "Generate By"},
- {"file": "specimen_activity.json", "VSetID": 18, "VSName": "Specimen Activity"},
- {"file": "activity_result.json", "VSetID": 19, "VSName": "Activity Result"},
- {"file": "specimen_status.json", "VSetID": 20, "VSName": "Specimen Status"},
- {"file": "specimen_condition.json", "VSetID": 21, "VSName": "Specimen Condition"},
- {"file": "specimen_role.json", "VSetID": 22, "VSName": "Specimen Role"},
- {"file": "collection_method.json", "VSetID": 23, "VSName": "Collection Method"},
- {"file": "body_site.json", "VSetID": 24, "VSName": "Body Site"},
- {"file": "container_size.json", "VSetID": 25, "VSName": "Container Size"},
- {"file": "fasting_status.json", "VSetID": 26, "VSName": "Fasting Status"},
- {"file": "test_type.json", "VSetID": 27, "VSName": "Test Type"},
- {"file": "result_unit.json", "VSetID": 28, "VSName": "Result Unit"},
- {"file": "formula_language.json", "VSetID": 29, "VSName": "Formula Language"},
- {"file": "race.json", "VSetID": 30, "VSName": "Race (Ethnicity)"},
- {"file": "religion.json", "VSetID": 31, "VSName": "Religion"},
- {"file": "ethnic.json", "VSetID": 32, "VSName": "Ethnic"},
- {"file": "country.json", "VSetID": 33, "VSName": "Country"},
- {"file": "container_cap_color.json", "VSetID": 34, "VSName": "Container Cap Color"},
- {"file": "test_activity.json", "VSetID": 35, "VSName": "Test Activity"},
- {"file": "adt_event.json", "VSetID": 36, "VSName": "ADT Event"},
- {"file": "site_type.json", "VSetID": 37, "VSName": "Site Type"},
- {"file": "site_class.json", "VSetID": 38, "VSName": "Site Class"},
- {"file": "entity_type.json", "VSetID": 39, "VSName": "Entity Type"},
- {"file": "area_class.json", "VSetID": 40, "VSName": "Area Class"},
- {"file": "math_sign.json", "VSetID": 41, "VSName": "Math Sign"},
- {"file": "v_category.json", "VSetID": 42, "VSName": "VCategory"},
- {"file": "result_type.json", "VSetID": 43, "VSName": "Result Type"},
- {"file": "reference_type.json", "VSetID": 44, "VSName": "Reference Type"},
- {"file": "range_type.json", "VSetID": 45, "VSName": "Range Type"},
- {"file": "numeric_ref_type.json", "VSetID": 46, "VSName": "Numeric Reference Type"},
- {"file": "text_ref_type.json", "VSetID": 47, "VSName": "Text Reference Type"}
- ]
-}
diff --git a/app/Libraries/Data/valuesets/country.json b/app/Libraries/Data/valuesets/country.json
deleted file mode 100644
index f1b301e..0000000
--- a/app/Libraries/Data/valuesets/country.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "VSetID": 33,
- "name": "country",
- "VSName": "Country",
- "VCategory": "User-defined",
- "values": [
- {"key": "ID", "value": "Indonesia"},
- {"key": "US", "value": "United States"},
- {"key": "MY", "value": "Malaysia"},
- {"key": "SG", "value": "Singapore"},
- {"key": "AU", "value": "Australia"},
- {"key": "JP", "value": "Japan"},
- {"key": "KR", "value": "South Korea"},
- {"key": "CN", "value": "China"},
- {"key": "IN", "value": "India"},
- {"key": "TH", "value": "Thailand"},
- {"key": "PH", "value": "Philippines"},
- {"key": "VN", "value": "Vietnam"},
- {"key": "GB", "value": "United Kingdom"},
- {"key": "DE", "value": "Germany"},
- {"key": "FR", "value": "France"},
- {"key": "NL", "value": "Netherlands"},
- {"key": "CA", "value": "Canada"},
- {"key": "NZ", "value": "New Zealand"}
- ]
-}
diff --git a/app/Libraries/Data/valuesets/ws_type.json b/app/Libraries/Data/ws_type.json
similarity index 80%
rename from app/Libraries/Data/valuesets/ws_type.json
rename to app/Libraries/Data/ws_type.json
index 64bd148..092ba6c 100644
--- a/app/Libraries/Data/valuesets/ws_type.json
+++ b/app/Libraries/Data/ws_type.json
@@ -1,6 +1,4 @@
-{
- "VSetID": 1,
- "name": "ws_type",
+{"name": "ws_type",
"VSName": "Workstation Type",
"VCategory": "System",
"values": [
diff --git a/app/Libraries/Lookups.php b/app/Libraries/Lookups.php
deleted file mode 100644
index ec0b009..0000000
--- a/app/Libraries/Lookups.php
+++ /dev/null
@@ -1,5 +0,0 @@
- import('@/views/Login.vue'),
+ meta: { requiresAuth: false },
+ },
+ {
+ path: '/',
+ component: () => import('@/components/layout/AppLayout.vue'),
+ meta: { requiresAuth: true },
+ children: [
+ {
+ path: '',
+ name: 'Dashboard',
+ component: () => import('@/views/Dashboard.vue'),
+ },
+ {
+ path: 'patients',
+ name: 'PatientIndex',
+ component: () => import('@/views/patient/PatientIndex.vue'),
+ },
+ {
+ path: 'patients/create',
+ name: 'PatientCreate',
+ component: () => import('@/views/patient/PatientCreate.vue'),
+ },
+ {
+ path: 'patients/:id',
+ name: 'PatientEdit',
+ component: () => import('@/views/patient/PatientEdit.vue'),
+ },
+ ],
+ },
+ {
+ path: '/:pathMatch(.*)*',
+ name: 'NotFound',
+ component: () => import('@/views/NotFound.vue'),
+ },
+]
+
+const router = createRouter({
+ history: createWebHistory(),
+ routes,
+})
+
+router.beforeEach((to, _from, next) => {
+ const authStore = useAuthStore()
+
+ if (to.meta.requiresAuth && !authStore.isAuthenticated) {
+ next({ name: 'Login', query: { redirect: to.fullPath } })
+ } else if (to.name === 'Login' && authStore.isAuthenticated) {
+ next({ name: 'Dashboard' })
+ } else {
+ next()
+ }
+})
+
+export default router
+```
+
+#### 2.2.4 API Service Layer
+
+```typescript
+// src/services/api.ts
+import axios, type AxiosInstance, type AxiosError } from 'axios'
+import { useAuthStore } from '@/stores/auth'
+import router from '@/router'
+
+const apiClient: AxiosInstance = axios.create({
+ baseURL: import.meta.env.VITE_API_BASE_URL || '/api',
+ timeout: 30000,
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+})
+
+apiClient.interceptors.request.use((config) => {
+ const authStore = useAuthStore()
+ if (authStore.token) {
+ config.headers.Authorization = `Bearer ${authStore.token}`
+ }
+ return config
+})
+
+apiClient.interceptors.response.use(
+ (response) => response,
+ async (error: AxiosError) => {
+ if (error.response?.status === 401) {
+ const authStore = useAuthStore()
+ authStore.logout()
+ router.push({ name: 'Login' })
+ }
+ return Promise.reject(error)
+ }
+)
+
+export default apiClient
+```
+
+### Phase 3: Authentication (Days 5-6)
+
+#### 2.3.1 Auth Store (Pinia)
+
+```typescript
+// src/stores/auth.ts
+import { defineStore } from 'pinia'
+import { ref, computed } from 'vue'
+import authService from '@/services/authService'
+
+export const useAuthStore = defineStore('auth', () => {
+ const token = ref(localStorage.getItem('auth_token'))
+ const user = ref | null>(null)
+ const loading = ref(false)
+
+ const isAuthenticated = computed(() => !!token.value)
+
+ async function login(credentials: { username: string; password: string }) {
+ loading.value = true
+ try {
+ const response = await authService.login(credentials)
+ token.value = response.data.token
+ user.value = response.data.user
+ localStorage.setItem('auth_token', response.data.token)
+ return { success: true }
+ } catch (error) {
+ return { success: false, error: (error as Error).message }
+ } finally {
+ loading.value = false
+ }
+ }
+
+ function logout() {
+ token.value = null
+ user.value = null
+ localStorage.removeItem('auth_token')
+ }
+
+ return {
+ token,
+ user,
+ loading,
+ isAuthenticated,
+ login,
+ logout,
+ }
+})
+```
+
+#### 2.3.2 Login View with Keyboard Navigation
+
+```vue
+
+
+
+
+
+
+```
+
+### Phase 4: Patient Management Module (Days 7-10)
+
+#### 2.4.1 Patient List with DataTable
+
+```vue
+
+
+
+
+
+
+
Patients
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ new Date(data.DOB).toLocaleDateString() }}
+
+
+
+
+
+
+
+
+
+
+
Keyboard shortcuts:
+
+ - Ctrl+C - Create new patient
+ - Ctrl+F - Focus search
+ - Arrow keys - Navigate between rows
+
+
+
+
+```
+
+### Phase 5: Accessibility Infrastructure (Days 11-12)
+
+#### 2.5.1 Keyboard Shortcut Composable
+
+```typescript
+// src/composables/useKeyboard.ts
+import { onMounted, onUnmounted } from 'vue'
+import { useMagicKeys, whenever } from '@vueuse/core'
+
+interface ShortcutOptions {
+ ctrl?: boolean
+ shift?: boolean
+ alt?: boolean
+ key?: string
+}
+
+export function useKeyboard() {
+ const { ctrl, shift, alt, k, n, f, s, e, escape } = useMagicKeys()
+
+ const shortcuts = new Map void>()
+
+ function add(key: string, callback: () => void, options: ShortcutOptions = {}) {
+ const keyLower = key.toLowerCase()
+ const fullKey = [
+ options.ctrl ? 'ctrl' : '',
+ options.shift ? 'shift' : '',
+ options.alt ? 'alt' : '',
+ keyLower,
+ ]
+ .filter(Boolean)
+ .join('+')
+
+ shortcuts.set(fullKey, callback)
+ }
+
+ function remove(key: string, options: ShortcutOptions = {}) {
+ const keyLower = key.toLowerCase()
+ const fullKey = [
+ options.ctrl ? 'ctrl' : '',
+ options.shift ? 'shift' : '',
+ options.alt ? 'alt' : '',
+ keyLower,
+ ]
+ .filter(Boolean)
+ .join('+')
+
+ shortcuts.delete(fullKey)
+ }
+
+ function execute(event: KeyboardEvent) {
+ const parts = ['ctrl', 'shift', 'alt'].filter((mod) => event[`${mod}Key`])
+ parts.push(event.key.toLowerCase())
+ const fullKey = parts.join('+')
+
+ const callback = shortcuts.get(fullKey)
+ if (callback) {
+ event.preventDefault()
+ callback()
+ }
+ }
+
+ onMounted(() => {
+ window.addEventListener('keydown', execute)
+ })
+
+ onUnmounted(() => {
+ window.removeEventListener('keydown', execute)
+ })
+
+ return {
+ shortcuts: { add, remove },
+ keys: { ctrl, shift, alt, k, n, f, s, e, escape },
+ }
+}
+```
+
+#### 2.5.2 Focus Trap Composable (for Modals/Dialogs)
+
+```typescript
+// src/composables/useFocusTrap.ts
+import { ref, onMounted, onUnmounted } from 'vue'
+import { onKeyStroke } from '@vueuse/core'
+
+export function useFocusTrap(containerRef: Ref, active: Ref) {
+ const focusableElements = ref([])
+ const firstFocusable = ref(null)
+ const lastFocusable = ref(null)
+
+ function updateFocusableElements() {
+ if (!containerRef.value) return
+
+ const focusable = containerRef.value.querySelectorAll(
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
+ )
+ focusableElements.value = Array.from(focusable)
+
+ firstFocusable.value = focusableElements.value[0] || null
+ lastFocusable.value = focusableElements.value[focusableElements.value.length - 1] || null
+ }
+
+ function focusFirst() {
+ firstFocusable.value?.focus()
+ }
+
+ function handleTab(event: KeyboardEvent) {
+ if (!active.value || !containerRef.value) return
+
+ if (event.shiftKey) {
+ if (document.activeElement === firstFocusable.value) {
+ event.preventDefault()
+ lastFocusable.value?.focus()
+ }
+ } else {
+ if (document.activeElement === lastFocusable.value) {
+ event.preventDefault()
+ firstFocusable.value?.focus()
+ }
+ }
+ }
+
+ function handleEscape() {
+ if (active.value) {
+ active.value = false
+ }
+ }
+
+ onMounted(() => {
+ updateFocusableElements()
+ })
+
+ onKeyStroke('Tab', handleTab, { target: containerRef })
+ onKeyStroke('Escape', handleEscape, { target: containerRef })
+
+ return {
+ updateFocusableElements,
+ focusFirst,
+ }
+}
+```
+
+### Phase 6: Layout Components (Days 13-14)
+
+#### 2.6.1 App Layout with Sidebar
+
+```vue
+
+
+
+
+
+
+```
+
+### Phase 7: Migration from Alpine.js (Days 15-18)
+
+#### 2.7.1 Migration Strategy
+
+1. **Parallel Development**: Keep Alpine.js version running alongside Vue
+2. **Incremental Migration**: Migrate one view at a time
+3. **Shared API**: Both frontends use the same CodeIgniter API
+4. **Routing Switch**: Routes point to Vue app for migrated views
+5. **Feature Flags**: Use feature flags to control which views use Vue
+
+#### 2.7.2 Shared Constants/Types
+
+```typescript
+// src/types/api.ts
+export interface ApiResponse {
+ status: 'success' | 'error'
+ message: string
+ data: T
+}
+
+export interface Patient {
+ InternalPID: number
+ PatientID: string
+ FirstName: string
+ LastName: string
+ FullName: string
+ Sex: string
+ DOB: string
+ EmailAddress?: string
+ Phone?: string
+ [key: string]: unknown
+}
+```
+
+### Phase 8: Testing (Days 19-20)
+
+#### 2.8.1 Testing Stack
+
+```bash
+# Unit and Component Testing
+npm install -D vitest @vue/test-utils happy-dom @testing-library/jest-dom
+
+# E2E Testing
+npm install -D cypress
+```
+
+#### 2.8.2 Example Component Test
+
+```typescript
+// src/components/__tests__/PatientList.spec.ts
+import { describe, it, expect, vi, beforeEach } from 'vitest'
+import { mount } from '@vue/test-utils'
+import PatientIndex from '@/views/patient/PatientIndex.vue'
+import { createTestingPinia } from '@pinia/testing'
+
+describe('PatientIndex', () => {
+ beforeEach(() => {
+ vi.resetAllMocks()
+ })
+
+ it('renders patient list', async () => {
+ const wrapper = mount(PatientIndex, {
+ global: {
+ plugins: [
+ createTestingPinia({
+ createSpy: vi.fn,
+ initialState: {
+ patient: {
+ patients: [
+ { InternalPID: 1, PatientID: 'P001', FullName: 'John Doe' },
+ ],
+ totalRecords: 1,
+ },
+ },
+ }),
+ ],
+ stubs: {
+ DataTable: {
+ template: '
',
+ },
+ },
+ },
+ })
+
+ expect(wrapper.text()).toContain('Patients')
+ })
+})
+```
+
+---
+
+## 3. Environment Configuration
+
+### 3.1 Environment Variables (.env)
+
+```env
+# API Configuration
+VITE_API_BASE_URL=http://localhost:8080/api
+
+# App Configuration
+VITE_APP_TITLE=CLQMS
+VITE_APP_VERSION=1.0.0
+
+# Feature Flags
+VITE_ENABLE_MOCK_API=false
+```
+
+### 3.2 API Endpoints Integration
+
+| Endpoint | Method | Description |
+|----------|--------|-------------|
+| `/auth/login` | POST | User authentication |
+| `/auth/logout` | POST | User logout |
+| `/patients` | GET | List patients with filters |
+| `/patients` | POST | Create new patient |
+| `/patients/:id` | GET | Get patient details |
+| `/patients/:id` | PUT | Update patient |
+| `/patients/:id` | DELETE | Soft delete patient |
+
+---
+
+## 4. Keyboard Accessibility Standards
+
+### 4.1 Required Keyboard Interactions
+
+| Component | Keyboard Behavior |
+|-----------|------------------|
+| **Modals/Dialogs** | Focus trap, Escape to close, Tab cycles focus |
+| **Menus** | Arrow keys navigate, Enter selects, Escape closes |
+| **Data Tables** | Arrow keys row/col, Ctrl+Arrow scroll |
+| **Forms** | Auto-focus first field, Tab order preserved |
+| **Shortcuts** | Ctrl+Key global, prevent default browser shortcuts |
+| **Skip Links** | Skip to main content, skip to navigation |
+
+### 4.2 Global Keyboard Shortcuts
+
+| Shortcut | Action |
+|----------|--------|
+| Ctrl+C | Create new record |
+| Ctrl+F | Focus search |
+| Ctrl+S | Save form |
+| Ctrl+N | New form |
+| Ctrl+E | Edit selected |
+| Ctrl+D | Duplicate |
+| Ctrl+Z | Undo |
+| Ctrl+Shift+Z | Redo |
+| Escape | Cancel/Close modal |
+| Tab | Move to next focusable |
+| Shift+Tab | Move to previous focusable |
+
+### 4.3 ARIA Attributes Required
+
+```html
+
+
+
+Main content area
+
+
+
+
+
+
+
+
+
+```
+
+---
+
+## 5. Implementation Checklist
+
+### Week 1
+- [ ] Initialize Vue 3 project with Vite
+- [ ] Configure TypeScript and build settings
+- [ ] Set up Pinia store structure
+- [ ] Configure Vue Router with auth guards
+- [ ] Implement API service layer with Axios
+- [ ] Create authentication flow (login/logout)
+- [ ] Set up PrimeVue theming
+
+### Week 2
+- [ ] Build main layout (header, sidebar, content)
+- [ ] Create Patient List view with DataTable
+- [ ] Create Patient Create/Edit forms
+- [ ] Implement search and filtering
+- [ ] Add pagination
+- [ ] Create global keyboard shortcuts
+- [ ] Implement focus trap for modals
+
+### Week 3
+- [ ] Migrate additional domain modules
+- [ ] Add Toast/Notification system
+- [ ] Implement form validation
+- [ ] Add loading states
+- [ ] Create error handling
+- [ ] Implement optimistic UI updates
+- [ ] Add keyboard navigation for DataTable
+
+### Week 4
+- [ ] Write unit tests (Vitest)
+- [ ] Write component tests (Vue Test Utils)
+- [ ] Set up E2E tests (Cypress)
+- [ ] Accessibility audit (axe-core)
+- [ ] Performance optimization
+- [ ] Build and deployment setup
+- [ ] Documentation
+
+---
+
+## 6. Estimated Timeline
+
+| Phase | Duration | Total Days |
+|-------|----------|------------|
+| Phase 1: Project Setup | 2 days | Day 1-2 |
+| Phase 2: Core Infrastructure | 2 days | Day 3-4 |
+| Phase 3: Authentication | 2 days | Day 5-6 |
+| Phase 4: Patient Module | 4 days | Day 7-10 |
+| Phase 5: Accessibility | 2 days | Day 11-12 |
+| Phase 6: Layout Components | 2 days | Day 13-14 |
+| Phase 7: Migration | 4 days | Day 15-18 |
+| Phase 8: Testing | 2 days | Day 19-20 |
+
+**Total: 20 working days (4 weeks)**
+
+---
+
+## 7. Rollback Plan
+
+If Vue migration encounters issues:
+
+1. **Feature Flag Rollback**: Routes can be switched back to Alpine.js views
+2. **Database Changes**: None required (shared API)
+3. **API Compatibility**: Both frontends use identical API contracts
+4. **Deployment**: Can deploy Alpine.js version independently
+
+---
+
+## 8. References
+
+- [Vue 3 Documentation](https://vuejs.org/)
+- [PrimeVue 4 Documentation](https://primevue.org/)
+- [VueUse Documentation](https://vueuse.org/)
+- [Headless UI Documentation](https://headlessui.com/)
+- [WAI-ARIA Practices](https://www.w3.org/WAI/ARIA/apg/)
+- [WCAG 2.1 Guidelines](https://www.w3.org/WAI/WCAG21/quickref/)
+
+---
+
+## 9. Next Steps
+
+1. Review and approve this plan
+2. Confirm development environment (Node.js version, package manager)
+3. Set up Git repository for frontend
+4. Begin Phase 1: Project Setup
diff --git a/docs/prj_clinical laboratory quality management system_3a.docx b/docs/prj_clinical laboratory quality management system_3a.docx
deleted file mode 100644
index af41ddc..0000000
Binary files a/docs/prj_clinical laboratory quality management system_3a.docx and /dev/null differ