<?php

namespace App\Database\Seeds;

use CodeIgniter\Database\Seeder;

class ContactSeeder extends Seeder {

  public function run() {
    $now = date('Y-m-d H:i:s');
    
    // contact
    $data = [
      [
        'ContactID' => 1, 'NameFirst' => 'Default', 'NameLast' => 'Doctor', 'Title' => '', 'Initial' => 'DEFDOC', 
        'Birthdate' => '', 'EmailAddress1' => 'd1@as.com', 'EmailAddress2' => '', 'Phone' => '', 'MobilePhone1' => '', 'MobilePhone2' => '', 'Specialty' => '', 'SubSpecialty' => '', 'CreateDate' => "$now" 
      ],
      [
        'ContactID' => 2, 'NameFirst' => 'Dummy', 'NameLast' => 'Doctor', 'Title' => '', 'Initial' => 'QDOC',
        'Birthdate' => '', 'EmailAddress1' => 'd2a@gmail.com', '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);
    
    $data = [
      ['SpecialtyID' => '1', 'SpecialtyText' => 'Anak', 'Parent' => '', 'Title' => 'Sp. A', 'CreateDate' => "$now"],
      ['SpecialtyID' => '2', 'SpecialtyText' => 'Andrologi', 'Parent' => '', 'Title' => 'Sp. And', 'CreateDate' => "$now"],
      ['SpecialtyID' => '3', 'SpecialtyText' => 'Anestesiologi dan Terapi Intensif', 'Parent' => '', 'Title' => 'Sp.An-TI', 'CreateDate' => "$now"],
      ['SpecialtyID' => '4', 'SpecialtyText' => 'Akupunktur Medik', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '5', 'SpecialtyText' => 'Bedah', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '6', 'SpecialtyText' => 'Bedah Anak', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '7', 'SpecialtyText' => 'Bedah Plastik, Rekonstruksi, dan Estetik', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '8', 'SpecialtyText' => 'Bedah Saraf', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '9', 'SpecialtyText' => 'Bedah Toraks, Kardiak, dan Vaskular', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '10', 'SpecialtyText' => 'Dermatologi Venereologi Estetika', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '11', 'SpecialtyText' => 'Emergency Medicine (Kegawatdaruratan Medik)', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '12', 'SpecialtyText' => 'Farmakologi Klinik', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '13', 'SpecialtyText' => 'Forensik dan Medikolegal', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '14', 'SpecialtyText' => 'Gizi Klinik', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '15', 'SpecialtyText' => 'Jantung dan Pembuluh Darah', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '16', 'SpecialtyText' => 'Kedokteran Fisik dan Rehabilitasi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '17', 'SpecialtyText' => 'Kedokteran Jiwa', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '18', 'SpecialtyText' => 'Kedokteran Kelautan', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '19', 'SpecialtyText' => 'Kedokteran Keluarga Layanan Primer', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '20', 'SpecialtyText' => 'Kedokteran Nuklir dan Teranostik Molekuler', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '21', 'SpecialtyText' => 'Kedokteran Okupasi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '22', 'SpecialtyText' => 'Kedokteran Olahraga', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '23', 'SpecialtyText' => 'Kedokteran Penerbangan', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '24', 'SpecialtyText' => 'Mikrobiologi Klinik', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '25', 'SpecialtyText' => 'Neurologi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '26', 'SpecialtyText' => 'Obstetri dan Ginekologi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '27', 'SpecialtyText' => 'Oftalmologi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '28', 'SpecialtyText' => 'Onkologi Radiasi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '29', 'SpecialtyText' => 'Orthopaedi dan Traumatologi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '30', 'SpecialtyText' => 'Parasitologi Klinik', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '31', 'SpecialtyText' => 'Patologi Anatomi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '32', 'SpecialtyText' => 'Patologi Klinik', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '33', 'SpecialtyText' => 'Penyakit Dalam', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '34', 'SpecialtyText' => 'Pulmonologi dan Kedokteran Respirasi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '35', 'SpecialtyText' => 'Radiologi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '36', 'SpecialtyText' => 'Telinga Hidung Tenggorok Bedah Kepala Leher', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '37', 'SpecialtyText' => 'Urologi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '38', 'SpecialtyText' => 'Bedah Mulut dan Maksilofasial', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '39', 'SpecialtyText' => 'Kedokteran Gigi Anak', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '40', 'SpecialtyText' => 'Konservasi Gigi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '41', 'SpecialtyText' => 'Odontologi Forensik', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '42', 'SpecialtyText' => 'Ortodonsia', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '43', 'SpecialtyText' => 'Patologi Mulut dan Maksilofasial', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '44', 'SpecialtyText' => 'Penyakit Mulut', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '45', 'SpecialtyText' => 'Periodonsia', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '46', 'SpecialtyText' => 'Prostodonsia', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '47', 'SpecialtyText' => 'Radiologi Kedokteran Gigi', 'Parent' => '', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '48', 'SpecialtyText' => 'Alergi-Immunologi Klinik', 'Parent' => '33', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '49', 'SpecialtyText' => 'Gastroenterologi-Hepatologi', 'Parent' => '33', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '50', 'SpecialtyText' => 'Geriatri', 'Parent' => '33', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '51', 'SpecialtyText' => 'Ginjal-Hipertensi', 'Parent' => '33', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '52', 'SpecialtyText' => 'Hematologi-Onkologi Medik', 'Parent' => '33', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '53', 'SpecialtyText' => 'Kardiovaskular', 'Parent' => '33', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '54', 'SpecialtyText' => 'Endokrin-Metabolik-Diabetes', 'Parent' => '33', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '55', 'SpecialtyText' => 'Psikosomatik dan Paliatif Medik', 'Parent' => '33', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '56', 'SpecialtyText' => 'Pulmonologi dan Medik Kritis', 'Parent' => '33', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '57', 'SpecialtyText' => 'Reumatologi', 'Parent' => '33', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '58', 'SpecialtyText' => 'Penyakit Tropik-Infeksi', 'Parent' => '33', 'Title' => '', 'CreateDate' => "$now"],
      ['SpecialtyID' => '59', 'SpecialtyText' => 'Alergi Imunologi', 'Parent' => '1', 'Title' => 'Subsp.AI', 'CreateDate' => "$now"],
      ['SpecialtyID' => '60', 'SpecialtyText' => 'Endokrinologi', 'Parent' => '1', 'Title' => 'Subsp.End', 'CreateDate' => "$now"],
      ['SpecialtyID' => '61', 'SpecialtyText' => 'Gastro-Hepatologi', 'Parent' => '1', 'Title' => 'Subsp.GH', 'CreateDate' => "$now"],
      ['SpecialtyID' => '62', 'SpecialtyText' => 'Hematologi Onkologi', 'Parent' => '1', 'Title' => 'Subsp.HO', 'CreateDate' => "$now"],
      ['SpecialtyID' => '63', 'SpecialtyText' => 'Infeksi dan Pediatri Tropis', 'Parent' => '1', 'Title' => 'Subsp.IPT', 'CreateDate' => "$now"],
      ['SpecialtyID' => '64', 'SpecialtyText' => 'Kardiologi', 'Parent' => '1', 'Title' => 'Subsp.Kardio', 'CreateDate' => "$now"],
      ['SpecialtyID' => '65', 'SpecialtyText' => 'Nefrologi', 'Parent' => '1', 'Title' => 'Subsp.Nefro', 'CreateDate' => "$now"],
      ['SpecialtyID' => '66', 'SpecialtyText' => 'Neurologi', 'Parent' => '1', 'Title' => 'Subsp.Neuro', 'CreateDate' => "$now"],
      ['SpecialtyID' => '67', 'SpecialtyText' => 'Nutrisi dan Penyakit Metabolik', 'Parent' => '1', 'Title' => 'Subsp.NPM', 'CreateDate' => "$now"],
      ['SpecialtyID' => '68', 'SpecialtyText' => 'Emergensi dan Rawat Intensif Anak', 'Parent' => '1', 'Title' => 'Subsp.ERIA', 'CreateDate' => "$now"],
      ['SpecialtyID' => '69', 'SpecialtyText' => 'Pencitraan', 'Parent' => '1', 'Title' => 'Subsp.PCT', 'CreateDate' => "$now"],
      ['SpecialtyID' => '70', 'SpecialtyText' => 'Neonatologi', 'Parent' => '1', 'Title' => 'Subsp.Neo', 'CreateDate' => "$now"],
      ['SpecialtyID' => '71', 'SpecialtyText' => 'Respirologi', 'Parent' => '1', 'Title' => 'Subsp.Resp', 'CreateDate' => "$now"],
      ['SpecialtyID' => '72', 'SpecialtyText' => 'Tumbuh Kembang Pediatri Sosial', 'Parent' => '1', 'Title' => 'Subsp.TKPS', 'CreateDate' => "$now"],
    ];
    $this->db->table('medicalspecialty')->insertBatch($data);

  }
}