2025-12-02 12:52:23 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Database\Seeds;
|
|
|
|
|
|
|
|
|
|
use CodeIgniter\Database\Seeder;
|
2026-01-13 16:48:43 +07:00
|
|
|
use App\Libraries\ValueSet;
|
2025-12-02 12:52:23 +07:00
|
|
|
|
2026-01-13 16:48:43 +07:00
|
|
|
class OrganizationSeeder extends Seeder
|
|
|
|
|
{
|
|
|
|
|
public function run()
|
|
|
|
|
{
|
2025-12-02 12:52:23 +07:00
|
|
|
$now = date('Y-m-d H:i:s');
|
2026-01-13 16:48:43 +07:00
|
|
|
|
2025-12-02 12:52:23 +07:00
|
|
|
// Organization
|
|
|
|
|
$data = [
|
2025-12-17 15:19:55 +07:00
|
|
|
[ 'AccountID' => 1, 'Parent' => null, 'AccountName' => 'Dummy Account', 'Initial' => 'QAC', 'Street_1' => 'Dummy Address', 'EmailAddress1' => 'dummy@summit.co.id', 'Phone' => '092029', 'Fax' => '092029', 'CreateDate' => "$now" ],
|
|
|
|
|
[ 'AccountID' => 2, 'Parent' => null, 'AccountName' => 'Dummy Account', 'Initial' => 'QAC', 'Street_1' => 'Dummy Address', 'EmailAddress1' => 'dummy@summit.co.id', 'Phone' => '092029', 'Fax' => '092029', 'CreateDate' => "$now" ],
|
|
|
|
|
[ 'AccountID' => 3, 'Parent' => null, 'AccountName' => 'Dummy Account', 'Initial' => 'QAC', 'Street_1' => 'Dummy Address', 'EmailAddress1' => 'dummy@summit.co.id', 'Phone' => '092029', 'Fax' => '092029', 'CreateDate' => "$now" ]
|
2025-12-02 12:52:23 +07:00
|
|
|
];
|
|
|
|
|
$this->db->table('account')->insertBatch($data);
|
2026-01-13 16:48:43 +07:00
|
|
|
|
2025-12-02 12:52:23 +07:00
|
|
|
$data = [
|
2025-12-17 15:19:55 +07:00
|
|
|
[ 'SiteID' => 1, 'SiteCode' => 'QSIT', 'SiteName' => 'Dummy Site', 'AccountID' => 1, 'Parent' => null, 'CreateDate' => "$now" ],
|
|
|
|
|
[ 'SiteID' => 2, 'SiteCode' => 'XSIT', 'SiteName' => 'Dummy Child Site', 'AccountID' => 1, 'Parent' => 1, 'CreateDate' => "$now" ],
|
2025-12-02 12:52:23 +07:00
|
|
|
];
|
|
|
|
|
$this->db->table('site')->insertBatch($data);
|
2026-01-13 16:48:43 +07:00
|
|
|
|
2025-12-02 12:52:23 +07:00
|
|
|
$data = [
|
2025-12-17 15:19:55 +07:00
|
|
|
['DisciplineID' => '1', 'DisciplineCode' => 'HEMA', 'DisciplineName' => 'Hematology', 'Parent' => null, 'CreateDate' => "$now"],
|
|
|
|
|
['DisciplineID' => '2', 'DisciplineCode' => 'CHEM', 'DisciplineName' => 'Clinical Chemistry', 'Parent' => null, 'CreateDate' => "$now"],
|
|
|
|
|
['DisciplineID' => '3', 'DisciplineCode' => 'IMSR', 'DisciplineName' => 'Immunology/Serology', 'Parent' => null, 'CreateDate' => "$now"],
|
|
|
|
|
['DisciplineID' => '4', 'DisciplineCode' => 'URIN', 'DisciplineName' => 'Urinalysis', 'Parent' => null, 'CreateDate' => "$now"],
|
|
|
|
|
['DisciplineID' => '5', 'DisciplineCode' => 'FECAL', 'DisciplineName' => 'Fecal Analysis', 'Parent' => null, 'CreateDate' => "$now"],
|
|
|
|
|
['DisciplineID' => '6', 'DisciplineCode' => 'HC', 'DisciplineName' => 'Pathology/Cytology', 'Parent' => null, 'CreateDate' => "$now"],
|
|
|
|
|
['DisciplineID' => '7', 'DisciplineCode' => 'MICRO', 'DisciplineName' => 'Microbiology', 'Parent' => null, 'CreateDate' => "$now"],
|
|
|
|
|
['DisciplineID' => '8', 'DisciplineCode' => 'TXC', 'DisciplineName' => 'Toxicology', 'Parent' => null, 'CreateDate' => "$now"],
|
|
|
|
|
['DisciplineID' => '9', 'DisciplineCode' => 'LF', 'DisciplineName' => 'Life Sciences', 'Parent' => null, 'CreateDate' => "$now"],
|
|
|
|
|
['DisciplineID' => '10', 'DisciplineCode' => 'ND', 'DisciplineName' => 'Non-discipline', 'Parent' => null, 'CreateDate' => "$now"],
|
|
|
|
|
['DisciplineID' => '11', 'DisciplineCode' => 'HEMO', 'DisciplineName' => 'Hemostasis', 'Parent' => '1', 'CreateDate' => "$now"],
|
|
|
|
|
['DisciplineID' => '12', 'DisciplineCode' => 'BLGLU', 'DisciplineName' => 'Blood Glucose', 'Parent' => '2', 'CreateDate' => "$now"],
|
|
|
|
|
['DisciplineID' => '13', 'DisciplineCode' => 'KIDF', 'DisciplineName' => 'Kidney Function', 'Parent' => '2', 'CreateDate' => "$now"],
|
2025-12-02 12:52:23 +07:00
|
|
|
];
|
|
|
|
|
$this->db->table('discipline')->insertBatch($data);
|
2026-01-13 16:48:43 +07:00
|
|
|
|
2025-12-02 12:52:23 +07:00
|
|
|
$data = [
|
2025-12-17 15:19:55 +07:00
|
|
|
['DepartmentID' => '1', 'DisciplineID' => '1', 'SiteID' => '165', 'DepartmentCode' => 'HRTN', 'DepartmentName' => 'Hematologi Rutin', 'CreateDate' => "$now"],
|
|
|
|
|
['DepartmentID' => '2', 'DisciplineID' => '1', 'SiteID' => '165', 'DepartmentCode' => 'HKHS', 'DepartmentName' => 'Hematologi Khusus', 'CreateDate' => "$now"],
|
|
|
|
|
['DepartmentID' => '3', 'DisciplineID' => '2', 'SiteID' => '165', 'DepartmentCode' => 'KK', 'DepartmentName' => 'Kimia Klinik', 'CreateDate' => "$now"],
|
|
|
|
|
['DepartmentID' => '4', 'DisciplineID' => '3', 'SiteID' => '165', 'DepartmentCode' => 'IMS', 'DepartmentName' => 'Imunologi', 'CreateDate' => "$now"],
|
|
|
|
|
['DepartmentID' => '5', 'DisciplineID' => '3', 'SiteID' => '165', 'DepartmentCode' => 'SRL', 'DepartmentName' => 'Serologi', 'CreateDate' => "$now"],
|
|
|
|
|
['DepartmentID' => '6', 'DisciplineID' => '4', 'SiteID' => '165', 'DepartmentCode' => 'UF', 'DepartmentName' => 'Urin', 'CreateDate' => "$now"]
|
2025-12-02 12:52:23 +07:00
|
|
|
];
|
|
|
|
|
$this->db->table('department')->insertBatch($data);
|
2026-01-13 16:48:43 +07:00
|
|
|
|
2025-12-02 12:52:23 +07:00
|
|
|
$data = [
|
2026-01-13 16:48:43 +07:00
|
|
|
['WorkstationID' => '1', 'DepartmentID' => '1', 'WorkstationCode' => 'HAUTO', 'WorkstationName' => 'Hematologi Auto', 'Type' => '0', 'LinkTo' => '', 'Enable' => '1', 'CreateDate' => "$now"],
|
|
|
|
|
['WorkstationID' => '2', 'DepartmentID' => '1', 'WorkstationCode' => 'HBACK', 'WorkstationName' => 'Hematologi Backup', 'Type' => '1', 'LinkTo' => '1', 'Enable' => '1', 'CreateDate' => "$now"],
|
|
|
|
|
['WorkstationID' => '3', 'DepartmentID' => '3', 'WorkstationCode' => 'CAUTO', 'WorkstationName' => 'Kimia Auto', 'Type' => '0', 'LinkTo' => '', 'Enable' => '1', 'CreateDate' => "$now"],
|
|
|
|
|
['WorkstationID' => '4', 'DepartmentID' => '3', 'WorkstationCode' => 'CBACK', 'WorkstationName' => 'Kimia Backup', 'Type' => '1', 'LinkTo' => '3', 'Enable' => '1', 'CreateDate' => "$now"],
|
|
|
|
|
['WorkstationID' => '5', 'DepartmentID' => '3', 'WorkstationCode' => 'CMAN', 'WorkstationName' => 'Kimia Manual', 'Type' => '0', 'LinkTo' => '', 'Enable' => '1', 'CreateDate' => "$now"],
|
|
|
|
|
['WorkstationID' => '6', 'DepartmentID' => '4', 'WorkstationCode' => 'IAUTO', 'WorkstationName' => 'Imunologi Auto', 'Type' => '0', 'LinkTo' => '', 'Enable' => '1', 'CreateDate' => "$now"],
|
|
|
|
|
['WorkstationID' => '7', 'DepartmentID' => '4', 'WorkstationCode' => 'IMAN', 'WorkstationName' => 'Imunologi Manual', 'Type' => '0', 'LinkTo' => '', 'Enable' => '1', 'CreateDate' => "$now"],
|
2025-12-02 12:52:23 +07:00
|
|
|
];
|
|
|
|
|
$this->db->table('workstation')->insertBatch($data);
|
|
|
|
|
}
|
2026-01-13 16:48:43 +07:00
|
|
|
}
|