35 lines
1.4 KiB
C#
35 lines
1.4 KiB
C#
using Indotalent.Data.Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Indotalent.Infrastructure.Database.Demo;
|
|
|
|
public static class MedicalRecordGroupSeeder
|
|
{
|
|
public static async Task GenerateDataAsync(AppDbContext context)
|
|
{
|
|
if (await context.MedicalRecordGroup.AnyAsync()) return;
|
|
|
|
var medicalGroups = new List<MedicalRecordGroup>
|
|
{
|
|
new MedicalRecordGroup { Name = "Family Medicine" },
|
|
new MedicalRecordGroup { Name = "Internal Medicine" },
|
|
new MedicalRecordGroup { Name = "Pediatrics" },
|
|
new MedicalRecordGroup { Name = "Obstetrics & Gynecology (OB/GYN)" },
|
|
new MedicalRecordGroup { Name = "Cardiology" },
|
|
new MedicalRecordGroup { Name = "Dermatology" },
|
|
new MedicalRecordGroup { Name = "Dentistry & Oral Health" },
|
|
new MedicalRecordGroup { Name = "Emergency Medicine" },
|
|
new MedicalRecordGroup { Name = "Urgent Care" },
|
|
new MedicalRecordGroup { Name = "Physical Therapy & Rehab" },
|
|
new MedicalRecordGroup { Name = "Psychiatry & Behavioral Health" },
|
|
new MedicalRecordGroup { Name = "Occupational Health" }
|
|
};
|
|
|
|
foreach (var group in medicalGroups)
|
|
{
|
|
await context.MedicalRecordGroup.AddAsync(group);
|
|
}
|
|
|
|
await context.SaveChangesAsync();
|
|
}
|
|
} |