<?php

namespace Modules\VetClinic\Database\Seeders;

use Illuminate\Database\Seeder;
use Modules\VetClinic\Entities\VcMedicalCondition;

class MedicalConditionsSeeder extends Seeder
{
    public function run()
    {
        $conditions = [
            ['name' => 'Parvovirus',          'category' => 'Infectious',      'is_chronic' => false],
            ['name' => 'Distemper',           'category' => 'Infectious',      'is_chronic' => false],
            ['name' => 'Rabies',              'category' => 'Infectious',      'is_chronic' => false],
            ['name' => 'Kennel Cough',        'category' => 'Respiratory',     'is_chronic' => false],
            ['name' => 'Feline Leukemia',     'category' => 'Infectious',      'is_chronic' => true],
            ['name' => 'Diabetes Mellitus',   'category' => 'Metabolic',       'is_chronic' => true],
            ['name' => 'Obesity',             'category' => 'Metabolic',       'is_chronic' => true],
            ['name' => 'Arthritis',           'category' => 'Musculoskeletal', 'is_chronic' => true],
            ['name' => 'Hip Dysplasia',       'category' => 'Musculoskeletal', 'is_chronic' => true],
            ['name' => 'Dermatitis',          'category' => 'Dermatology',     'is_chronic' => false],
            ['name' => 'Mange',               'category' => 'Dermatology',     'is_chronic' => false],
            ['name' => 'Conjunctivitis',      'category' => 'Ophthalmology',   'is_chronic' => false],
            ['name' => 'Cataracts',           'category' => 'Ophthalmology',   'is_chronic' => true],
            ['name' => 'Urinary Tract Infection', 'category' => 'Urinary',    'is_chronic' => false],
            ['name' => 'Kidney Disease',      'category' => 'Urinary',         'is_chronic' => true],
            ['name' => 'Ear Infection',       'category' => 'ENT',             'is_chronic' => false],
            ['name' => 'Dental Disease',      'category' => 'Dental',          'is_chronic' => false],
            ['name' => 'Heartworm',           'category' => 'Parasitic',       'is_chronic' => false],
            ['name' => 'Ringworm',            'category' => 'Parasitic',       'is_chronic' => false],
            ['name' => 'Hypothyroidism',      'category' => 'Endocrine',       'is_chronic' => true],
            ['name' => 'Hyperthyroidism',     'category' => 'Endocrine',       'is_chronic' => true],
            ['name' => 'Epilepsy',            'category' => 'Neurological',    'is_chronic' => true],
            ['name' => 'Anemia',              'category' => 'Hematological',   'is_chronic' => false],
            ['name' => 'Liver Disease',       'category' => 'Gastrointestinal','is_chronic' => true],
            ['name' => 'Pancreatitis',        'category' => 'Gastrointestinal','is_chronic' => false],
            ['name' => 'Gastroenteritis',     'category' => 'Gastrointestinal','is_chronic' => false],
            ['name' => 'Allergies',           'category' => 'Immunological',   'is_chronic' => true],
            ['name' => 'Heart Disease',       'category' => 'Cardiovascular',  'is_chronic' => true],
            ['name' => 'Respiratory Infection','category' => 'Respiratory',    'is_chronic' => false],
            ['name' => 'Cancer / Tumor',      'category' => 'Oncology',        'is_chronic' => true],
        ];

        foreach ($conditions as $condition) {
            VcMedicalCondition::firstOrCreate(
                ['name' => $condition['name'], 'business_id' => null],
                array_merge($condition, ['status' => 'active'])
            );
        }
    }
}
