37 lines
1.5 KiB
PHP
37 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Database\Seeds;
|
|
|
|
use CodeIgniter\Database\Seeder;
|
|
|
|
class DummySeeder extends Seeder {
|
|
public function run() {
|
|
// location
|
|
$data = [
|
|
['LocationID'=>1, 'LocCode'=>'QLOC', 'LocFull'=>'Dummy Location', 'LocType'=>'ROOM', 'Description'=>'Location made for dummy testing' ]
|
|
];
|
|
$this->db->table('location')->insertBatch($data);
|
|
|
|
// locationAddress
|
|
$data = [
|
|
['LocationID'=>1, 'Street1'=>'Jalan Nginden', 'Street2'=>'Intan Raya', 'City'=>'Surabaya', 'Province'=>'East Java', 'PostCode'=>'60222']
|
|
];
|
|
$this->db->table('locationaddress')->insertBatch($data);
|
|
|
|
// patient
|
|
$data = [
|
|
[ 'InternalPID'=>1, 'PatientID'=>'SMAJ1', 'NameFirst'=>'Dummy', 'NameLast' => 'Patient M', 'Gender'=>'1', 'BirthDate'=>'1991-09-09', 'Street_1'=>'Makati', 'IntCountryID'=>'105', 'EmailAddress1'=>'smaj1@5panda.id',
|
|
'RaceID'=>'1', 'ReligionID'=>'1', 'EthnicID'=>'1', 'DeathIndicator' => '0'],
|
|
[ 'InternalPID'=>2, 'PatientID'=>'SMAJ2', 'NameFirst'=>'Dummy', 'NameLast' => 'Patient F', 'Gender'=>'2', 'BirthDate'=>'1997-02-02', 'Street_1'=>'Manila', 'IntCountryID'=>'105', 'EmailAddress1'=>'smaj2@5panda.id',
|
|
'RaceID'=>'1', 'ReligionID'=>'1', 'EthnicID'=>'1', 'DeathIndicator' => '0']
|
|
];
|
|
$this->db->table('patient')->insertBatch($data);
|
|
|
|
// patidt
|
|
$data = [
|
|
[ 'InternalPID'=>1, 'IdentifierType'=>'KTP', 'Identifier'=>'9901' ],
|
|
[ 'InternalPID'=>2, 'IdentifierType'=>'KTP', 'Identifier'=>'9902' ]
|
|
];
|
|
$this->db->table('patidt')->insertBatch($data);
|
|
}
|
|
} |