2025-11-26 16:53:14 +07:00
< ? php
namespace App\Database\Seeds ;
use CodeIgniter\Database\Seeder ;
use App\Models\ValueSet\ValueSetModel ;
2025-12-02 12:52:23 +07:00
class TestSeeder extends Seeder {
2025-11-26 16:53:14 +07:00
public function run () {
$now = date ( 'Y-m-d H:i:s' );
$vsModel = new ValueSetModel ();
$rows = $vsModel -> select ( " VID, VSetID, VValue " ) -> findAll ();
$vs = [];
foreach ( $rows as $row ) {
$vs [ $row [ 'VSetID' ]][ $row [ 'VValue' ]] = $row [ 'VID' ];
}
2025-12-16 13:43:06 +07:00
// TestType mapping from VSetID=27:
// TEST = $vs[27]['TEST']
// PARAM = $vs[27]['PARAM']
// CALC = $vs[27]['CALC']
// GROUP = $vs[27]['GROUP']
// TITLE = $vs[27]['TITLE']
// ========================================
// TITLE TYPE - Headers/Sections
// ========================================
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'HDR-HEMA' , 'TestSiteName' => 'HEMATOLOGY' , 'TestType' => $vs [ 27 ][ 'TITLE' ], 'Description' => 'Hematology Section Header' , 'SeqScr' => '1' , 'SeqRpt' => '1' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 0 ], 'CreateDate' => " $now " ];
2025-12-16 13:43:06 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'HDR-CHEM' , 'TestSiteName' => 'CHEMISTRY' , 'TestType' => $vs [ 27 ][ 'TITLE' ], 'Description' => 'Chemistry Section Header' , 'SeqScr' => '10' , 'SeqRpt' => '10' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 0 ], 'CreateDate' => " $now " ];
2025-12-03 15:45:24 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'HDR-URIN' , 'TestSiteName' => 'URINALYSIS' , 'TestType' => $vs [ 27 ][ 'TITLE' ], 'Description' => 'Urinalysis Section Header' , 'SeqScr' => '30' , 'SeqRpt' => '30' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 0 ], 'CreateDate' => " $now " ];
2025-12-16 13:43:06 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
// ========================================
// TEST TYPE - Actual Laboratory Tests
// ========================================
// Hematology Tests
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'HB' , 'TestSiteName' => 'Hemoglobin' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => '' , 'SeqScr' => '2' , 'SeqRpt' => '2' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-12-16 13:43:06 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '1' , 'DepartmentID' => '1' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'BLD' ], 'ReqQty' => '500' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'g/dL' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '1' , 'Method' => 'CBC Analyzer' , 'CreateDate' => " $now " ];
2025-12-03 15:45:24 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'HCT' , 'TestSiteName' => 'Hematocrit' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => '' , 'SeqScr' => '3' , 'SeqRpt' => '3' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '1' , 'DepartmentID' => '1' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'BLD' ], 'ReqQty' => '500' , 'ReqQtyUnit' => 'uL' , 'Unit1' => '%' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '1' , 'Method' => 'CBC Analyzer' , 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'RBC' , 'TestSiteName' => 'Red Blood Cell' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Eritrosit' , 'SeqScr' => '4' , 'SeqRpt' => '4' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '1' , 'DepartmentID' => '1' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'BLD' ], 'ReqQty' => '500' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'x10^6/uL' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '2' , 'Method' => 'CBC Analyzer' , 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'WBC' , 'TestSiteName' => 'White Blood Cell' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Leukosit' , 'SeqScr' => '5' , 'SeqRpt' => '5' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '1' , 'DepartmentID' => '1' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'BLD' ], 'ReqQty' => '500' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'x10^3/uL' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '2' , 'Method' => 'CBC Analyzer' , 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'PLT' , 'TestSiteName' => 'Platelet' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Trombosit' , 'SeqScr' => '6' , 'SeqRpt' => '6' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '1' , 'DepartmentID' => '1' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'BLD' ], 'ReqQty' => '500' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'x10^3/uL' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '0' , 'Method' => 'CBC Analyzer' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'MCV' , 'TestSiteName' => 'MCV' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Mean Corpuscular Volume' , 'SeqScr' => '7' , 'SeqRpt' => '7' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '1' , 'DepartmentID' => '1' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'BLD' ], 'ReqQty' => '500' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'fL' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '1' , 'Method' => 'CBC Analyzer' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'MCH' , 'TestSiteName' => 'MCH' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Mean Corpuscular Hemoglobin' , 'SeqScr' => '8' , 'SeqRpt' => '8' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '1' , 'DepartmentID' => '1' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'BLD' ], 'ReqQty' => '500' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'pg' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '1' , 'Method' => 'CBC Analyzer' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'MCHC' , 'TestSiteName' => 'MCHC' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Mean Corpuscular Hemoglobin Concentration' , 'SeqScr' => '9' , 'SeqRpt' => '9' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '1' , 'DepartmentID' => '1' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'BLD' ], 'ReqQty' => '500' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'g/dL' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '1' , 'Method' => 'CBC Analyzer' , 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
// Chemistry Tests
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'GLU' , 'TestSiteName' => 'Glucose' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Glukosa Sewaktu' , 'SeqScr' => '11' , 'SeqRpt' => '11' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '2' , 'DepartmentID' => '2' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'SER' ], 'ReqQty' => '300' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'mg/dL' , 'Factor' => '0.0555' , 'Unit2' => 'mmol/L' , 'Decimal' => '0' , 'Method' => 'Hexokinase' , 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'CREA' , 'TestSiteName' => 'Creatinine' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Kreatinin' , 'SeqScr' => '12' , 'SeqRpt' => '12' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '2' , 'DepartmentID' => '2' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'SER' ], 'ReqQty' => '300' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'mg/dL' , 'Factor' => '88.4' , 'Unit2' => 'umol/L' , 'Decimal' => '2' , 'Method' => 'Enzymatic' , 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'UREA' , 'TestSiteName' => 'Blood Urea Nitrogen' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'BUN' , 'SeqScr' => '13' , 'SeqRpt' => '13' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '2' , 'DepartmentID' => '2' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'SER' ], 'ReqQty' => '300' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'mg/dL' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '1' , 'Method' => 'Urease-GLDH' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'SGOT' , 'TestSiteName' => 'AST (SGOT)' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Aspartate Aminotransferase' , 'SeqScr' => '14' , 'SeqRpt' => '14' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '2' , 'DepartmentID' => '2' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'SER' ], 'ReqQty' => '300' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'U/L' , 'Factor' => '0.017' , 'Unit2' => 'ukat/L' , 'Decimal' => '0' , 'Method' => 'IFCC' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'SGPT' , 'TestSiteName' => 'ALT (SGPT)' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Alanine Aminotransferase' , 'SeqScr' => '15' , 'SeqRpt' => '15' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '2' , 'DepartmentID' => '2' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'SER' ], 'ReqQty' => '300' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'U/L' , 'Factor' => '0.017' , 'Unit2' => 'ukat/L' , 'Decimal' => '0' , 'Method' => 'IFCC' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'CHOL' , 'TestSiteName' => 'Total Cholesterol' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Kolesterol Total' , 'SeqScr' => '16' , 'SeqRpt' => '16' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '2' , 'DepartmentID' => '2' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'THOLD' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'SER' ], 'ReqQty' => '300' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'mg/dL' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '0' , 'Method' => 'Enzymatic' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'TG' , 'TestSiteName' => 'Triglycerides' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Trigliserida' , 'SeqScr' => '17' , 'SeqRpt' => '17' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '2' , 'DepartmentID' => '2' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'THOLD' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'SER' ], 'ReqQty' => '300' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'mg/dL' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '0' , 'Method' => 'GPO-PAP' , 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'HDL' , 'TestSiteName' => 'HDL Cholesterol' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Kolesterol HDL' , 'SeqScr' => '18' , 'SeqRpt' => '18' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '2' , 'DepartmentID' => '2' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'THOLD' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'SER' ], 'ReqQty' => '300' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'mg/dL' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '0' , 'Method' => 'Direct' , 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'LDL' , 'TestSiteName' => 'LDL Cholesterol' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Kolesterol LDL' , 'SeqScr' => '19' , 'SeqRpt' => '19' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '2' , 'DepartmentID' => '2' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'THOLD' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'SER' ], 'ReqQty' => '300' , 'ReqQtyUnit' => 'uL' , 'Unit1' => 'mg/dL' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '0' , 'Method' => 'Direct' , 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
// ========================================
// PARAM TYPE - Parameters (non-lab values)
// ========================================
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'HEIGHT' , 'TestSiteName' => 'Height' , 'TestType' => $vs [ 27 ][ 'PARAM' ], 'Description' => 'Tinggi Badan' , 'SeqScr' => '40' , 'SeqRpt' => '40' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 0 ], 'CountStat' => $vs [ 2 ][ 0 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '10' , 'DepartmentID' => '' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => '' , 'VSet' => '' , 'SpcType' => '' , 'ReqQty' => '' , 'ReqQtyUnit' => '' , 'Unit1' => 'cm' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '0' , 'Method' => '' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'WEIGHT' , 'TestSiteName' => 'Weight' , 'TestType' => $vs [ 27 ][ 'PARAM' ], 'Description' => 'Berat Badan' , 'SeqScr' => '41' , 'SeqRpt' => '41' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 0 ], 'CountStat' => $vs [ 2 ][ 0 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '10' , 'DepartmentID' => '' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => '' , 'VSet' => '' , 'SpcType' => '' , 'ReqQty' => '' , 'ReqQtyUnit' => '' , 'Unit1' => 'kg' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '1' , 'Method' => '' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'AGE' , 'TestSiteName' => 'Age' , 'TestType' => $vs [ 27 ][ 'PARAM' ], 'Description' => 'Usia' , 'SeqScr' => '42' , 'SeqRpt' => '42' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 0 ], 'CountStat' => $vs [ 2 ][ 0 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '10' , 'DepartmentID' => '' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => '' , 'VSet' => '' , 'SpcType' => '' , 'ReqQty' => '' , 'ReqQtyUnit' => '' , 'Unit1' => 'years' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '0' , 'Method' => '' , 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'SYSTL' , 'TestSiteName' => 'Systolic BP' , 'TestType' => $vs [ 27 ][ 'PARAM' ], 'Description' => 'Tekanan Darah Sistolik' , 'SeqScr' => '43' , 'SeqRpt' => '43' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 0 ], 'CountStat' => $vs [ 2 ][ 0 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '10' , 'DepartmentID' => '' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => '' , 'VSet' => '' , 'SpcType' => '' , 'ReqQty' => '' , 'ReqQtyUnit' => '' , 'Unit1' => 'mmHg' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '0' , 'Method' => '' , 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'DIASTL' , 'TestSiteName' => 'Diastolic BP' , 'TestType' => $vs [ 27 ][ 'PARAM' ], 'Description' => 'Tekanan Darah Diastolik' , 'SeqScr' => '44' , 'SeqRpt' => '44' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 0 ], 'CountStat' => $vs [ 2 ][ 0 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '10' , 'DepartmentID' => '' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => '' , 'VSet' => '' , 'SpcType' => '' , 'ReqQty' => '' , 'ReqQtyUnit' => '' , 'Unit1' => 'mmHg' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '0' , 'Method' => '' , 'CreateDate' => " $now " ];
2025-11-26 16:53:14 +07:00
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
// ========================================
// CALC TYPE - Calculated Tests
// ========================================
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'BMI' , 'TestSiteName' => 'Body Mass Index' , 'TestType' => $vs [ 27 ][ 'CALC' ], 'Description' => 'Indeks Massa Tubuh - weight/(height^2)' , 'SeqScr' => '45' , 'SeqRpt' => '45' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 0 ], 'CreateDate' => " $now " ];
2025-12-16 13:43:06 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '10' , 'DepartmentID' => '' , 'FormulaInput' => 'WEIGHT,HEIGHT' , 'FormulaCode' => 'WEIGHT / ((HEIGHT/100) * (HEIGHT/100))' , 'Unit1' => 'kg/m2' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '1' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdefcal' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'EGFR' , 'TestSiteName' => 'eGFR (CKD-EPI)' , 'TestType' => $vs [ 27 ][ 'CALC' ], 'Description' => 'Estimated Glomerular Filtration Rate' , 'SeqScr' => '20' , 'SeqRpt' => '20' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 0 ], 'CreateDate' => " $now " ];
2025-12-16 13:43:06 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '2' , 'DepartmentID' => '2' , 'FormulaInput' => 'CREA,AGE,GENDER' , 'FormulaCode' => 'CKD_EPI(CREA,AGE,GENDER)' , 'Unit1' => 'mL/min/1.73m2' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '0' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdefcal' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'LDLCALC' , 'TestSiteName' => 'LDL Cholesterol (Calculated)' , 'TestType' => $vs [ 27 ][ 'CALC' ], 'Description' => 'Friedewald formula: TC - HDL - (TG/5)' , 'SeqScr' => '21' , 'SeqRpt' => '21' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 0 ], 'CreateDate' => " $now " ];
2025-12-16 13:43:06 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '2' , 'DepartmentID' => '2' , 'FormulaInput' => 'CHOL,HDL,TG' , 'FormulaCode' => 'CHOL - HDL - (TG/5)' , 'Unit1' => 'mg/dL' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '0' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdefcal' ) -> insert ( $data );
// ========================================
// GROUP TYPE - Panel/Profile Tests
// ========================================
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'CBC' , 'TestSiteName' => 'Complete Blood Count' , 'TestType' => $vs [ 27 ][ 'GROUP' ], 'Description' => 'Darah Lengkap' , 'SeqScr' => '50' , 'SeqRpt' => '50' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-12-16 13:43:06 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
$cbcID = $this -> db -> insertID ();
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'LIPID' , 'TestSiteName' => 'Lipid Profile' , 'TestType' => $vs [ 27 ][ 'GROUP' ], 'Description' => 'Profil Lipid' , 'SeqScr' => '51' , 'SeqRpt' => '51' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$lipidID = $this -> db -> insertID ();
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'LFT' , 'TestSiteName' => 'Liver Function Test' , 'TestType' => $vs [ 27 ][ 'GROUP' ], 'Description' => 'Fungsi Hati' , 'SeqScr' => '52' , 'SeqRpt' => '52' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-12-16 13:43:06 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
$lftID = $this -> db -> insertID ();
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'RFT' , 'TestSiteName' => 'Renal Function Test' , 'TestType' => $vs [ 27 ][ 'GROUP' ], 'Description' => 'Fungsi Ginjal' , 'SeqScr' => '53' , 'SeqRpt' => '53' , 'IndentLeft' => '0' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-12-16 13:43:06 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
$rftID = $this -> db -> insertID ();
// Urinalysis Tests (with valueset result type)
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'UCOLOR' , 'TestSiteName' => 'Urine Color' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Warna Urine' , 'SeqScr' => '31' , 'SeqRpt' => '31' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-12-16 13:43:06 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '4' , 'DepartmentID' => '4' , 'ResultType' => $vs [ 43 ][ 'VSET' ], 'RefType' => $vs [ 44 ][ 'VSET' ], 'VSet' => '1001' , 'SpcType' => $vs [ 15 ][ 'UR' ], 'ReqQty' => '10' , 'ReqQtyUnit' => 'mL' , 'Unit1' => '' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '' , 'Method' => 'Visual' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'UGLUC' , 'TestSiteName' => 'Urine Glucose' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Glukosa Urine' , 'SeqScr' => '32' , 'SeqRpt' => '32' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '4' , 'DepartmentID' => '4' , 'ResultType' => $vs [ 43 ][ 'VSET' ], 'RefType' => $vs [ 44 ][ 'VSET' ], 'VSet' => '1002' , 'SpcType' => $vs [ 15 ][ 'UR' ], 'ReqQty' => '10' , 'ReqQtyUnit' => 'mL' , 'Unit1' => '' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '' , 'Method' => 'Dipstick' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'UPROT' , 'TestSiteName' => 'Urine Protein' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'Protein Urine' , 'SeqScr' => '33' , 'SeqRpt' => '33' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '4' , 'DepartmentID' => '4' , 'ResultType' => $vs [ 43 ][ 'VSET' ], 'RefType' => $vs [ 44 ][ 'VSET' ], 'VSet' => '1003' , 'SpcType' => $vs [ 15 ][ 'UR' ], 'ReqQty' => '10' , 'ReqQtyUnit' => 'mL' , 'Unit1' => '' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '' , 'Method' => 'Dipstick' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-12-16 13:48:33 +07:00
$data = [ 'SiteID' => '1' , 'TestSiteCode' => 'PH' , 'TestSiteName' => 'Urine pH' , 'TestType' => $vs [ 27 ][ 'TEST' ], 'Description' => 'pH Urine' , 'SeqScr' => '34' , 'SeqRpt' => '34' , 'IndentLeft' => '1' , 'VisibleScr' => $vs [ 2 ][ 1 ], 'VisibleRpt' => $vs [ 2 ][ 1 ], 'CountStat' => $vs [ 2 ][ 1 ], 'CreateDate' => " $now " ];
2025-11-27 14:15:10 +07:00
$this -> db -> table ( 'testdefsite' ) -> insert ( $data );
2025-12-16 13:43:06 +07:00
$testSiteID = $this -> db -> insertID ();
$data = [ 'SiteID' => '1' , 'TestSiteID' => $testSiteID , 'DisciplineID' => '4' , 'DepartmentID' => '4' , 'ResultType' => $vs [ 43 ][ 'NMRIC' ], 'RefType' => $vs [ 44 ][ 'RANGE' ], 'VSet' => '' , 'SpcType' => $vs [ 15 ][ 'UR' ], 'ReqQty' => '10' , 'ReqQtyUnit' => 'mL' , 'Unit1' => '' , 'Factor' => '' , 'Unit2' => '' , 'Decimal' => '1' , 'Method' => 'Dipstick' , 'CreateDate' => " $now " ];
$this -> db -> table ( 'testdeftech' ) -> insert ( $data );
2025-11-26 16:53:14 +07:00
}
}