change vsfieldid to vsetid

This commit is contained in:
mahdahar 2025-09-17 15:50:55 +07:00
parent 23db830fe7
commit 1351b8c99f
11 changed files with 495 additions and 321 deletions

View File

@ -165,11 +165,11 @@ class Database extends Config
public array $tests = [
'DSN' => '',
'hostname' => '127.0.0.1',
'username' => '',
'password' => '',
'database' => ':memory:',
'DBDriver' => 'SQLite3',
'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
'username' => 'test_user',
'password' => 'test_pass',
'database' => 'tests',
'DBDriver' => 'MySQLi',
'DBPrefix' => '', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
'pConnect' => false,
'DBDebug' => true,
'charset' => 'utf8',

225
app/Controllers/Contact.php Normal file
View File

@ -0,0 +1,225 @@
<?php
namespace App\Controllers;
use CodeIgniter\API\ResponseTrait;
use CodeIgniter\Controller;
use CodeIgniter\Database\RawSql;
class Contact extends Controller {
use ResponseTrait;
public function __construct() {
$this->db = \Config\Database::connect();
$this->rulesContact = [
'NameFirst' => 'required'
];
}
public function index() {
$rows = $this->db->table('contact')
->select("contact.*, contactdetail.ContactEmail, contactdetail.JobTitle, contactdetail.Department, occupation.AbbTex, occupation.FullText, occupation.Description")
->join("contactdetail", "contact.ContactID=contactdetail.ContactID")
->join("occupation","occupation.OccupationID=contactdetail.OccupationID")
->get()->getRowArray();
if (empty($rows)) {
return $this->respond([
'status' => 'success',
'message' => "no Data.",
'data' => [],
], 200);
}
return $this->respond([
'status' => 'success',
'message'=> "fetch success",
'data' => $rows,
], 200);
}
public function show($ContactID = null) {
$row=$this->db->table('contact')
->select("contact.*, contactdetail.ContactEmail, contactdetail.JobTitle, contactdetail.Department, occupation.AbbTex, occupation.FullText, occupation.Description")
->join("contactdetail", "contact.ContactID=contactdetail.ContactID")
->join("occupation","occupation.OccupationID=contactdetail.OccupationID")
->where('contact.ContactID', (int) $ContactID)
->get()->getRowArray();
if (empty($rows)) {
return $this->respond([
'status' => 'success',
'message' => "Data not found.",
'data' => [],
], 200);
}
return $this->respond([
'status' => 'success',
'message'=> "Data fetched successfully",
'data' => $rows,
], 200);
}
public function create() {
try {
$input = $this->request->getJSON(true);
// Prepare data
$dataLocation = $this->prepareLocationData($input);
$dataLocationAddress = $this->prepareLocationAddressData($input);
if (!$this->validateData($dataLocation, $this->rules)) {
return $this->failValidationErrors($this->validator->getErrors());
}
// Start transaction
$this->db->transStart();
// Insert location
$this->db->table('location')->insert($dataLocation);
$newLocationID = $this->db->insertID();
// Insert address if available
if (!empty($dataLocationAddress)) {
$dataLocationAddress['LocationID'] = $newLocationID;
$this->db->table('locationaddress')->insert($dataLocationAddress);
}
// Complete transaction
$this->db->transComplete();
if ($this->db->transStatus() === false) {
$dbError = $this->db->error();
return $this->failServerError(
'Failed to create location data (transaction rolled back): ' . ($dbError['message'] ?? 'Unknown database error')
);
}
return $this->respondCreated([
'status' => 'success',
'message' => 'Location created successfully',
'data' => $dataLocation,
], 201);
} catch (\Throwable $e) {
// Ensure rollback if something goes wrong
if ($this->db->transStatus() !== false) {
$this->db->transRollback();
}
return $this->failServerError('Something went wrong: ' . $e->getMessage());
}
}
public function update() {
try {
$input = $this->request->getJSON(true);
// Prepare data
$dataLocation = $this->prepareLocationData($input);
$dataLocationAddress = $this->prepareLocationAddressData($input);
if (!$this->validateData($dataLocation, $this->rules)) {
return $this->failValidationErrors( $this->validator->getErrors());
}
// Start transaction
$this->db->transStart();
// Insert location
$this->db->table('location')->where('LocationID', $dataLocation["LocationID"])->update($dataLocation);
// Insert address if available
if (!empty($dataLocationAddress)) {
$dataLocationAddress['LocationID'] = $input["LocationID"];
$this->db->table('locationaddress')->upsert($dataLocationAddress);
}
// Complete transaction
$this->db->transComplete();
if ($this->db->transStatus() === false) {
$dbError = $this->db->error();
return $this->failServerError(
'Failed to update location data (transaction rolled back): ' . ($dbError['message'] ?? 'Unknown database error')
);
}
return $this->respondCreated([
'status' => 'success',
'message' => 'Location updated successfully',
'data' => $dataLocation,
], 201);
} catch (\Throwable $e) {
// Ensure rollback if something goes wrong
if ($this->db->transStatus() !== false) {
$this->db->transRollback();
}
return $this->failServerError('Something went wrong: ' . $e->getMessage());
}
}
public function delete() {
try {
$input = $this->request->getJSON(true);
$LocationID = $input["LocationID"];
if (!$LocationID) {
return $this->failValidationError('LocationID is required.');
}
$location = $this->db->table('location')->where('LocationID', $LocationID)->get()->getRow();
if (!$location) {
return $this->failNotFound("LocationID with {$LocationID} not found.");
}
$this->db->table('location')->where('LocationID', $LocationID)->update(['DelDate' => NOW()]);
return $this->respondDeleted([
'status' => 'success',
'message' => "Location with {$LocationID} deleted successfully."
]);
} catch (\Throwable $e) {
// Ensure rollback if something goes wrong
if ($this->db->transStatus() !== false) {
$this->db->transRollback();
}
return $this->failServerError('Something went wrong: ' . $e->getMessage());
}
}
private function prepareLocationData(array $input): array {
$LinkTo = null;
if (!empty($input['LinkTo'])) {
$ids = array_column($input['LinkTo'], 'InternalPID');
$LinkTo = implode(',', $ids);
}
$data = [
"LocCode" => $input['LocCode'] ?? null,
"Parent" => $input['Parent'] ?? null,
"LocFull" => $input['LocFull'] ?? null,
"Description" => $input['Description'] ?? null,
];
if(!empty($input["LocationID"])) { $data["LocationID"] = $input["LocationID"]; }
return $data;
}
private function prepareLocationAddressData(array $input): array {
$data = [
"LocationID" => $input['LocationID'] ?? null,
"Street1" => $input['Street1'] ?? null,
"Street2" => $input['Street2'] ?? null,
"City" => $input['City'] ?? null,
"Province" => $input['Province'] ?? null,
"PostCode" => $input['PostCode'] ?? null,
"GeoLocationSystem" => $input['GeoLocationSystem'] ?? null,
"GeoLocationData" => $input['GeoLocationData'] ?? null,
];
return $data;
}
}

View File

@ -11,7 +11,7 @@ class ValueSet extends Controller {
public function __construct() {
$this->db = \Config\Database::connect();
$this->rulesValueSet = [
'VSet' => 'required',
'VSetID' => 'required',
'VValue' => 'required',
];
}
@ -174,7 +174,7 @@ class ValueSet extends Controller {
private function prepareValueSetData(array $input): array {
$data = [
"VSet" => $input['VSet'] ?? null,
"VSetID" => $input['VSetID'] ?? null,
"VOrder" => $input['VOrder'] ?? null,
"VValue" => $input['VValue'] ?? null,
"VDesc" => $input['VDesc'] ?? null,

View File

@ -5,20 +5,19 @@ use CodeIgniter\API\ResponseTrait;
use CodeIgniter\Controller;
use CodeIgniter\Database\RawSql;
class ValueSetField extends Controller {
class ValueSetDef extends Controller {
use ResponseTrait;
public function __construct() {
$this->db = \Config\Database::connect();
$this->rulesValueSetFld = [
'VSet' => 'required',
$this->rulesvaluesetdef = [
'VSName' => 'required',
'VSDesc' => 'required'
];
}
public function index() {
$rows = $this->db->table('valuesetfld')
$rows = $this->db->table('valuesetdef')
->select("*")
->get()->getResultArray();
@ -37,16 +36,16 @@ class ValueSetField extends Controller {
], 200);
}
public function show($VSFldID = null) {
$rows = $this->db->table('valuesetfld')
public function show($VSetID = null) {
$rows = $this->db->table('valuesetdef')
->select("*")
->where('VSFldID', (int) $VSFldID)
->where('VSetID', (int) $VSetID)
->get()->getResultArray();
if (empty($rows)) {
return $this->respond([
'status' => 'success',
'message' => "data with ID $VSFldID not found.",
'message' => "data with ID $VSetID not found.",
'data' => [],
], 200);
}
@ -61,14 +60,14 @@ class ValueSetField extends Controller {
public function create() {
try {
$input = $this->request->getJSON(true);
$dataValueSetFld = $this->prepareValueSetFldData($input);
$datavaluesetdef = $this->preparevaluesetdefData($input);
if (!$this->validateData($dataValueSetFld, $this->rulesValueSetFld)) {
if (!$this->validateData($datavaluesetdef, $this->rulesvaluesetdef)) {
return $this->failValidationErrors($this->validator->getErrors());
}
$this->db->transStart();
$this->db->table('valuesetfld')->insert($dataValueSetFld);
$this->db->table('valuesetdef')->insert($datavaluesetdef);
$this->db->transComplete();
if ($this->db->transStatus() === false) {
@ -81,7 +80,7 @@ class ValueSetField extends Controller {
return $this->respondCreated([
'status' => 'success',
'message' => 'Data created successfully',
'data' => $dataValueSetFld,
'data' => $datavaluesetdef,
], 201);
} catch (\Throwable $e) {
@ -96,18 +95,18 @@ class ValueSetField extends Controller {
public function update() {
try {
$input = $this->request->getJSON(true);
$VSFldID = $input["VSFldID"];
if (!$VSFldID) {
return $this->failValidationErrors('VSFldID is required.');
$VSetID = $input["VSetID"];
if (!$VSetID) {
return $this->failValidationErrors('VSetID is required.');
}
$dataValueSetFld = $this->prepareValueSetFldData($input);
$datavaluesetdef = $this->preparevaluesetdefData($input);
if (!$this->validateData($dataValueSetFld, $this->rulesValueSetFld)) {
if (!$this->validateData($datavaluesetdef, $this->rulesvaluesetdef)) {
return $this->failValidationErrors( $this->validator->getErrors());
}
$this->db->transStart();
$this->db->table('valuesetfld')->where('VSFldID', $VSFldID)->update($dataValueSetFld);
$this->db->table('valuesetdef')->where('VSetID', $VSetID)->update($datavaluesetdef);
$this->db->transComplete();
if ($this->db->transStatus() === false) {
@ -120,7 +119,7 @@ class ValueSetField extends Controller {
return $this->respondCreated([
'status' => 'success',
'message' => 'Data updated successfully',
'data' => $dataValueSetFld,
'data' => $datavaluesetdef,
], 201);
} catch (\Throwable $e) {
@ -135,21 +134,21 @@ class ValueSetField extends Controller {
public function delete() {
try {
$input = $this->request->getJSON(true);
$VSFldID = $input["VSFldID"];
if (!$VSFldID) {
return $this->failValidationErrors('VSFldID is required.');
$VSetID = $input["VSetID"];
if (!$VSetID) {
return $this->failValidationErrors('VSetID is required.');
}
$valuesetfld = $this->db->table('valuesetfld')->where('VSFldID', $VSFldID)->get()->getRow();
if (!$valuesetfld) {
return $this->failNotFound("Data with {$VSFldID} not found.");
$valuesetdef = $this->db->table('valuesetdef')->where('VSetID', $VSetID)->get()->getRow();
if (!$valuesetdef) {
return $this->failNotFound("Data with {$VSetID} not found.");
}
$this->db->table('valuesetfld')->where('VSFldID', $VSFldID)->update(['EndDate' => $this->now]);
$this->db->table('valuesetdef')->where('VSetID', $VSetID)->update(['EndDate' => $this->now]);
return $this->respondDeleted([
'status' => 'success',
'message' => "data with {$VSFldID} deleted successfully."
'message' => "data with {$VSetID} deleted successfully."
]);
} catch (\Throwable $e) {
@ -161,14 +160,13 @@ class ValueSetField extends Controller {
}
}
private function prepareValueSetFldData(array $input): array {
private function preparevaluesetdefData(array $input): array {
$data = [
"VSet" => $input['VSet'] ?? null,
"VSName" => $input['VSName'] ?? null,
"VSDesc" => $input['VSDesc'] ?? null
];
if(!empty($input["VSFldID"])) { $data["VSFldID"]=$input["VSFldID"]; }
if(!empty($input["VSetID"])) { $data["VSetID"]=$input["VSetID"]; }
return $data;
}

View File

@ -4,22 +4,9 @@ namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class DoctorMaster extends Migration
{
class CreateContactTable extends Migration {
public function up() {
// Occupation 1
$this->forge->addField([
'OccupationID' => [ 'type' => 'INT', 'constraint' => 11, 'auto_increment' => true],
'AbbTex' => [ 'type' => 'VARCHAR', 'constraint' => 5, 'null' => true ],
'FullText' => [ 'type' => 'VARCHAR', 'constraint' => 255, 'null' => true ],
'Description' => [ 'type' => 'TEXT', 'null' => true ],
]);
$this->forge->addField('CreateDate DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP');
$this->forge->addKey('OccupationID', true);
$this->forge->createTable('Occupation');
// Contact 2
// Contact
$this->forge->addField([
'ContactID' => [ 'type' => 'INT', 'constraint' => 11 ],
'NameFirst' => [ 'type' => 'VARCHAR', 'constraint' => 100, 'null' => true ],
@ -38,9 +25,9 @@ class DoctorMaster extends Migration
]);
$this->forge->addField('CreateDate DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP');
$this->forge->addKey('ContactID', true);
$this->forge->createTable('Contact');
$this->forge->createTable('contact');
// ContactDetail 3
// ContactDetail
$this->forge->addField([
'ContactDetID' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true ],
'ContactID' => [ 'type' => 'INT', 'constraint' => 11 ],
@ -53,9 +40,22 @@ class DoctorMaster extends Migration
'ContactEndDate' => [ 'type' => 'DATE', 'null' => true ],
]);
$this->forge->addKey('ContactDetID', true);
$this->forge->createTable('ContactDetail');
$this->forge->createTable('contactdetail');
// ContactTraining 4
// Occupation
$this->forge->addField([
'OccupationID' => [ 'type' => 'INT', 'constraint' => 11, 'auto_increment' => true],
'AbbTex' => [ 'type' => 'VARCHAR', 'constraint' => 5, 'null' => true ],
'FullText' => [ 'type' => 'VARCHAR', 'constraint' => 255, 'null' => true ],
'Description' => [ 'type' => 'TEXT', 'null' => true ],
]);
$this->forge->addField('CreateDate DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP');
$this->forge->addKey('OccupationID', true);
$this->forge->createTable('occupation');
/*
// ContactTraining
$this->forge->addField([
'ContactID' => [ 'type' => 'INT', 'constraint' => 11 ],
'TrainingType' => [ 'type' => 'VARCHAR', 'constraint' => 50, 'null' => true ],
@ -69,7 +69,7 @@ class DoctorMaster extends Migration
// $this->forge->addKey('ContactID', true);
$this->forge->createTable('ContactTraining');
// MedicalSpecialty 5
// MedicalSpecialty
$this->forge->addField([
'SpecialtyID' => [ 'type' => 'INT', 'constraint' => 11 ],
'SpecialtyText' => [ 'type' => 'VARCHAR', 'constraint' => 255, 'null' => true ],
@ -80,13 +80,17 @@ class DoctorMaster extends Migration
$this->forge->addField('CreateDate DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP');
$this->forge->addKey('SpecialtyID', true);
$this->forge->createTable('MedicalSpecialty');
*/
}
public function down() {
$this->forge->dropTable('Occupation');
$this->forge->dropTable('Contact');
$this->forge->dropTable('ContactDetail');
$this->forge->dropTable('Occupation');
/*
$this->forge->dropTable('ContactTraining');
$this->forge->dropTable('MedicalSpecialty');
*/
}
}

View File

@ -10,7 +10,7 @@ class CreateValueSetTable extends Migration {
$this->forge->addField([
'VID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
'SiteID' => ['type' => 'INT', 'null' => true],
'VSet' => ['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],
@ -22,21 +22,20 @@ class CreateValueSetTable extends Migration {
$this->forge->createTable('valueset');
$this->forge->addField([
'VSFldID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
'VSetID' => ['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],
'EndDate' => ['type' => 'DATETIME', 'null' => true]
]);
$this->forge->addField('CreateDate DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP');
$this->forge->addKey('VSFldID', true);
$this->forge->createTable('valuesetfld');
$this->forge->addKey('VSetID', true);
$this->forge->createTable('valuesetdef');
}
public function down() {
$this->forge->dropTable('valueset');
$this->forge->dropTable('valuesetfld');
$this->forge->dropTable('valuesetdef');
}
}

View File

@ -7,195 +7,207 @@ use CodeIgniter\Database\Seeder;
class ValueSetSeeder extends Seeder {
public function run() {
$data = [
['VSet' => 1,'VOrder' => 1, 'VValue' =>'0', 'VDesc' => 'Primary', 'VCategory' => '1'],
['VSet' => 1,'VOrder' => 2, 'VValue' =>'1', 'VDesc' => 'Secondary', 'VCategory' => '1'],
['VSet' => 2,'VOrder' => 1, 'VValue' =>'0', 'VDesc' => 'Disabled', 'VCategory' => '1'],
['VSet' => 2,'VOrder' => 2, 'VValue' =>'1', 'VDesc' => 'Enabled', 'VCategory' => '1'],
['VSet' => 3,'VOrder' => 1, 'VValue' =>'1', 'VDesc' => 'Female', 'VCategory' => '1'],
['VSet' => 3,'VOrder' => 2, 'VValue' =>'2', 'VDesc' => 'Male', 'VCategory' => '1'],
['VSet' => 3,'VOrder' => 3, 'VValue' =>'3', 'VDesc' => 'Unknown', 'VCategory' => '1'],
['VSet' => 4,'VOrder' => 1, 'VValue' =>'A', 'VDesc' => 'Separated', 'VCategory' => '1'],
['VSet' => 4,'VOrder' => 2, 'VValue' =>'D', 'VDesc' => 'Divorced', 'VCategory' => '1'],
['VSet' => 4,'VOrder' => 3, 'VValue' =>'M', 'VDesc' => 'Married', 'VCategory' => '1'],
['VSet' => 4,'VOrder' => 4, 'VValue' =>'S', 'VDesc' => 'Single', 'VCategory' => '1'],
['VSet' => 4,'VOrder' => 5, 'VValue' =>'W', 'VDesc' => 'Widowed', 'VCategory' => '1'],
['VSet' => 4,'VOrder' => 6, 'VValue' =>'B', 'VDesc' => 'Unmarried', 'VCategory' => '1'],
['VSet' => 4,'VOrder' => 7, 'VValue' =>'U', 'VDesc' => 'Unknown', 'VCategory' => '1'],
['VSet' => 4,'VOrder' => 8, 'VValue' =>'O', 'VDesc' => 'Other', 'VCategory' => '1'],
['VSet' => 5,'VOrder' => 1, 'VValue' =>'Y', 'VDesc' => 'Death', 'VCategory' => '1'],
['VSet' => 5,'VOrder' => 2, 'VValue' =>'N', 'VDesc' => 'Life', 'VCategory' => '1'],
['VSet' => 6,'VOrder' => 1, 'VValue' =>'KTP', 'VDesc' => 'Kartu Tanda Penduduk', 'VCategory' => '1'],
['VSet' => 6,'VOrder' => 2, 'VValue' =>'PASS', 'VDesc' => 'Passport', 'VCategory' => '1'],
['VSet' => 6,'VOrder' => 3, 'VValue' =>'SSN', 'VDesc' => 'Social Security Number', 'VCategory' => '1'],
['VSet' => 6,'VOrder' => 4, 'VValue' =>'SIM', 'VDesc' => 'Surat Izin Mengemudi', 'VCategory' => '1'],
['VSet' => 6,'VOrder' => 5, 'VValue' =>'KTAS', 'VDesc' => 'Kartu Izin Tinggal Terbatas', 'VCategory' => '1'],
['VSet' => 7,'VOrder' => 1, 'VValue' =>'Create', 'VDesc' => 'create record', 'VCategory' => '1'],
['VSet' => 7,'VOrder' => 2, 'VValue' =>'Read', 'VDesc' => 'read record/field', 'VCategory' => '1'],
['VSet' => 7,'VOrder' => 3, 'VValue' =>'Update', 'VDesc' => 'update record/field', 'VCategory' => '1'],
['VSet' => 7,'VOrder' => 4, 'VValue' =>'Delete', 'VDesc' => 'delete record/field', 'VCategory' => '1'],
['VSet' => 8,'VOrder' => 1, 'VValue' =>'WDID', 'VDesc' => 'Windows Device ID', 'VCategory' => '1'],
['VSet' => 8,'VOrder' => 2, 'VValue' =>'AAID', 'VDesc' => 'Android AAID', 'VCategory' => '1'],
['VSet' => 8,'VOrder' => 3, 'VValue' =>'IDFA', 'VDesc' => 'IOS IDFA', 'VCategory' => '1'],
['VSet' => 9,'VOrder' => 1, 'VValue' =>'PAT', 'VDesc' => 'Patient', 'VCategory' => '1'],
['VSet' => 9,'VOrder' => 2, 'VValue' =>'ISN', 'VDesc' => 'Insurance', 'VCategory' => '1'],
['VSet' => 9,'VOrder' => 3, 'VValue' =>'ACC', 'VDesc' => 'Account', 'VCategory' => '1'],
['VSet' => 9,'VOrder' => 4, 'VValue' =>'DOC', 'VDesc' => 'Doctor', 'VCategory' => '1'],
['VSet' => 10,'VOrder' => 1, 'VValue' =>'S', 'VDesc' => 'Stat', 'VCategory' => '1'],
['VSet' => 10,'VOrder' => 2, 'VValue' =>'A', 'VDesc' => 'ASAP', 'VCategory' => '1'],
['VSet' => 10,'VOrder' => 3, 'VValue' =>'R', 'VDesc' => 'Routine', 'VCategory' => '1'],
['VSet' => 10,'VOrder' => 4, 'VValue' =>'P', 'VDesc' => 'Preop', 'VCategory' => '1'],
['VSet' => 10,'VOrder' => 5, 'VValue' =>'C', 'VDesc' => 'Callback', 'VCategory' => '1'],
['VSet' => 10,'VOrder' => 6, 'VValue' =>'T', 'VDesc' => 'Timing critical', 'VCategory' => '1'],
['VSet' => 10,'VOrder' => 7, 'VValue' =>'PRN', 'VDesc' => 'As needed', 'VCategory' => '1'],
['VSet' => 11,'VOrder' => 1, 'VValue' =>'A', 'VDesc' => 'Some, not all results available', 'VCategory' => '1'],
['VSet' => 11,'VOrder' => 2, 'VValue' =>'CA', 'VDesc' => 'Order is cancelled', 'VCategory' => '1'],
['VSet' => 11,'VOrder' => 3, 'VValue' =>'CM', 'VDesc' => 'Order is completed', 'VCategory' => '1'],
['VSet' => 11,'VOrder' => 4, 'VValue' =>'DC', 'VDesc' => 'Order was discontinued', 'VCategory' => '1'],
['VSet' => 11,'VOrder' => 5, 'VValue' =>'ER', 'VDesc' => 'Error, order not found', 'VCategory' => '1'],
['VSet' => 11,'VOrder' => 6, 'VValue' =>'HD', 'VDesc' => 'Order “on hold”', 'VCategory' => '1'],
['VSet' => 11,'VOrder' => 7, 'VValue' =>'IP', 'VDesc' => 'In process, unspecified', 'VCategory' => '1'],
['VSet' => 11,'VOrder' => 8, 'VValue' =>'RP', 'VDesc' => 'Order has been replaced', 'VCategory' => '1'],
['VSet' => 11,'VOrder' => 9, 'VValue' =>'SC', 'VDesc' => 'In process, scheduled', 'VCategory' => '1'],
['VSet' => 11,'VOrder' => 10, 'VValue' =>'CL', 'VDesc' => 'Closed', 'VCategory' => '1'],
['VSet' => 11,'VOrder' => 11, 'VValue' =>'AC', 'VDesc' => 'Archived', 'VCategory' => '1'],
['VSet' => 11,'VOrder' => 12, 'VValue' =>'DL', 'VDesc' => 'Deleted', 'VCategory' => '1'],
['VSet' => 12,'VOrder' => 1, 'VValue' =>'FCLT', 'VDesc' => 'Facility. Organisasi atau lembaga tempat layanan disediakan, atau gedung tertentu dalam organisasi', 'VCategory' => '1'],
['VSet' => 12,'VOrder' => 2, 'VValue' =>'BLDG', 'VDesc' => 'Building. Gedung', 'VCategory' => '1'],
['VSet' => 12,'VOrder' => 3, 'VValue' =>'FLOR', 'VDesc' => 'Floor. Lantai dari gedung', 'VCategory' => '1'],
['VSet' => 12,'VOrder' => 4, 'VValue' =>'POC', 'VDesc' => 'Point of Care', 'VCategory' => '1'],
['VSet' => 12,'VOrder' => 5, 'VValue' =>'ROOM', 'VDesc' => 'Room. Ruangan dalam Gedung-lantai', 'VCategory' => '1'],
['VSet' => 12,'VOrder' => 6, 'VValue' =>'BED', 'VDesc' => 'Bed. Tempat tidur pasien', 'VCategory' => '1'],
['VSet' => 12,'VOrder' => 7, 'VValue' =>'MOBL', 'VDesc' => 'Mobile. Lokasi bergerak, ditandai dengan koordinat GPS, lokasi sementara, atau deskripsi lokasi unit bergerak saat ini.', 'VCategory' => '1'],
['VSet' => 12,'VOrder' => 8, 'VValue' =>'REMT', 'VDesc' => 'Remote. Lokasi di luar lokasi utama', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 1, 'VValue' =>'Hep', 'VDesc' => 'Heparin ammonium', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 2, 'VValue' =>'Apro', 'VDesc' => 'Aprotinin (substance)', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 3, 'VValue' =>'HepCa', 'VDesc' => 'Heparin calcium', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 4, 'VValue' =>'H3BO3', 'VDesc' => 'Boric acid', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 5, 'VValue' =>'CaOxa', 'VDesc' => 'Calcium oxalate', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 6, 'VValue' =>'EDTA', 'VDesc' => 'EDTA', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 7, 'VValue' =>'Ede', 'VDesc' => 'Edetate (substance)', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 8, 'VValue' =>'HCl', 'VDesc' => 'Hydrochloric acid', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 9, 'VValue' =>'Hrdn', 'VDesc' => 'Hirudin (substance)', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 10, 'VValue' =>'EdeK', 'VDesc' => 'Edetate dipotassium', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 11, 'VValue' =>'EdeTri', 'VDesc' => 'Tripotassium edetate', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 12, 'VValue' =>'LiHep', 'VDesc' => 'Heparin lithium (substance)', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 13, 'VValue' =>'EdeNa', 'VDesc' => 'Edetate disodium (substance)', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 14, 'VValue' =>'NaCtrt', 'VDesc' => 'Sodium citrate (substance)', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 15, 'VValue' =>'NaHep', 'VDesc' => 'Heparin sodium', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 16, 'VValue' =>'NaF', 'VDesc' => 'Sodium fluoride', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 17, 'VValue' =>'Borax', 'VDesc' => 'Sodium tetraborate', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 18, 'VValue' =>'Mntl', 'VDesc' => 'Mannitol (substance)', 'VCategory' => '1'],
['VSet' => 13,'VOrder' => 19, 'VValue' =>'NaFrm', 'VDesc' => 'Sodium formate', 'VCategory' => '1'],
['VSet' => 14,'VOrder' => 1, 'VValue' =>'Pri', 'VDesc' => 'primary, kontak langsung dengan spesimen', 'VCategory' => '1'],
['VSet' => 14,'VOrder' => 2, 'VValue' =>'Sec', 'VDesc' => 'secondary, wadah primary container', 'VCategory' => '1'],
['VSet' => 14,'VOrder' => 3, 'VValue' =>'Ter', 'VDesc' => 'tertiary, wadah secondary container.', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 1, 'VValue' =>'BLD', 'VDesc' => 'Whole blood', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 2, 'VValue' =>'BLDA', 'VDesc' => 'Blood arterial', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 3, 'VValue' =>'BLDCO', 'VDesc' => 'Cord blood', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 4, 'VValue' =>'FBLOOD', 'VDesc' => 'Blood, Fetal', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 5, 'VValue' =>'FBLOOD', 'VDesc' => 'Blood, Fetal', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 6, 'VValue' =>'WB', 'VDesc' => 'Blood, Whole', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 7, 'VValue' =>'BBL', 'VDesc' => 'Blood bag', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 8, 'VValue' =>'SER', 'VDesc' => 'Serum', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 9, 'VValue' =>'PLAS', 'VDesc' => 'Plasma', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 10, 'VValue' =>'PLB', 'VDesc' => 'Plasma bag', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 11, 'VValue' =>'MUCOS', 'VDesc' => 'Mucosa', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 12, 'VValue' =>'MUCUS', 'VDesc' => 'Mucus', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 13, 'VValue' =>'UR', 'VDesc' => 'Urine', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 14, 'VValue' =>'RANDU', 'VDesc' => 'Urine, Random', 'VCategory' => '1'],
['VSet' => 15,'VOrder' => 15, 'VValue' =>'URINM', 'VDesc' => 'Urine, Midstream', 'VCategory' => '1'],
['VSet' => 16,'VOrder' => 1, 'VValue' =>'L', 'VDesc' => 'Liter', 'VCategory' => '1'],
['VSet' => 16,'VOrder' => 2, 'VValue' =>'mL', 'VDesc' => 'Mili Liter', 'VCategory' => '1'],
['VSet' => 16,'VOrder' => 3, 'VValue' =>'mL', 'VDesc' => 'Micro Liter', 'VCategory' => '1'],
['VSet' => 16,'VOrder' => 4, 'VValue' =>'Pcs', 'VDesc' => 'Pieces', 'VCategory' => '1'],
['VSet' => 17,'VOrder' => 1, 'VValue' =>'SColl', 'VDesc' => 'Collection', 'VCategory' => '1'],
['VSet' => 17,'VOrder' => 2, 'VValue' =>'STran', 'VDesc' => 'Transport', 'VCategory' => '1'],
['VSet' => 17,'VOrder' => 3, 'VValue' =>'SRec', 'VDesc' => 'Reception', 'VCategory' => '1'],
['VSet' => 17,'VOrder' => 4, 'VValue' =>'SPrep', 'VDesc' => 'Preparation', 'VCategory' => '1'],
['VSet' => 17,'VOrder' => 5, 'VValue' =>'SAlqt', 'VDesc' => 'Aliquot', 'VCategory' => '1'],
['VSet' => 17,'VOrder' => 6, 'VValue' =>'SDisp', 'VDesc' => 'Dispatching', 'VCategory' => '1'],
['VSet' => 17,'VOrder' => 7, 'VValue' =>'SDest', 'VDesc' => 'Destruction', 'VCategory' => '1'],
['VSet' => 18,'VOrder' => 1, 'VValue' =>'0', 'VDesc' => 'Failed', 'VCategory' => '1'],
['VSet' => 18,'VOrder' => 2, 'VValue' =>'1', 'VDesc' => 'Success with note', 'VCategory' => '1'],
['VSet' => 18,'VOrder' => 3, 'VValue' =>'2', 'VDesc' => 'Success', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 1, 'VValue' =>'STC', 'VDesc' => 'To be collected', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 2, 'VValue' =>'SCFld', 'VDesc' => 'Collection failed', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 3, 'VValue' =>'SCtd', 'VDesc' => 'Collected', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 4, 'VValue' =>'STran', 'VDesc' => 'In-transport', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 5, 'VValue' =>'STFld', 'VDesc' => 'Transport failed', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 6, 'VValue' =>'SArrv', 'VDesc' => 'Arrived', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 7, 'VValue' =>'SRejc', 'VDesc' => 'Rejected', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 8, 'VValue' =>'SRcvd', 'VDesc' => 'Received', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 9, 'VValue' =>'SPAna', 'VDesc' => 'Pre-analytical', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 10, 'VValue' =>'SPAF', 'VDesc' => 'Pre-analytical failed', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 11, 'VValue' =>'STA', 'VDesc' => 'To be analyze', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 12, 'VValue' =>'SAFld', 'VDesc' => 'Analytical failed', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 13, 'VValue' =>'SAna', 'VDesc' => 'Analytical', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 14, 'VValue' =>'STS', 'VDesc' => 'To be stored', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 15, 'VValue' =>'SSFld', 'VDesc' => 'Store failed', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 16, 'VValue' =>'SStrd', 'VDesc' => 'Stored', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 17, 'VValue' =>'SExp', 'VDesc' => 'Expired', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 18, 'VValue' =>'STD', 'VDesc' => 'To be destroyed', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 19, 'VValue' =>'SDFld', 'VDesc' => 'Failed to destroy', 'VCategory' => '1'],
['VSet' => 19,'VOrder' => 20, 'VValue' =>'SDstd', 'VDesc' => 'Destroyed', 'VCategory' => '1'],
['VSet' => 20,'VOrder' => 1, 'VValue' =>'HEM', 'VDesc' => 'Hemolyzed', 'VCategory' => '1'],
['VSet' => 20,'VOrder' => 2, 'VValue' =>'ITC', 'VDesc' => 'Icteric', 'VCategory' => '1'],
['VSet' => 20,'VOrder' => 3, 'VValue' =>'LIP', 'VDesc' => 'Lipemic', 'VCategory' => '1'],
['VSet' => 20,'VOrder' => 4, 'VValue' =>'CFU', 'VDesc' => 'Centrifuged', 'VCategory' => '1'],
['VSet' => 20,'VOrder' => 5, 'VValue' =>'ROOM', 'VDesc' => 'Room temperature', 'VCategory' => '1'],
['VSet' => 20,'VOrder' => 6, 'VValue' =>'COOL', 'VDesc' => 'Cool', 'VCategory' => '1'],
['VSet' => 20,'VOrder' => 7, 'VValue' =>'FROZ', 'VDesc' => 'Frozen', 'VCategory' => '1'],
['VSet' => 20,'VOrder' => 8, 'VValue' =>'CLOT', 'VDesc' => 'Clotted', 'VCategory' => '1'],
['VSet' => 20,'VOrder' => 9, 'VValue' =>'AUT', 'VDesc' => 'Autolyzed', 'VCategory' => '1'],
['VSet' => 20,'VOrder' => 10, 'VValue' =>'CON', 'VDesc' => 'Contaminated', 'VCategory' => '1'],
['VSet' => 20,'VOrder' => 11, 'VValue' =>'LIVE', 'VDesc' => 'Live', 'VCategory' => '1'],
['VSet' => 21,'VOrder' => 1, 'VValue' =>'B', 'VDesc' => 'Blind Sample', 'VCategory' => '1'],
['VSet' => 21,'VOrder' => 2, 'VValue' =>'C', 'VDesc' => 'Calibrator', 'VCategory' => '1'],
['VSet' => 21,'VOrder' => 3, 'VValue' =>'E', 'VDesc' => 'Electronic QC. Used with manufactured reference providing signals that simulate QC results', 'VCategory' => '1'],
['VSet' => 21,'VOrder' => 4, 'VValue' =>'F', 'VDesc' => 'Filler Organization Proficiency. Specimen used for testing proficiency of the organization performing the testing (Filler) à PME', 'VCategory' => '1'],
['VSet' => 21,'VOrder' => 5, 'VValue' =>'O', 'VDesc' => 'Operator Proficiency. Specimen used for testing Operator Proficiency.', 'VCategory' => '1'],
['VSet' => 21,'VOrder' => 6, 'VValue' =>'P', 'VDesc' => 'Patient (default if blank component value)', 'VCategory' => '1'],
['VSet' => 21,'VOrder' => 7, 'VValue' =>'Q', 'VDesc' => 'Control specimen', 'VCategory' => '1'],
['VSet' => 21,'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'],
['VSet' => 21,'VOrder' => 9, 'VValue' =>'V', 'VDesc' => 'Verifying Calibrator. Used for periodic calibration checks.', 'VCategory' => '1'],
['VSet' => 26,'VOrder' => 1, 'VValue' =>'F', 'VDesc' => 'Fasting. Pasien puasa', 'VCategory' => '1'],
['VSet' => 26,'VOrder' => 2, 'VValue' =>'NF', 'VDesc' => 'Not Fasting. Pasien tidak puasa', 'VCategory' => '1'],
['VSet' => 26,'VOrder' => 3, 'VValue' =>'NG', 'VDesc' => 'Not Given. Pasien tidak ditanyakan status puasanya.', 'VCategory' => '1']
['VSetID' => 1,'VOrder' => 1, 'VValue' =>'0', 'VDesc' => 'Primary', 'VCategory' => '1'],
['VSetID' => 1,'VOrder' => 2, 'VValue' =>'1', 'VDesc' => 'Secondary', 'VCategory' => '1'],
['VSetID' => 2,'VOrder' => 1, 'VValue' =>'0', 'VDesc' => 'Disabled', 'VCategory' => '1'],
['VSetID' => 2,'VOrder' => 2, 'VValue' =>'1', 'VDesc' => 'Enabled', 'VCategory' => '1'],
['VSetID' => 3,'VOrder' => 1, 'VValue' =>'1', 'VDesc' => 'Female', 'VCategory' => '1'],
['VSetID' => 3,'VOrder' => 2, 'VValue' =>'2', 'VDesc' => 'Male', 'VCategory' => '1'],
['VSetID' => 3,'VOrder' => 3, 'VValue' =>'3', 'VDesc' => 'Unknown', 'VCategory' => '1'],
['VSetID' => 4,'VOrder' => 1, 'VValue' =>'A', 'VDesc' => 'Separated', 'VCategory' => '1'],
['VSetID' => 4,'VOrder' => 2, 'VValue' =>'D', 'VDesc' => 'Divorced', 'VCategory' => '1'],
['VSetID' => 4,'VOrder' => 3, 'VValue' =>'M', 'VDesc' => 'Married', 'VCategory' => '1'],
['VSetID' => 4,'VOrder' => 4, 'VValue' =>'S', 'VDesc' => 'Single', 'VCategory' => '1'],
['VSetID' => 4,'VOrder' => 5, 'VValue' =>'W', 'VDesc' => 'Widowed', 'VCategory' => '1'],
['VSetID' => 4,'VOrder' => 6, 'VValue' =>'B', 'VDesc' => 'Unmarried', 'VCategory' => '1'],
['VSetID' => 4,'VOrder' => 7, 'VValue' =>'U', 'VDesc' => 'Unknown', 'VCategory' => '1'],
['VSetID' => 4,'VOrder' => 8, 'VValue' =>'O', 'VDesc' => 'Other', 'VCategory' => '1'],
['VSetID' => 5,'VOrder' => 1, 'VValue' =>'Y', 'VDesc' => 'Death', 'VCategory' => '1'],
['VSetID' => 5,'VOrder' => 2, 'VValue' =>'N', 'VDesc' => 'Life', 'VCategory' => '1'],
['VSetID' => 6,'VOrder' => 1, 'VValue' =>'KTP', 'VDesc' => 'Kartu Tanda Penduduk', 'VCategory' => '1'],
['VSetID' => 6,'VOrder' => 2, 'VValue' =>'PASS', 'VDesc' => 'Passport', 'VCategory' => '1'],
['VSetID' => 6,'VOrder' => 3, 'VValue' =>'SSN', 'VDesc' => 'Social Security Number', 'VCategory' => '1'],
['VSetID' => 6,'VOrder' => 4, 'VValue' =>'SIM', 'VDesc' => 'Surat Izin Mengemudi', 'VCategory' => '1'],
['VSetID' => 6,'VOrder' => 5, 'VValue' =>'KTAS', 'VDesc' => 'Kartu Izin Tinggal Terbatas', 'VCategory' => '1'],
['VSetID' => 7,'VOrder' => 1, 'VValue' =>'Create', 'VDesc' => 'create record', 'VCategory' => '1'],
['VSetID' => 7,'VOrder' => 2, 'VValue' =>'Read', 'VDesc' => 'read record/field', 'VCategory' => '1'],
['VSetID' => 7,'VOrder' => 3, 'VValue' =>'Update', 'VDesc' => 'update record/field', 'VCategory' => '1'],
['VSetID' => 7,'VOrder' => 4, 'VValue' =>'Delete', 'VDesc' => 'delete record/field', 'VCategory' => '1'],
['VSetID' => 8,'VOrder' => 1, 'VValue' =>'WDID', 'VDesc' => 'Windows Device ID', 'VCategory' => '1'],
['VSetID' => 8,'VOrder' => 2, 'VValue' =>'AAID', 'VDesc' => 'Android AAID', 'VCategory' => '1'],
['VSetID' => 8,'VOrder' => 3, 'VValue' =>'IDFA', 'VDesc' => 'IOS IDFA', 'VCategory' => '1'],
['VSetID' => 9,'VOrder' => 1, 'VValue' =>'PAT', 'VDesc' => 'Patient', 'VCategory' => '1'],
['VSetID' => 9,'VOrder' => 2, 'VValue' =>'ISN', 'VDesc' => 'Insurance', 'VCategory' => '1'],
['VSetID' => 9,'VOrder' => 3, 'VValue' =>'ACC', 'VDesc' => 'Account', 'VCategory' => '1'],
['VSetID' => 9,'VOrder' => 4, 'VValue' =>'DOC', 'VDesc' => 'Doctor', 'VCategory' => '1'],
['VSetID' => 10,'VOrder' => 1, 'VValue' =>'S', 'VDesc' => 'Stat', 'VCategory' => '1'],
['VSetID' => 10,'VOrder' => 2, 'VValue' =>'A', 'VDesc' => 'ASAP', 'VCategory' => '1'],
['VSetID' => 10,'VOrder' => 3, 'VValue' =>'R', 'VDesc' => 'Routine', 'VCategory' => '1'],
['VSetID' => 10,'VOrder' => 4, 'VValue' =>'P', 'VDesc' => 'Preop', 'VCategory' => '1'],
['VSetID' => 10,'VOrder' => 5, 'VValue' =>'C', 'VDesc' => 'Callback', 'VCategory' => '1'],
['VSetID' => 10,'VOrder' => 6, 'VValue' =>'T', 'VDesc' => 'Timing critical', 'VCategory' => '1'],
['VSetID' => 10,'VOrder' => 7, 'VValue' =>'PRN', 'VDesc' => 'As needed', 'VCategory' => '1'],
['VSetID' => 11,'VOrder' => 1, 'VValue' =>'A', 'VDesc' => 'Some, not all results available', 'VCategory' => '1'],
['VSetID' => 11,'VOrder' => 2, 'VValue' =>'CA', 'VDesc' => 'Order is cancelled', 'VCategory' => '1'],
['VSetID' => 11,'VOrder' => 3, 'VValue' =>'CM', 'VDesc' => 'Order is completed', 'VCategory' => '1'],
['VSetID' => 11,'VOrder' => 4, 'VValue' =>'DC', 'VDesc' => 'Order was discontinued', 'VCategory' => '1'],
['VSetID' => 11,'VOrder' => 5, 'VValue' =>'ER', 'VDesc' => 'Error, order not found', 'VCategory' => '1'],
['VSetID' => 11,'VOrder' => 6, 'VValue' =>'HD', 'VDesc' => 'Order “on hold”', 'VCategory' => '1'],
['VSetID' => 11,'VOrder' => 7, 'VValue' =>'IP', 'VDesc' => 'In process, unspecified', 'VCategory' => '1'],
['VSetID' => 11,'VOrder' => 8, 'VValue' =>'RP', 'VDesc' => 'Order has been replaced', 'VCategory' => '1'],
['VSetID' => 11,'VOrder' => 9, 'VValue' =>'SC', 'VDesc' => 'In process, scheduled', 'VCategory' => '1'],
['VSetID' => 11,'VOrder' => 10, 'VValue' =>'CL', 'VDesc' => 'Closed', 'VCategory' => '1'],
['VSetID' => 11,'VOrder' => 11, 'VValue' =>'AC', 'VDesc' => 'Archived', 'VCategory' => '1'],
['VSetID' => 11,'VOrder' => 12, 'VValue' =>'DL', 'VDesc' => 'Deleted', 'VCategory' => '1'],
['VSetID' => 12,'VOrder' => 1, 'VValue' =>'FCLT', 'VDesc' => 'Facility. Organisasi atau lembaga tempat layanan disediakan, atau gedung tertentu dalam organisasi', 'VCategory' => '1'],
['VSetID' => 12,'VOrder' => 2, 'VValue' =>'BLDG', 'VDesc' => 'Building. Gedung', 'VCategory' => '1'],
['VSetID' => 12,'VOrder' => 3, 'VValue' =>'FLOR', 'VDesc' => 'Floor. Lantai dari gedung', 'VCategory' => '1'],
['VSetID' => 12,'VOrder' => 4, 'VValue' =>'POC', 'VDesc' => 'Point of Care', 'VCategory' => '1'],
['VSetID' => 12,'VOrder' => 5, 'VValue' =>'ROOM', 'VDesc' => 'Room. Ruangan dalam Gedung-lantai', 'VCategory' => '1'],
['VSetID' => 12,'VOrder' => 6, 'VValue' =>'BED', 'VDesc' => 'Bed. Tempat tidur pasien', 'VCategory' => '1'],
['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'],
['VSetID' => 12,'VOrder' => 8, 'VValue' =>'REMT', 'VDesc' => 'Remote. Lokasi di luar lokasi utama', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 1, 'VValue' =>'Hep', 'VDesc' => 'Heparin ammonium', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 2, 'VValue' =>'Apro', 'VDesc' => 'Aprotinin (substance)', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 3, 'VValue' =>'HepCa', 'VDesc' => 'Heparin calcium', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 4, 'VValue' =>'H3BO3', 'VDesc' => 'Boric acid', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 5, 'VValue' =>'CaOxa', 'VDesc' => 'Calcium oxalate', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 6, 'VValue' =>'EDTA', 'VDesc' => 'EDTA', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 7, 'VValue' =>'Ede', 'VDesc' => 'Edetate (substance)', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 8, 'VValue' =>'HCl', 'VDesc' => 'Hydrochloric acid', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 9, 'VValue' =>'Hrdn', 'VDesc' => 'Hirudin (substance)', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 10, 'VValue' =>'EdeK', 'VDesc' => 'Edetate dipotassium', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 11, 'VValue' =>'EdeTri', 'VDesc' => 'Tripotassium edetate', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 12, 'VValue' =>'LiHep', 'VDesc' => 'Heparin lithium (substance)', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 13, 'VValue' =>'EdeNa', 'VDesc' => 'Edetate disodium (substance)', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 14, 'VValue' =>'NaCtrt', 'VDesc' => 'Sodium citrate (substance)', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 15, 'VValue' =>'NaHep', 'VDesc' => 'Heparin sodium', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 16, 'VValue' =>'NaF', 'VDesc' => 'Sodium fluoride', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 17, 'VValue' =>'Borax', 'VDesc' => 'Sodium tetraborate', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 18, 'VValue' =>'Mntl', 'VDesc' => 'Mannitol (substance)', 'VCategory' => '1'],
['VSetID' => 13,'VOrder' => 19, 'VValue' =>'NaFrm', 'VDesc' => 'Sodium formate', 'VCategory' => '1'],
['VSetID' => 14,'VOrder' => 1, 'VValue' =>'Pri', 'VDesc' => 'primary, kontak langsung dengan spesimen', 'VCategory' => '1'],
['VSetID' => 14,'VOrder' => 2, 'VValue' =>'Sec', 'VDesc' => 'secondary, wadah primary container', 'VCategory' => '1'],
['VSetID' => 14,'VOrder' => 3, 'VValue' =>'Ter', 'VDesc' => 'tertiary, wadah secondary container.', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 1, 'VValue' =>'BLD', 'VDesc' => 'Whole blood', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 2, 'VValue' =>'BLDA', 'VDesc' => 'Blood arterial', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 3, 'VValue' =>'BLDCO', 'VDesc' => 'Cord blood', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 4, 'VValue' =>'FBLOOD', 'VDesc' => 'Blood, Fetal', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 5, 'VValue' =>'FBLOOD', 'VDesc' => 'Blood, Fetal', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 6, 'VValue' =>'WB', 'VDesc' => 'Blood, Whole', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 7, 'VValue' =>'BBL', 'VDesc' => 'Blood bag', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 8, 'VValue' =>'SER', 'VDesc' => 'Serum', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 9, 'VValue' =>'PLAS', 'VDesc' => 'Plasma', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 10, 'VValue' =>'PLB', 'VDesc' => 'Plasma bag', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 11, 'VValue' =>'MUCOS', 'VDesc' => 'Mucosa', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 12, 'VValue' =>'MUCUS', 'VDesc' => 'Mucus', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 13, 'VValue' =>'UR', 'VDesc' => 'Urine', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 14, 'VValue' =>'RANDU', 'VDesc' => 'Urine, Random', 'VCategory' => '1'],
['VSetID' => 15,'VOrder' => 15, 'VValue' =>'URINM', 'VDesc' => 'Urine, Midstream', 'VCategory' => '1'],
['VSetID' => 16,'VOrder' => 1, 'VValue' =>'L', 'VDesc' => 'Liter', 'VCategory' => '1'],
['VSetID' => 16,'VOrder' => 2, 'VValue' =>'mL', 'VDesc' => 'Mili Liter', 'VCategory' => '1'],
['VSetID' => 16,'VOrder' => 3, 'VValue' =>'mL', 'VDesc' => 'Micro Liter', 'VCategory' => '1'],
['VSetID' => 16,'VOrder' => 4, 'VValue' =>'Pcs', 'VDesc' => 'Pieces', 'VCategory' => '1'],
['VSetID' => 17,'VOrder' => 1, 'VValue' =>'order', 'VDesc' => 'Generate by order', 'VCategory' => '1'],
['VSetID' => 17,'VOrder' => 2, 'VValue' =>'user', 'VDesc' => 'Generate by user', 'VCategory' => '1'],
['VSetID' => 18,'VOrder' => 1, 'VValue' =>'SColl', 'VDesc' => 'Collection', 'VCategory' => '1'],
['VSetID' => 18,'VOrder' => 2, 'VValue' =>'STran', 'VDesc' => 'Transport', 'VCategory' => '1'],
['VSetID' => 18,'VOrder' => 3, 'VValue' =>'SRec', 'VDesc' => 'Reception', 'VCategory' => '1'],
['VSetID' => 18,'VOrder' => 4, 'VValue' =>'SPrep', 'VDesc' => 'Preparation', 'VCategory' => '1'],
['VSetID' => 18,'VOrder' => 5, 'VValue' =>'SAlqt', 'VDesc' => 'Aliquot', 'VCategory' => '1'],
['VSetID' => 18,'VOrder' => 6, 'VValue' =>'SDisp', 'VDesc' => 'Dispatching', 'VCategory' => '1'],
['VSetID' => 18,'VOrder' => 7, 'VValue' =>'SDest', 'VDesc' => 'Destruction', 'VCategory' => '1'],
['VSetID' => 19,'VOrder' => 1, 'VValue' =>'0', 'VDesc' => 'Failed', 'VCategory' => '1'],
['VSetID' => 19,'VOrder' => 2, 'VValue' =>'1', 'VDesc' => 'Success with note', 'VCategory' => '1'],
['VSetID' => 19,'VOrder' => 3, 'VValue' =>'2', 'VDesc' => 'Success', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 1, 'VValue' =>'STC', 'VDesc' => 'To be collected', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 2, 'VValue' =>'SCFld', 'VDesc' => 'Collection failed', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 3, 'VValue' =>'SCtd', 'VDesc' => 'Collected', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 4, 'VValue' =>'STran', 'VDesc' => 'In-transport', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 5, 'VValue' =>'STFld', 'VDesc' => 'Transport failed', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 6, 'VValue' =>'SArrv', 'VDesc' => 'Arrived', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 7, 'VValue' =>'SRejc', 'VDesc' => 'Rejected', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 8, 'VValue' =>'SRcvd', 'VDesc' => 'Received', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 9, 'VValue' =>'SPAna', 'VDesc' => 'Pre-analytical', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 10, 'VValue' =>'SPAF', 'VDesc' => 'Pre-analytical failed', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 11, 'VValue' =>'STA', 'VDesc' => 'To be analyze', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 12, 'VValue' =>'SAFld', 'VDesc' => 'Analytical failed', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 13, 'VValue' =>'SAna', 'VDesc' => 'Analytical', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 14, 'VValue' =>'STS', 'VDesc' => 'To be stored', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 15, 'VValue' =>'SSFld', 'VDesc' => 'Store failed', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 16, 'VValue' =>'SStrd', 'VDesc' => 'Stored', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 17, 'VValue' =>'SExp', 'VDesc' => 'Expired', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 18, 'VValue' =>'STD', 'VDesc' => 'To be destroyed', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 19, 'VValue' =>'SDFld', 'VDesc' => 'Failed to destroy', 'VCategory' => '1'],
['VSetID' => 20,'VOrder' => 20, 'VValue' =>'SDstd', 'VDesc' => 'Destroyed', 'VCategory' => '1'],
['VSetID' => 21,'VOrder' => 1, 'VValue' =>'HEM', 'VDesc' => 'Hemolyzed', 'VCategory' => '1'],
['VSetID' => 21,'VOrder' => 2, 'VValue' =>'ITC', 'VDesc' => 'Icteric', 'VCategory' => '1'],
['VSetID' => 21,'VOrder' => 3, 'VValue' =>'LIP', 'VDesc' => 'Lipemic', 'VCategory' => '1'],
['VSetID' => 21,'VOrder' => 4, 'VValue' =>'CFU', 'VDesc' => 'Centrifuged', 'VCategory' => '1'],
['VSetID' => 21,'VOrder' => 5, 'VValue' =>'ROOM', 'VDesc' => 'Room temperature', 'VCategory' => '1'],
['VSetID' => 21,'VOrder' => 6, 'VValue' =>'COOL', 'VDesc' => 'Cool', 'VCategory' => '1'],
['VSetID' => 21,'VOrder' => 7, 'VValue' =>'FROZ', 'VDesc' => 'Frozen', 'VCategory' => '1'],
['VSetID' => 21,'VOrder' => 8, 'VValue' =>'CLOT', 'VDesc' => 'Clotted', 'VCategory' => '1'],
['VSetID' => 21,'VOrder' => 9, 'VValue' =>'AUT', 'VDesc' => 'Autolyzed', 'VCategory' => '1'],
['VSetID' => 21,'VOrder' => 10, 'VValue' =>'CON', 'VDesc' => 'Contaminated', 'VCategory' => '1'],
['VSetID' => 21,'VOrder' => 11, 'VValue' =>'LIVE', 'VDesc' => 'Live', 'VCategory' => '1'],
['VSetID' => 22,'VOrder' => 1, 'VValue' =>'P', 'VDesc' => 'Patient', 'VCategory' => '1'],
['VSetID' => 22,'VOrder' => 2, 'VValue' =>'B', 'VDesc' => 'Blind Sample', 'VCategory' => '1'],
['VSetID' => 22,'VOrder' => 3, 'VValue' =>'Q', 'VDesc' => 'Control specimen', 'VCategory' => '1'],
['VSetID' => 22,'VOrder' => 4, 'VValue' =>'E', 'VDesc' => 'Electronic QC. Used with manufactured reference providing signals that simulate QC results', 'VCategory' => '1'],
['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'],
['VSetID' => 22,'VOrder' => 6, 'VValue' =>'O', 'VDesc' => 'Operator Proficiency. Specimen used for testing Operator Proficiency.', 'VCategory' => '1'],
['VSetID' => 22,'VOrder' => 7, 'VValue' =>'C', 'VDesc' => 'Calibrator', 'VCategory' => '1'],
['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'],
['VSetID' => 22,'VOrder' => 9, 'VValue' =>'V', 'VDesc' => 'Verifying Calibrator. Used for periodic calibration checks.', 'VCategory' => '1'],
['VSetID' => 23,'VOrder' => 1, 'VValue' =>'pcntr', 'VDesc' => 'Puncture', 'VCategory' => '1'],
['VSetID' => 23,'VOrder' => 2, 'VValue' =>'fprk', 'VDesc' => 'Finger-prick sampling', 'VCategory' => '1'],
['VSetID' => 23,'VOrder' => 3, 'VValue' =>'ucct', 'VDesc' => 'Urine specimen collection, clean catch', 'VCategory' => '1'],
['VSetID' => 23,'VOrder' => 4, 'VValue' =>'utcl', 'VDesc' => 'Timed urine collection', 'VCategory' => '1'],
['VSetID' => 23,'VOrder' => 5, 'VValue' =>'ucth', 'VDesc' => 'Urine specimen collection, catheterized', 'VCategory' => '1'],
['VSetID' => 23,'VOrder' => 6, 'VValue' =>'scgh', 'VDesc' => 'Collection of coughed sputum', 'VCategory' => '1'],
['VSetID' => 23,'VOrder' => 7, 'VValue' =>'bpsy', 'VDesc' => 'Biopsy', 'VCategory' => '1'],
['VSetID' => 23,'VOrder' => 8, 'VValue' =>'aspn', 'VDesc' => 'Aspiration', 'VCategory' => '1'],
['VSetID' => 23,'VOrder' => 9, 'VValue' =>'excs', 'VDesc' => 'Excision', 'VCategory' => '1'],
['VSetID' => 23,'VOrder' => 10, 'VValue' =>'scrp', 'VDesc' => 'Scraping', 'VCategory' => '1'],
['VSetID' => 24,'VOrder' => 1, 'VValue' =>'LA', 'VDesc' => 'Left Arm', 'VCategory' => '1'],
['VSetID' => 24,'VOrder' => 2, 'VValue' =>'RA', 'VDesc' => 'Right Arm', 'VCategory' => '1'],
['VSetID' => 24,'VOrder' => 3, 'VValue' =>'LF', 'VDesc' => 'Left Foot', 'VCategory' => '1'],
['VSetID' => 24,'VOrder' => 4, 'VValue' =>'RF', 'VDesc' => 'Right Foot', 'VCategory' => '1'],
['VSetID' => 26,'VOrder' => 1, 'VValue' =>'F', 'VDesc' => 'Fasting. Pasien puasa', 'VCategory' => '1'],
['VSetID' => 26,'VOrder' => 2, 'VValue' =>'NF', 'VDesc' => 'Not Fasting. Pasien tidak puasa', 'VCategory' => '1'],
['VSetID' => 26,'VOrder' => 3, 'VValue' =>'NG', 'VDesc' => 'Not Given. Pasien tidak ditanyakan status puasanya.', 'VCategory' => '1']
];
$this->db->table('valueset')->insertBatch($data);
$data = [
['VSName' => 'WSType','VSDesc' =>'workstation.Type', 'VSet' => '1'],
['VSName' => 'WSEnable','VSDesc' =>'workstation.Enable', 'VSet' => '2'],
['VSName' => 'Gender','VSDesc' =>'patient.Gender', 'VSet' => '3'],
['VSName' => 'Marital Status','VSDesc' =>'patient.MaritalStatus', 'VSet' => '4'],
['VSName' => 'Death Indicator','VSDesc' =>'patient.DeathIndicator', 'VSet' => '5'],
['VSName' => 'Identifier Type','VSDesc' =>'patidt.IdentifierType', 'VSet' => '6'],
['VSName' => 'Operation','VSDesc' =>'patreglog.Operation', 'VSet' => '7'],
['VSName' => 'DID Type','VSDesc' =>'patreglog.DIDType', 'VSet' => '8'],
['VSName' => 'Operation','VSDesc' =>'patvisitlog.Operation', 'VSet' => '7'],
['VSName' => 'DID Type','VSDesc' =>'patvisitlog.DIDType', 'VSet' => '8'],
['VSName' => 'Requested Entity','VSDesc' =>'order.ReqEntity', 'VSet' => '9'],
['VSName' => 'Order Priority','VSDesc' =>'order.Priority', 'VSet' => '10'],
['VSName' => 'Order Status','VSDesc' =>'orderststatus.OrderStatus', 'VSet' => '11'],
['VSName' => '','VSDesc' =>'orderlog.Operation', 'VSet' => '7'],
['VSName' => 'Location Type','VSDesc' =>'location.LocationType', 'VSet' => '12'],
['VSName' => 'Additive','VSDesc' =>'containertype.Additive', 'VSet' => '13'],
['VSName' => 'Container Class','VSDesc' =>'containertype.ConClass', 'VSet' => '14'],
['VSName' => 'Specimen Type','VSDesc' =>'spcdef.SpcType', 'VSet' => '15'],
['VSName' => 'Unit','VSDesc' =>'spcdef.Unit', 'VSet' => '16'],
['VSName' => 'Unit','VSDesc' =>'specimens.Unit', 'VSet' => '16'],
['VSName' => 'Activity','VSDesc' =>'specimenstatus.SpcAct', 'VSet' => '17'],
['VSName' => 'Activity Result','VSDesc' =>'specimenstatus.ActRes', 'VSet' => '18'],
['VSName' => 'Specimen Status','VSDesc' =>'specimenstatus.SpcStatus', 'VSet' => '19'],
['VSName' => 'Specimen Condition','VSDesc' =>'specimenstatus.SpcCon', 'VSet' => '20'],
['VSName' => 'Unit','VSDesc' =>'specimenstatus.Unit', 'VSet' => '16'],
['VSName' => 'Specimen Role','VSDesc' =>'specimencollection.SpcRole', 'VSet' => '21'],
['VSName' => 'Collection Method','VSDesc' =>'specimencollection.ColMethod', 'VSet' => '23'],
['VSName' => 'Body Site','VSDesc' =>'specimencollection.BodySite', 'VSet' => '24'],
['VSName' => 'Container Size','VSDesc' =>'specimencollection.CntSize', 'VSet' => '25'],
['VSName' => 'Fasting Status','VSDesc' =>'specimencollection.Fasting', 'VSet' => '26']
['VSName' => 'WSType','VDesc' =>'workstation.Type', 'VSetID' => '1'],
['VSName' => 'WSEnable','VDesc' =>'workstation.Enable', 'VSetID' => '2'],
['VSName' => 'Gender','VDesc' =>'patient.Gender', 'VSetID' => '3'],
['VSName' => 'Marital Status','VDesc' =>'patient.MaritalStatus', 'VSetID' => '4'],
['VSName' => 'Death Indicator','VDesc' =>'patient.DeathIndicator', 'VSetID' => '5'],
['VSName' => 'Identifier Type','VDesc' =>'patidt.IdentifierType', 'VSetID' => '6'],
['VSName' => 'Operation','VDesc' =>'patreglog.Operation patvisitlog.Operation orderlog.Operation', 'VSetID' => '7'],
['VSName' => 'DID Type','VDesc' =>'patreglog.DIDType patvisitlog.DIDType', 'VSetID' => '8'],
['VSName' => 'Requested Entity','VDesc' =>'order.ReqEntity', 'VSetID' => '9'],
['VSName' => 'Order Priority','VDesc' =>'order.Priority', 'VSetID' => '10'],
['VSName' => 'Order Status','VDesc' =>'orderststatus.OrderStatus', 'VSetID' => '11'],
['VSName' => 'Location Type','VDesc' =>'location.LocationType', 'VSetID' => '12'],
['VSName' => 'Additive','VDesc' =>'containertype.Additive', 'VSetID' => '13'],
['VSName' => 'Container Class','VDesc' =>'containertype.ConClass', 'VSetID' => '14'],
['VSName' => 'Specimen Type','VDesc' =>'spcdef.SpcType', 'VSetID' => '15'],
['VSName' => 'Unit','VDesc' =>'spcdef.Unit specimens.Unit specimenstatus.Unit', 'VSetID' => '16'],
['VSName' => 'GenerateBy','VDesc' =>'specimens. GenerateBy', 'VSetID' => '17'],
['VSName' => 'Activity','VDesc' =>'specimenstatus.SpcAct', 'VSetID' => '18'],
['VSName' => 'Activity Result','VDesc' =>'specimenstatus.ActRes', 'VSetID' => '19'],
['VSName' => 'Specimen Status','VDesc' =>'specimenstatus.SpcStatus', 'VSetID' => '20'],
['VSName' => 'Specimen Condition','VDesc' =>'specimenstatus.SpcCon', 'VSetID' => '21'],
['VSName' => 'Specimen Role','VDesc' =>'specimencollection.SpcRole', 'VSetID' => '22'],
['VSName' => 'Collection Method','VDesc' =>'specimencollection.ColMethod', 'VSetID' => '23'],
['VSName' => 'Body Site','VDesc' =>'specimencollection.BodySite', 'VSetID' => '24'],
['VSName' => 'Container Size','VDesc' =>'specimencollection.CntSize', 'VSetID' => '25'],
['VSName' => 'Fasting Status','VDesc' =>'specimencollection.Fasting', 'VSetID' => '26']
];
$this->db->table('valuesetfld')->insertBatch($data);
$this->db->table('valuesetdef')->insertBatch($data);
}
}

View File

@ -42,7 +42,8 @@
</exclude>
</source>
<php>
<server name="app.baseURL" value="http://example.com/"/>
<!-- <server name="app.baseURL" value="http://example.com/"/> -->
<server name="app.baseURL" value="http://localhost/clqms01/"/>
<server name="CODEIGNITER_SCREAM_DEPRECATIONS" value="0"/>
<!-- Directory containing phpunit.xml -->
<const name="HOMEPATH" value="./"/>
@ -51,13 +52,11 @@
<!-- Directory containing the front controller (index.php) -->
<const name="PUBLICPATH" value="./public/"/>
<!-- Database configuration -->
<!-- Uncomment to provide your own database for testing
<env name="database.tests.hostname" value="localhost"/>
<env name="database.tests.database" value="tests"/>
<env name="database.tests.username" value="tests_user"/>
<env name="database.tests.password" value=""/>
<env name="database.tests.DBDriver" value="MySQLi"/>
<env name="database.tests.DBPrefix" value="tests_"/>
-->
<env name="database.tests.hostname" value="localhost"/>
<env name="database.tests.database" value="tests"/>
<env name="database.tests.username" value="test_user"/>
<env name="database.tests.password" value="test_pass"/>
<env name="database.tests.DBDriver" value="MySQLi"/>
<!-- <env name="database.tests.DBPrefix" value="tests_"/> -->
</php>
</phpunit>

View File

@ -1,46 +0,0 @@
<?php
use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Test\DatabaseTestTrait;
use Tests\Support\Database\Seeds\ExampleSeeder;
use Tests\Support\Models\ExampleModel;
/**
* @internal
*/
final class ExampleDatabaseTest extends CIUnitTestCase
{
use DatabaseTestTrait;
protected $seed = ExampleSeeder::class;
public function testModelFindAll(): void
{
$model = new ExampleModel();
// Get every row created by ExampleSeeder
$objects = $model->findAll();
// Make sure the count is as expected
$this->assertCount(3, $objects);
}
public function testSoftDeleteLeavesRow(): void
{
$model = new ExampleModel();
$this->setPrivateProperty($model, 'useSoftDeletes', true);
$this->setPrivateProperty($model, 'tempUseSoftDeletes', true);
/** @var stdClass $object */
$object = $model->first();
$model->delete($object->id);
// The model should no longer find it
$this->assertNull($model->find($object->id));
// ... but it should still be in the database
$result = $model->builder()->where('id', $object->id)->get()->getResult();
$this->assertCount(1, $result);
}
}

View File

@ -1,17 +0,0 @@
<?php
use CodeIgniter\Test\CIUnitTestCase;
/**
* @internal
*/
final class ExampleSessionTest extends CIUnitTestCase
{
public function testSessionSimple(): void
{
$session = service('session');
$session->set('logged_in', 123);
$this->assertSame(123, $session->get('logged_in'));
}
}