45 lines
2.1 KiB
PHP
45 lines
2.1 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);
|
|
$data = [
|
|
['LocationID'=>1, 'Street1'=>'Jalan Nginden', 'Street2'=>'Intan Raya', 'City'=>'Surabaya', 'Province'=>'East Java', 'PostCode'=>'60222']
|
|
];
|
|
$this->db->table('locationaddress')->insertBatch($data);
|
|
|
|
// contact
|
|
$data = [
|
|
['ContactID'=>1, 'NameFirst'=>'Default', 'NameLast'=>'Doctor', 'Title'=>'', 'Initial'=>'DEFDOC', 'Birthdate'=>'', 'EmailAddress1'=>'', 'EmailAddress2'=>'',
|
|
'Phone'=>'', 'MobilePhone1'=>'', 'MobilePhone2'=>'', 'Specialty'=>'', 'SubSpecialty'=>'' ]
|
|
];
|
|
$this->db->table('contact')->insertBatch($data);
|
|
$data = [
|
|
['ContactID'=>1, 'ContactCode'=>'QDOC', 'ContactEmail'=>'qdoc@email.com', 'OccupationID'=>'',
|
|
'JobTitle'=>'', 'Department'=>'', 'ContactStartDate'=>'', 'ContactEndDate'=>'' ]
|
|
];
|
|
$this->db->table('contactdetail')->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);
|
|
$data = [
|
|
[ 'InternalPID'=>1, 'IdentifierType'=>'KTP', 'Identifier'=>'9901' ],
|
|
[ 'InternalPID'=>2, 'IdentifierType'=>'KTP', 'Identifier'=>'9902' ]
|
|
];
|
|
$this->db->table('patidt')->insertBatch($data);
|
|
}
|
|
} |