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 PatientCategorySeeder
|
|
{
|
|
public static async Task GenerateDataAsync(AppDbContext context)
|
|
{
|
|
if (await context.PatientCategory.AnyAsync()) return;
|
|
|
|
var patientCategories = new List<PatientCategory>
|
|
{
|
|
new PatientCategory { Name = "New Patient" },
|
|
new PatientCategory { Name = "Returning / Existing Patient" },
|
|
new PatientCategory { Name = "Walk-in Patient" },
|
|
new PatientCategory { Name = "Referred Patient" },
|
|
new PatientCategory { Name = "Emergency / Urgent Care" },
|
|
new PatientCategory { Name = "Regular Outpatient" },
|
|
new PatientCategory { Name = "Day Care / Observation" },
|
|
new PatientCategory { Name = "Telemedicine Patient" },
|
|
new PatientCategory { Name = "Home Care Patient" },
|
|
new PatientCategory { Name = "Routine Medical Checkup" }
|
|
};
|
|
|
|
foreach (var category in patientCategories)
|
|
{
|
|
await context.PatientCategory.AddAsync(category);
|
|
}
|
|
|
|
await context.SaveChangesAsync();
|
|
}
|
|
} |