diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 915cf0d..12a7e98 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -55,14 +55,14 @@ $routes->post('/api/location', 'Location::create'); $routes->patch('/api/location/(:num)', 'Location::update/$1'); $routes->delete('/api/location/(:num)', 'Patient::delete/$1'); -$routes->get('/api/codedtext', 'CodedText::index'); -$routes->get('/api/codedtext/(:num)', 'CodedText::show/$1'); -$routes->post('/api/codedtext', 'CodedText::create'); -$routes->patch('/api/codedtext/(:num)', 'CodedText::update/$1'); -$routes->delete('/api/codedtext/(:num)', 'CodedText::delete/$1'); +$routes->get('/api/valueset', 'ValueSet::index'); +$routes->get('/api/valueset/(:num)', 'ValueSet::show/$1'); +$routes->post('/api/valueset', 'ValueSet::create'); +$routes->patch('/api/valueset/(:num)', 'ValueSet::update/$1'); +$routes->delete('/api/valueset/(:num)', 'ValueSet::delete/$1'); -$routes->get('/api/codedtextfield/', 'CodedTextField::index'); -$routes->get('/api/codedtextfield/(:num)', 'CodedTextField::show/$1'); -$routes->post('/api/codedtextfield', 'CodedTextField::create'); -$routes->patch('/api/codedtextfield/(:num)', 'CodedTextField::update/$1'); -$routes->delete('/api/codedtextfield/(:num)', 'CodedTextField::delete/$1'); \ No newline at end of file +$routes->get('/api/valuesetfield/', 'ValueSetField::index'); +$routes->get('/api/valuesetfield/(:num)', 'ValueSetField::show/$1'); +$routes->post('/api/valuesetfield', 'ValueSetField::create'); +$routes->patch('/api/valuesetfield/(:num)', 'ValueSetField::update/$1'); +$routes->delete('/api/valuesetfield/(:num)', 'ValueSetField::delete/$1'); \ No newline at end of file diff --git a/app/Controllers/CodedText.php b/app/Controllers/ValueSet.php similarity index 76% rename from app/Controllers/CodedText.php rename to app/Controllers/ValueSet.php index 078fd79..95ad32d 100644 --- a/app/Controllers/CodedText.php +++ b/app/Controllers/ValueSet.php @@ -5,15 +5,15 @@ use CodeIgniter\API\ResponseTrait; use CodeIgniter\Controller; use CodeIgniter\Database\RawSql; -class CodedText extends Controller { +class ValueSet extends Controller { use ResponseTrait; public function __construct() { $this->db = \Config\Database::connect(); $this->now = date('Y-m-d H:i:s'); $this->rules = [ - 'CTGroup' => 'required', - 'CT' => 'required', + 'VSet' => 'required', + 'VValue' => 'required', ]; } @@ -32,28 +32,28 @@ class CodedText extends Controller { return $this->respond([ 'status' => 'success', - 'message'=> "Code Text fetched successfully", + 'message'=> "Value Set fetched successfully", 'data' => $rows, ], 200); } - public function show($CTID = null) { - $rows = $this->db->table('codedtxt') + public function show($VID = null) { + $rows = $this->db->table('valueset') ->select("*") - ->where('CTID', (int) $CTID) + ->where('VID', (int) $VID) ->get()->getResultArray(); if (empty($rows)) { return $this->respond([ 'status' => 'success', - 'message' => "CodeText with ID $CTID not found.", + 'message' => "ValueSet with ID $VID not found.", 'data' => [], ], 200); } return $this->respond([ 'status' => 'success', - 'message'=> "CodeText fetched successfully", + 'message'=> "Data fetched successfully", 'data' => $rows, ], 200); } @@ -74,7 +74,7 @@ class CodedText extends Controller { $this->db->transStart(); // Insert - $this->db->table('codedtxt')->insert($data); + $this->db->table('valueset')->insert($data); // Complete transaction $this->db->transComplete(); @@ -101,7 +101,7 @@ class CodedText extends Controller { } } - public function update($CTID = null) { + public function update($VID = null) { try { $input = $this->request->getJSON(true); $now = $this->now; @@ -116,7 +116,7 @@ class CodedText extends Controller { $this->db->transStart(); // Insert location - $this->db->table('codedtxt')->where('CTID', $CTID)->update($data); + $this->db->table('valueset')->where('VID', $VID)->update($data); // Complete transaction $this->db->transComplete(); @@ -143,22 +143,22 @@ class CodedText extends Controller { } } - public function delete($CTID = null) { + public function delete($VID = null) { try { - if (!$CTID) { - return $this->failValidationErrors('CTID is required.'); + if (!$VID) { + return $this->failValidationErrors('VID is required.'); } - $codedtxt = $this->db->table('codedtxt')->where('CTID', $CTID)->get()->getRow(); - if (!$codedtxt) { - return $this->failNotFound("CTID with {$CTID} not found."); + $valueset = $this->db->table('valuset')->where('VID', $VID)->get()->getRow(); + if (!$valueset) { + return $this->failNotFound("VID with {$VID} not found."); } - $this->db->table('codedtxt')->where('CTID', $CTID)->update(['EndDate' => $this->now ]); + $this->db->table('codedtxt')->where('VID', $VID)->update(['EndDate' => $this->now ]); return $this->respondDeleted([ 'status' => 'success', - 'message' => "CodedTxt with ID {$CTID} deleted successfully." + 'message' => "Data with ID {$VID} deleted successfully." ]); } catch (\Throwable $e) { @@ -172,11 +172,11 @@ class CodedText extends Controller { private function prepareData(array $input, string $now, string $mode = 'create'): array { $data = [ - "CTGroup" => $input['CTGroup'] ?? null, - "CT" => $input['CT'] ?? null, - "Description" => $input['Description'] ?? null, - "FontStyle" => $input['FontStyle'] ?? null, - "Category" => $input['Category'] ?? null + "VSet" => $input['VSet'] ?? null, + "VOrder" => $input['VOrder'] ?? null, + "VValue" => $input['VValue'] ?? null, + "VDesc" => $input['VDesc'] ?? null, + "VCategory" => $input['VCategory'] ?? null ]; if ($mode === 'create') { diff --git a/app/Controllers/CodedTextField.php b/app/Controllers/ValueSetField.php similarity index 76% rename from app/Controllers/CodedTextField.php rename to app/Controllers/ValueSetField.php index fa580ed..11eec20 100644 --- a/app/Controllers/CodedTextField.php +++ b/app/Controllers/ValueSetField.php @@ -5,21 +5,21 @@ use CodeIgniter\API\ResponseTrait; use CodeIgniter\Controller; use CodeIgniter\Database\RawSql; -class CodedTextField extends Controller { +class ValueSetField extends Controller { use ResponseTrait; public function __construct() { $this->db = \Config\Database::connect(); $this->now = date('Y-m-d H:i:s'); $this->rules = [ - 'TblName' => 'required', - 'FldName' => 'required', - 'CTGroup' => 'required' + 'VSet' => 'required', + 'VSName' => 'required', + 'VSDesc' => 'required' ]; } public function index() { - $rows = $this->db->table('codedtxtfld') + $rows = $this->db->table('valuesetfld') ->select("*") ->get()->getResultArray(); @@ -33,28 +33,28 @@ class CodedTextField extends Controller { return $this->respond([ 'status' => 'success', - 'message'=> "CTF fetched successfully", + 'message'=> "Data fetched successfully", 'data' => $rows, ], 200); } - public function show($CTFldID = null) { - $rows = $this->db->table('codedtxtfld') + public function show($VSFldID = null) { + $rows = $this->db->table('valuesetfld') ->select("*") - ->where('CTFldID', (int) $CTFldID) + ->where('VSFldID', (int) $VSFldID) ->get()->getResultArray(); if (empty($rows)) { return $this->respond([ 'status' => 'success', - 'message' => "CTFld with ID $CTFldID not found.", + 'message' => "data with ID $VSFldID not found.", 'data' => [], ], 200); } return $this->respond([ 'status' => 'success', - 'message'=> "CodeText fetched successfully", + 'message'=> "Data fetched successfully", 'data' => $rows, ], 200); } @@ -74,7 +74,7 @@ class CodedTextField extends Controller { $this->db->transStart(); // Insert - $this->db->table('codedtxtfld')->insert($data); + $this->db->table('valuesetfld')->insert($data); // Complete transaction $this->db->transComplete(); @@ -101,7 +101,7 @@ class CodedTextField extends Controller { } } - public function update($CTFldID = null) { + public function update($VSFldID = null) { try { $input = $this->request->getJSON(true); $now = $this->now; @@ -116,7 +116,7 @@ class CodedTextField extends Controller { $this->db->transStart(); // Insert location - $this->db->table('codedtxtfld')->where('CTFldID', $CTFldID)->update($data); + $this->db->table('valuesetfld')->where('VSFldID', $VSFldID)->update($data); // Complete transaction $this->db->transComplete(); @@ -143,22 +143,22 @@ class CodedTextField extends Controller { } } - public function delete($CTFldID = null) { + public function delete($VSFldID = null) { try { - if (!$CTFldID) { - return $this->failValidationErrors('CTFldID is required.'); + if (!$VSFldID) { + return $this->failValidationErrors('VSFldID is required.'); } - $codedtxtfld = $this->db->table('codedtxtfld')->where('CTFldID', $CTFldID)->get()->getRow(); - if (!$codedtxtfld) { - return $this->failNotFound("CTFld with {$CTFldID} not found."); + $valuesetfld = $this->db->table('valuesetfld')->where('VSFldID', $VSFldID)->get()->getRow(); + if (!$valuesetfld) { + return $this->failNotFound("Data with {$VSFldID} not found."); } - $this->db->table('codedtxtfld')->where('CTFldID', $CTFldID)->update(['EndDate' => $this->now]); + $this->db->table('valuesetfld')->where('VSFldID', $VSFldID)->update(['EndDate' => $this->now]); return $this->respondDeleted([ 'status' => 'success', - 'message' => "CodedTxtFld with {$CTFldID} deleted successfully." + 'message' => "data with {$VSFldID} deleted successfully." ]); } catch (\Throwable $e) { @@ -172,9 +172,9 @@ class CodedTextField extends Controller { private function prepareData(array $input, string $now, string $mode = 'create'): array { $data = [ - "CTGroup" => $input['CTGroup'] ?? null, - "FldName" => $input['FldName'] ?? null, - "TblName" => $input['TblName'] ?? null + "Vset" => $input['VSet'] ?? null, + "VSName" => $input['VSName'] ?? null, + "VSDesc" => $input['VSDesc'] ?? null ]; if ($mode === 'create') { diff --git a/app/Database/Migrations/2025-09-11-130122_Coded_Text.php b/app/Database/Migrations/2025-09-11-130122_Coded_Text.php deleted file mode 100644 index c94bb84..0000000 --- a/app/Database/Migrations/2025-09-11-130122_Coded_Text.php +++ /dev/null @@ -1,41 +0,0 @@ -forge->addField([ - 'CTID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], - 'SiteID' => ['type' => 'INT', 'null' => true], - 'CTGroup' => ['type' => 'INT', 'null' => true], - 'CT' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => false], - 'Description' => ['type' => 'varchar', 'constraint' => 255, 'null' => true], - 'FontStyle' => ['type' => 'int', 'null' => true], - 'Category' => ['type' => 'int', 'null' => true], - 'CreateDate' => ['type' => 'DATETIME', 'null' => true], - 'EndDate' => ['type' => 'DATETIME', 'null' => true] - ]); - $this->forge->addKey('CTID', true); - $this->forge->createTable('codedtxt'); - - $this->forge->addField([ - 'CTFldID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], - 'SiteID' => ['type' => 'INT', 'null' => true], - 'TblName' => ['type' => 'Varchar', 'constraint' => 255, 'null' => true], - 'FldName' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => false], - 'CTGroup' => ['type' => 'INT', 'null' => true], - 'CreateDate' => ['type' => 'DATETIME', 'null' => true], - 'EndDate' => ['type' => 'DATETIME', 'null' => true] - ]); - $this->forge->addKey('CTFldID', true); - $this->forge->createTable('codedtxtfld'); - } - - public function down() { - $this->forge->dropTable('codedtxt'); - $this->forge->dropTable('codedtxtfld'); - } -} \ No newline at end of file diff --git a/app/Database/Migrations/2025-09-15-130122_ValueSet.php b/app/Database/Migrations/2025-09-15-130122_ValueSet.php new file mode 100644 index 0000000..6c8d50b --- /dev/null +++ b/app/Database/Migrations/2025-09-15-130122_ValueSet.php @@ -0,0 +1,42 @@ +forge->addField([ + 'VID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], + 'SiteID' => ['type' => 'INT', 'null' => true], + 'VSet' => ['type' => 'INT', 'null' => true], + 'VOrder' => ['type' => 'INT', 'null' => true], + 'VValue' => ['type' => 'varchar', ''], + '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([ + 'VSFldID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], + 'SiteID' => ['type' => 'INT', 'null' => true], + 'VSet' => ['type' => 'INT', 'null' => false], + '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('VSFldID', true); + $this->forge->createTable('valuesetfld'); + } + + public function down() { + $this->forge->dropTable('valueset'); + $this->forge->dropTable('valuesetfld'); + } + +} \ No newline at end of file diff --git a/app/Database/Seeds/CodedTxtSeeder.php b/app/Database/Seeds/CodedTxtSeeder.php deleted file mode 100644 index b610b2b..0000000 --- a/app/Database/Seeds/CodedTxtSeeder.php +++ /dev/null @@ -1,94 +0,0 @@ - 1,'CTGroup' => 1, 'CT' =>'0', 'Description' => 'Primary', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 2,'CTGroup' => 1, 'CT' =>'1', 'Description' => 'Secondary', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 3,'CTGroup' => 2, 'CT' =>'0', 'Description' => 'Disabled', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 4,'CTGroup' => 2, 'CT' =>'1', 'Description' => 'Enabled', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 5,'CTGroup' => 3, 'CT' =>'1', 'Description' => 'Female', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 6,'CTGroup' => 3, 'CT' =>'2', 'Description' => 'Male', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 7,'CTGroup' => 3, 'CT' =>'3', 'Description' => 'Unknown', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 8,'CTGroup' => 4, 'CT' =>'A', 'Description' => 'Separated', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 9,'CTGroup' => 4, 'CT' =>'D', 'Description' => 'Divorced', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 10,'CTGroup' => 4, 'CT' =>'M', 'Description' => 'Married', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 11,'CTGroup' => 4, 'CT' =>'S', 'Description' => 'Single', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 12,'CTGroup' => 4, 'CT' =>'W', 'Description' => 'Widowed', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 13,'CTGroup' => 4, 'CT' =>'B', 'Description' => 'Unmarried', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 14,'CTGroup' => 4, 'CT' =>'U', 'Description' => 'Unknown', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 15,'CTGroup' => 4, 'CT' =>'O', 'Description' => 'Other', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 16,'CTGroup' => 5, 'CT' =>'Y', 'Description' => 'Death', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 17,'CTGroup' => 5, 'CT' =>'N', 'Description' => 'Life', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 18,'CTGroup' => 6, 'CT' =>'KTP', 'Description' => 'Kartu Tanda Penduduk', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 19,'CTGroup' => 6, 'CT' =>'PASS', 'Description' => 'Passport', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 20,'CTGroup' => 6, 'CT' =>'SSN', 'Description' => 'Social Security Number', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 21,'CTGroup' => 6, 'CT' =>'SIM', 'Description' => 'Surat Izin Mengemudi', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 22,'CTGroup' => 6, 'CT' =>'KTAS', 'Description' => 'Kartu Izin Tinggal Terbatas', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 23,'CTGroup' => 7, 'CT' =>'Create', 'Description' => 'create record', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 24,'CTGroup' => 7, 'CT' =>'Read', 'Description' => 'read record/field', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 25,'CTGroup' => 7, 'CT' =>'Update', 'Description' => 'update record/field', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 26,'CTGroup' => 7, 'CT' =>'Delete', 'Description' => 'delete record/field', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 27,'CTGroup' => 8, 'CT' =>'WDID', 'Description' => 'Windows Device ID', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 28,'CTGroup' => 8, 'CT' =>'AAID', 'Description' => 'Android AAID', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 29,'CTGroup' => 8, 'CT' =>'IDFA', 'Description' => 'IOS IDFA', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 30,'CTGroup' => 9, 'CT' =>'PAT', 'Description' => 'Patient', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 31,'CTGroup' => 9, 'CT' =>'ISN', 'Description' => 'Insurance', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 32,'CTGroup' => 9, 'CT' =>'ACC', 'Description' => 'Account', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 33,'CTGroup' => 9, 'CT' =>'DOC', 'Description' => 'Doctor', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 34,'CTGroup' => 10, 'CT' =>'S', 'Description' => 'Stat', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 35,'CTGroup' => 10, 'CT' =>'A', 'Description' => 'ASAP', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 36,'CTGroup' => 10, 'CT' =>'R', 'Description' => 'Routine', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 37,'CTGroup' => 10, 'CT' =>'P', 'Description' => 'Preop', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 38,'CTGroup' => 10, 'CT' =>'C', 'Description' => 'Callback', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 39,'CTGroup' => 10, 'CT' =>'T', 'Description' => 'Timing critical', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 40,'CTGroup' => 10, 'CT' =>'PRN', 'Description' => 'As needed', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 41,'CTGroup' => 11, 'CT' =>'A', 'Description' => 'Some, not all results available', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 42,'CTGroup' => 11, 'CT' =>'CA', 'Description' => 'Order is cancelled', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 43,'CTGroup' => 11, 'CT' =>'CM', 'Description' => 'Order is completed', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 44,'CTGroup' => 11, 'CT' =>'DC', 'Description' => 'Order was discontinued', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 45,'CTGroup' => 11, 'CT' =>'ER', 'Description' => 'Error, order not found', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 46,'CTGroup' => 11, 'CT' =>'HD', 'Description' => 'Order “on hold”', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 47,'CTGroup' => 11, 'CT' =>'IP', 'Description' => 'In process, unspecified', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 48,'CTGroup' => 11, 'CT' =>'RP', 'Description' => 'Order has been replaced', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 49,'CTGroup' => 11, 'CT' =>'SC', 'Description' => 'In process, scheduled', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 50,'CTGroup' => 11, 'CT' =>'CL', 'Description' => 'Closed', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 51,'CTGroup' => 11, 'CT' =>'AC', 'Description' => 'Archived', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 52,'CTGroup' => 11, 'CT' =>'DL', 'Description' => 'Deleted', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 53,'CTGroup' => 12, 'CT' =>'FCLT', 'Description' => 'Facility. Organisasi atau lembaga tempat layanan disediakan, atau gedung tertentu dalam organisasi', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 54,'CTGroup' => 12, 'CT' =>'BLDG', 'Description' => 'Building. Gedung', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 55,'CTGroup' => 12, 'CT' =>'FLOR', 'Description' => 'Floor. Lantai dari gedung', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 56,'CTGroup' => 12, 'CT' =>'POC', 'Description' => 'Point of Care', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 57,'CTGroup' => 12, 'CT' =>'ROOM', 'Description' => 'Room. Ruangan dalam Gedung-lantai', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 58,'CTGroup' => 12, 'CT' =>'BED', 'Description' => 'Bed. Tempat tidur pasien', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 59,'CTGroup' => 12, 'CT' =>'MOBL', 'Description' => 'Mobile. Lokasi bergerak, ditandai dengan koordinat GPS, lokasi sementara, atau deskripsi lokasi unit bergerak saat ini.', 'FontStyle' => '0', 'Category' => '0'], - ['CTID' => 60,'CTGroup' => 12, 'CT' =>'REMT', 'Description' => 'Remote. Lokasi di luar lokasi utama', 'FontStyle' => '0', 'Category' => '0'] - ]; - $this->db->table('codedtxt')->insertBatch($data); - - // locationAddress - $data = [ - ['CTFldID' => 1,'TblName' =>'workstation', 'FldName' => 'Type', 'CTGroup' => '1'], - ['CTFldID' => 2,'TblName' =>'workstation', 'FldName' => 'Enable', 'CTGroup' => '2'], - ['CTFldID' => 3,'TblName' =>'patient', 'FldName' => 'Gender', 'CTGroup' => '3'], - ['CTFldID' => 4,'TblName' =>'patient', 'FldName' => 'MaritalStatus', 'CTGroup' => '4'], - ['CTFldID' => 5,'TblName' =>'patient', 'FldName' => 'DeathIndicator', 'CTGroup' => '5'], - ['CTFldID' => 6,'TblName' =>'patidt', 'FldName' => 'IdentifierType', 'CTGroup' => '6'], - ['CTFldID' => 7,'TblName' =>'patreglog', 'FldName' => 'Operation', 'CTGroup' => '7'], - ['CTFldID' => 8,'TblName' =>'patreglog', 'FldName' => 'DIDType', 'CTGroup' => '8'], - ['CTFldID' => 9,'TblName' =>'patvisitlog', 'FldName' => 'Operation', 'CTGroup' => '7'], - ['CTFldID' => 10,'TblName' =>'patvisitlog', 'FldName' => 'DIDType', 'CTGroup' => '8'], - ['CTFldID' => 11,'TblName' =>'order', 'FldName' => 'ReqEntity', 'CTGroup' => '9'], - ['CTFldID' => 12,'TblName' =>'order', 'FldName' => 'Priority', 'CTGroup' => '10'], - ['CTFldID' => 13,'TblName' =>'orderststatus', 'FldName' => 'OrderStatus', 'CTGroup' => '11'], - ['CTFldID' => 14,'TblName' =>'orderlog', 'FldName' => 'Operation', 'CTGroup' => '7'], - ['CTFldID' => 15,'TblName' =>'location', 'FldName' => 'LocationType', 'CTGroup' => '12'], - ]; - $this->db->table('codedtxtfld')->insertBatch($data); - } -} \ No newline at end of file