Skip to content

Commit

Permalink
Add Hospitals list to seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
francisli committed Sep 4, 2024
1 parent 93a8e7f commit 1459303
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions server/prisma/seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,27 @@ async function seedMedications() {
}
}

async function seedHospitals() {
const hospitals = [
'SF General',
'CPMC Van Ness',
'CPMC Davies',
'CPMC Mission Bernal',
'Kaiser SF',
'St. Francis',
"St. Mary's",
'Chinese Hospital',
'VA Med. Center',
'UCSF Parnassus',
];
const data = {};
for (const name of hospitals) {
data.name = name;
await prisma.hospital.create({ data });
}
console.log('Hospitals seeded successfully');
}

async function seedAdminUser() {
const now = new Date();
const data = {};
Expand Down Expand Up @@ -217,6 +238,7 @@ async function main() {
await seedMedicationAllergies();
await seedEnvFoodAllergies();
await seedMedications();
await seedHospitals();
await seedUsers();
}

Expand Down

0 comments on commit 1459303

Please sign in to comment.