matab-panel/database/seeders/MedicationSeeder.php

38 lines
3.5 KiB
PHP

<?php
namespace Database\Seeders;
use App\Models\Medication;
use Illuminate\Database\Seeder;
class MedicationSeeder extends Seeder
{
public function run(): void
{
$medications = [
['name' => 'Cephalexin', 'dosage_form' => 'Cap', 'strength' => '500mg', 'quantity' => 20, 'timing' => 'q8h', 'notes' => '', 'is_default' => true, 'is_active' => true],
['name' => 'Brozyne Ultra', 'dosage_form' => 'Cap', 'strength' => '8mg', 'quantity' => 11, 'timing' => 'q12h', 'notes' => '', 'is_default' => true, 'is_active' => true],
['name' => 'Acetaminophen', 'dosage_form' => 'Tab', 'strength' => '#20', 'quantity' => null, 'timing' => '8h', 'notes' => '', 'is_default' => false, 'is_active' => true],
['name' => 'Cetirizin', 'dosage_form' => 'Tab', 'strength' => '#20', 'quantity' => null, 'timing' => '12h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'Serum', 'dosage_form' => 'Serum', 'strength' => 'N/S', 'quantity' => null, 'timing' => '11h', 'notes' => '', 'is_default' => false, 'is_active' => true],
['name' => 'Pedia', 'dosage_form' => 'Amp', 'strength' => '8mg', 'quantity' => null, 'timing' => '10h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'Phenyle Phrine', 'dosage_form' => 'Nasal Drop', 'strength' => '#1', 'quantity' => null, 'timing' => '8h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'Sodium Chloride', 'dosage_form' => 'Nasal Drop', 'strength' => '#1', 'quantity' => null, 'timing' => '8h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'آموکسی‌سیلین', 'dosage_form' => 'Cap', 'strength' => '500mg', 'quantity' => null, 'timing' => '8h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'متروندیازول', 'dosage_form' => 'Tab', 'strength' => '250mg', 'quantity' => null, 'timing' => '8h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'ایبوپروفن', 'dosage_form' => 'Tab', 'strength' => '400mg', 'quantity' => null, 'timing' => '8h', 'notes' => '', 'is_default' => false, 'is_active' => true],
['name' => 'دیکلوفناک', 'dosage_form' => 'Tab', 'strength' => '50mg', 'quantity' => null, 'timing' => '12h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'پردنیزولون', 'dosage_form' => 'Tab', 'strength' => '5mg', 'quantity' => null, 'timing' => '8&12h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'اومپرازول', 'dosage_form' => 'Cap', 'strength' => '20mg', 'quantity' => null, 'timing' => '24h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'ویتامین C', 'dosage_form' => 'Tab', 'strength' => '500mg', 'quantity' => null, 'timing' => '12h', 'notes' => null, 'is_default' => false, 'is_active' => true],
];
foreach ($medications as $item) {
Medication::firstOrCreate(
['name' => $item['name'], 'dosage_form' => $item['dosage_form']],
$item
);
}
}
}