initial commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user