clqms-be/app/Database/Seeds/DummySeeder.php
2025-10-15 16:08:52 +07:00

89 lines
7.3 KiB
PHP

<?php
namespace App\Database\Seeds;
use CodeIgniter\Database\Seeder;
class DummySeeder extends Seeder {
public function run() {
$now = date('Y-m-d H:i:s');
// location
$data = [
['LocationID'=>1, 'LocCode'=>'QLOC', 'LocFull'=>'Dummy Location', 'LocType'=>'ROOM', 'Description'=>'Location made for dummy testing', 'CreateDate'=> "$now" ],
['LocationID'=>2, 'LocCode'=>'DEFLOC', 'LocFull'=>'Default Location', 'LocType'=>'ROOM', 'Description'=>'Default location', 'CreateDate'=> "$now" ]
];
$this->db->table('location')->insertBatch($data);
$data = [
['LocationID'=>1, 'Street1'=>'Jalan Nginden', 'Street2'=>'Intan Raya', 'City'=>'Surabaya', 'Province'=>'East Java', 'PostCode'=>'60222', 'CreateDate'=> "$now"],
['LocationID'=>2, 'Street1'=>'Jalan ', 'Street2'=>'Jalan jalan', 'City'=>'Depok', 'Province'=>'DKI Jakarta', 'PostCode'=>'10123', 'CreateDate'=> "$now"]
];
$this->db->table('locationaddress')->insertBatch($data);
// users
$data = [
['id'=>1, 'role_id'=>1, 'username'=>'zaka', 'password'=>'$2y$12$vSB7PpKOUKEyFKbeExiGkuujRfQbR.yl6YVudDpfy24FemZopBG0m'],
['id'=>2, 'role_id'=>1, 'username'=>'tes' , 'password'=>'$2y$12$KwPedIPb7K/0IR/8/FcwdOMG4eBNNAXSjXnbkB26SwjH4Nf7PaYBe']
];
$this->db->table('users')->insertBatch($data);
// contact
$data = [
['ContactID'=>1, 'NameFirst'=>'Default', 'NameLast'=>'Doctor', 'Title'=>'', 'Initial'=>'DEFDOC',
'Birthdate'=>'', 'EmailAddress1'=>'', 'EmailAddress2'=>'', 'Phone'=>'', 'MobilePhone1'=>'', 'MobilePhone2'=>'', 'Specialty'=>'', 'SubSpecialty'=>'', 'CreateDate'=> "$now" ],
['ContactID'=>2, 'NameFirst'=>'Dummy', 'NameLast'=>'Doctor', 'Title'=>'', 'Initial'=>'QDOC',
'Birthdate'=>'', 'EmailAddress1'=>'', 'EmailAddress2'=>'', 'Phone'=>'', 'MobilePhone1'=>'', 'MobilePhone2'=>'', 'Specialty'=>'', 'SubSpecialty'=>'', 'CreateDate'=> "$now" ]
];
$this->db->table('contact')->insertBatch($data);
$data = [
['SiteID'=>1,'ContactID'=>1, 'ContactCode'=>'DEFDOC', 'ContactEmail'=>'defdoc@email.com', 'OccupationID'=>'', 'JobTitle'=>'', 'Department'=>'Jantung Sehat' ],
['SiteID'=>2,'ContactID'=>1, 'ContactCode'=>'QDOC', 'ContactEmail'=>'qdoc@email.com', 'OccupationID'=>'', 'JobTitle'=>'', 'Department'=>'Hati Sehat' ],
['SiteID'=>1,'ContactID'=>2, 'ContactCode'=>'S923', 'ContactEmail'=>'defdoc@email.com', 'OccupationID'=>'', 'JobTitle'=>'', 'Department'=>'Jantung Sehat' ],
['SiteID'=>2,'ContactID'=>2, 'ContactCode'=>'B231', 'ContactEmail'=>'defdoc@email.com', 'OccupationID'=>'', 'JobTitle'=>'', 'Department'=>'Ginjal Sehat' ],
['SiteID'=>3,'ContactID'=>2, 'ContactCode'=>'C342', 'ContactEmail'=>'qdoc@email.com', 'OccupationID'=>'', 'JobTitle'=>'', 'Department'=>'Hati Sehat' ]
];
$this->db->table('contactdetail')->insertBatch($data);
$data = [
['OccupationID'=>1, 'OccCode'=>'OC001', 'OccText'=>'Medical Doctor', 'Description'=>'Diagnoses and treats, injuries and illnesses', 'CreateDate'=> "$now" ],
['OccupationID'=>2, 'OccCode'=>'OC002', 'OccText'=>'Trainee Medical Technician', 'Description'=>'Performing basic laboratory task', 'CreateDate'=> "$now" ],
['OccupationID'=>3, 'OccCode'=>'OC003', 'OccText'=>'Medical Laboratory Technician', 'Description'=>'Perform routine laboratory tests', 'CreateDate'=> "$now" ]
];
$this->db->table('occupation')->insertBatch($data);
// patient
$data = [
[ 'InternalPID'=>1, 'PatientID'=>'SMAJ1', 'NameFirst'=>'Dummy', 'NameLast' => 'Patient M', 'Gender'=>'6', 'BirthDate'=>'1991-09-09', 'Street_1'=>'Makati', 'EmailAddress1'=>'smaj1@5panda.id',
'Country'=>'325', 'Race'=>'175', 'Religion'=>'207', 'Ethnic'=>'218', 'DeathIndicator' => '16', 'CreateDate'=> "$now"],
[ 'InternalPID'=>2, 'PatientID'=>'SMAJ2', 'NameFirst'=>'Dummy', 'NameLast' => 'Patient F', 'Gender'=>'6', 'BirthDate'=>'1997-02-02', 'Street_1'=>'Manila', 'EmailAddress1'=>'smaj2@5panda.id',
'Country'=>'325', 'Race'=>'176', 'Religion'=>'206', 'Ethnic'=>'219', 'DeathIndicator' => '16', 'CreateDate'=> "$now"],
[ 'InternalPID'=>3, 'PatientID'=>'SMAJ3', 'NameFirst'=>'Dummy', 'NameLast' => 'Patient L', 'Gender'=>'6', 'BirthDate'=>'1997-02-02', 'Street_1'=>'Manila', 'EmailAddress1'=>'smaj3@5panda.id',
'Country'=>'325', 'Race'=>'176', 'Religion'=>'206', 'Ethnic'=>'219', 'DeathIndicator' => '16', 'CreateDate'=> "$now"]
];
$this->db->table('patient')->insertBatch($data);
$data = [
[ 'InternalPID'=>1, 'IdentifierType'=>'KTP', 'Identifier'=>'9901', 'CreateDate'=> "$now" ],
[ 'InternalPID'=>2, 'IdentifierType'=>'KTP', 'Identifier'=>'9902', 'CreateDate'=> "$now" ],
[ 'InternalPID'=>3, 'IdentifierType'=>'KTP', 'Identifier'=>'9903', 'CreateDate'=> "$now" ]
];
$this->db->table('patidt')->insertBatch($data);
// containerdef
$data = [
['ConCode' => '1','ConName' => 'SST', 'ConDesc' =>'Evacuated blood collection tube, gel separator', 'Additive' => "66", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '11','ConName' => 'Plain', 'ConDesc' =>'Evacuated blood collection tube, no additive/metal-free', 'Additive' => "67", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '12','ConName' => '2Hr PP', 'ConDesc' =>'Evacuated blood collection tube, untuk Glukosa 2 Jam PP', 'Additive' => "68", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '13','ConName' => 'Glukosa Sewaktu', 'ConDesc' =>'Evacuated blood collection tube, untuk Glukosa Sewaktu', 'Additive' => "69", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '14','ConName' => 'GTT 30 menit', 'ConDesc' =>'Evacuated blood collection tube, untuk GTT 30 menit', 'Additive' => "71", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '15','ConName' => 'GTT 60 menit', 'ConDesc' =>'Evacuated blood collection tube, untuk GTT 60 menit', 'Additive' => "71", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '16','ConName' => 'GTT 120 menit', 'ConDesc' =>'Evacuated blood collection tube, untuk GTT 90 menit', 'Additive' => "71", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '20','ConName' => 'RST', 'ConDesc' =>'Evacuated blood collection tube, thrombin/clot activator/gel separator', 'Additive' => "71", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '101','ConName' => 'EDTA - Hematologi', 'ConDesc' =>'Evacuated blood collection tube, K2EDTA/aprotinin', 'Additive' => "71", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '150','ConName' => 'Citrate - Koagulasi', 'ConDesc' =>'Evacuated blood collection tube, untuk koagulasi', 'Additive' => "71", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '200','ConName' => 'Aliquot', 'ConDesc' =>'General specimen container, no additive, non-sterile. Untuk aliquot', 'Additive' => "71", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '290','ConName' => 'Pot Urin', 'ConDesc' =>'Non-sterile urine specimen container IVD', 'Additive' => "71", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '295','ConName' => 'Urine Container', 'ConDesc' =>'Urine specimen container', 'Additive' => "71", 'ConClass' => '80', 'CreateDate'=> "$now"],
['ConCode' => '900','ConName' => 'Packing Pengiriman', 'ConDesc' =>'Specimen Transport Packaging', 'Additive' => "71", 'ConClass' => '81', 'CreateDate'=> "$now"],
];
$this->db->table('containerdef')->insertBatch($data);
}
}