clqms-be/app/Database/Seeds/DummySeeder.php

125 lines
9.3 KiB
PHP
Raw Normal View History

2025-09-11 11:09:04 +07:00
<?php
namespace App\Database\Seeds;
use CodeIgniter\Database\Seeder;
class DummySeeder extends Seeder {
2025-09-11 11:09:04 +07:00
public function run() {
2025-10-15 16:08:52 +07:00
$now = date('Y-m-d H:i:s');
2025-09-11 11:09:04 +07:00
// location
$data = [
2025-10-15 16:08:52 +07:00
['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" ]
2025-09-11 11:09:04 +07:00
];
$this->db->table('location')->insertBatch($data);
$data = [
2025-10-15 16:08:52 +07:00
['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"]
2025-09-11 11:09:04 +07:00
];
$this->db->table('locationaddress')->insertBatch($data);
2025-09-16 10:10:19 +07:00
// 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);
2025-09-22 15:37:25 +07:00
// contact
$data = [
2025-09-24 16:15:55 +07:00
['ContactID'=>1, 'NameFirst'=>'Default', 'NameLast'=>'Doctor', 'Title'=>'', 'Initial'=>'DEFDOC',
2025-10-15 16:08:52 +07:00
'Birthdate'=>'', 'EmailAddress1'=>'', 'EmailAddress2'=>'', 'Phone'=>'', 'MobilePhone1'=>'', 'MobilePhone2'=>'', 'Specialty'=>'', 'SubSpecialty'=>'', 'CreateDate'=> "$now" ],
2025-09-24 16:15:55 +07:00
['ContactID'=>2, 'NameFirst'=>'Dummy', 'NameLast'=>'Doctor', 'Title'=>'', 'Initial'=>'QDOC',
2025-10-15 16:08:52 +07:00
'Birthdate'=>'', 'EmailAddress1'=>'', 'EmailAddress2'=>'', 'Phone'=>'', 'MobilePhone1'=>'', 'MobilePhone2'=>'', 'Specialty'=>'', 'SubSpecialty'=>'', 'CreateDate'=> "$now" ]
2025-09-22 15:37:25 +07:00
];
$this->db->table('contact')->insertBatch($data);
$data = [
2025-09-24 16:15:55 +07:00
['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' ]
2025-09-22 15:37:25 +07:00
];
$this->db->table('contactdetail')->insertBatch($data);
$data = [
2025-10-15 16:08:52 +07:00
['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);
2025-09-22 15:37:25 +07:00
2025-09-23 16:55:28 +07:00
// patient
2025-09-16 10:10:19 +07:00
$data = [
2025-10-06 09:54:50 +07:00
[ 'InternalPID'=>1, 'PatientID'=>'SMAJ1', 'NameFirst'=>'Dummy', 'NameLast' => 'Patient M', 'Gender'=>'6', 'BirthDate'=>'1991-09-09', 'Street_1'=>'Makati', 'EmailAddress1'=>'smaj1@5panda.id',
'Province'=>'1', 'City'=>'37', 'Country'=>'325', 'Race'=>'175', 'Religion'=>'207', 'Ethnic'=>'218', 'DeathIndicator' => '16', 'CreateDate'=> "$now"],
2025-10-06 09:54:50 +07:00
[ 'InternalPID'=>2, 'PatientID'=>'SMAJ2', 'NameFirst'=>'Dummy', 'NameLast' => 'Patient F', 'Gender'=>'6', 'BirthDate'=>'1997-02-02', 'Street_1'=>'Manila', 'EmailAddress1'=>'smaj2@5panda.id',
'Province'=>'2', 'City'=>'60', 'Country'=>'325', 'Race'=>'176', 'Religion'=>'206', 'Ethnic'=>'219', 'DeathIndicator' => '16', 'CreateDate'=> "$now"],
2025-10-06 09:54:50 +07:00
[ 'InternalPID'=>3, 'PatientID'=>'SMAJ3', 'NameFirst'=>'Dummy', 'NameLast' => 'Patient L', 'Gender'=>'6', 'BirthDate'=>'1997-02-02', 'Street_1'=>'Manila', 'EmailAddress1'=>'smaj3@5panda.id',
'Province'=>'3', 'City'=>'103', 'Country'=>'325', 'Race'=>'176', 'Religion'=>'206', 'Ethnic'=>'219', 'DeathIndicator' => '16', 'CreateDate'=> "$now"]
2025-09-16 10:10:19 +07:00
];
$this->db->table('patient')->insertBatch($data);
$data = [
2025-10-15 16:08:52 +07:00
[ 'InternalPID'=>1, 'IdentifierType'=>'KTP', 'Identifier'=>'9901', 'CreateDate'=> "$now" ],
2025-10-19 22:36:31 +07:00
// [ 'InternalPID'=>2, 'IdentifierType'=>'KTP', 'Identifier'=>'9902', 'CreateDate'=> "$now" ],
2025-10-15 16:08:52 +07:00
[ 'InternalPID'=>3, 'IdentifierType'=>'KTP', 'Identifier'=>'9903', 'CreateDate'=> "$now" ]
2025-09-16 10:10:19 +07:00
];
$this->db->table('patidt')->insertBatch($data);
2025-10-19 22:36:31 +07:00
$data = [
[ "InternalPID" => 1, "Address" => "/api/upload/assasasasd" . 1 . ".jpg", 'CreateDate'=> "$now" ],
[ "InternalPID" => 1, "Address" => "/api/upload/adsasasds" . 2 . ".jpg", 'CreateDate'=> "$now" ],
[ "InternalPID" => 1, "Address" => "/api/upload/sasaasadjs" . 6 . ".jpg", 'CreateDate'=> "$now" ],
[ "InternalPID" => 1, "Address" => "/api/upload/sdjasass" . 5 . ".jpg", 'CreateDate'=> "$now" ],
[ "InternalPID" => 1, "Address" => "/api/upload/sdasasjs" . 4 . ".jpg", 'CreateDate'=> "$now" ],
];
$this->db->table('patatt')->insertBatch($data);
2025-10-15 16:08:52 +07:00
// 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);
2025-11-04 13:07:04 +07:00
// Organization
$data = [
[ 'AccountID' => 1, 'Parent' => null, 'AccountName' => 'Dummy Account', 'Initial'=>'QAC', 'Street_1'=>'Dummy Address', 'City'=>'Siti', 'Province'=>'Prop',
2025-11-05 15:03:55 +07:00
'ZIP'=>'505', 'Country'=>'Arab', 'AreaCode'=>'', 'EmailAddress1'=>'dummy@summit.co.id', 'Phone'=>'092029', 'Fax'=>'092029', 'CreateDate' => "$now" ]
2025-11-04 13:07:04 +07:00
];
$this->db->table('account')->insertBatch($data);
$data = [
[ 'SiteID' => 1, 'SiteCode' => 'QSIT', 'SiteName' => 'Dummy Site', 'AccountID'=>1, 'SiteTypeID'=>null, 'Parent'=>null, 'SiteClassID'=>null, 'ME'=>null, 'CreateDate' => "$now" ]
];
$this->db->table('site')->insertBatch($data);
$data = [
[ 'DisciplineID' => 1, 'DisciplineCode' => 'QDIS', 'DisciplineName' => 'Dummy Discipline', 'CreateDate' => "$now" ],
];
$this->db->table('discipline')->insertBatch($data);
$data = [
[ 'DepartmentID' => 1, 'DisciplineID' => 1, 'SiteID' => 1, 'DepartmentCode'=> 'QDEP', 'DepartmentName'=>'Dummy Department', 'CreateDate' => "$now" ],
];
$this->db->table('department')->insertBatch($data);
$data = [
[ 'WorkstationID' => 1, 'DepartmentID' => 1, 'WorkstationCode' => 'QWST', 'WorkstationName'=>'Dummy Workstation', 'Type'=>null, 'LinkTo'=> null, 'Enable'=>1,'CreateDate' => "$now" ],
];
$this->db->table('workstation')->insertBatch($data);
2025-09-11 11:09:04 +07:00
}
}