33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
using Indotalent.Data.Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Indotalent.Infrastructure.Database.Demo;
|
|
|
|
public static class PatientGroupSeeder
|
|
{
|
|
public static async Task GenerateDataAsync(AppDbContext context)
|
|
{
|
|
if (await context.PatientGroup.AnyAsync()) return;
|
|
|
|
var patientGroups = new List<PatientGroup>
|
|
{
|
|
new PatientGroup { Name = "Self-Pay / General Patients" },
|
|
new PatientGroup { Name = "Private Health Insurance" },
|
|
new PatientGroup { Name = "Government Insurance / BPJS" },
|
|
new PatientGroup { Name = "Corporate Partner Employees" },
|
|
new PatientGroup { Name = "Pediatric & Child Care" },
|
|
new PatientGroup { Name = "Maternity & Women's Health" },
|
|
new PatientGroup { Name = "Geriatric & Senior Care" },
|
|
new PatientGroup { Name = "Chronic Disease Management" },
|
|
new PatientGroup { Name = "External Clinic Referrals" },
|
|
new PatientGroup { Name = "VIP / Premium Care Members" }
|
|
};
|
|
|
|
foreach (var group in patientGroups)
|
|
{
|
|
await context.PatientGroup.AddAsync(group);
|
|
}
|
|
|
|
await context.SaveChangesAsync();
|
|
}
|
|
} |