try fix similaruuty and add seed for master excel icd

This commit is contained in:
arifal
2025-08-23 03:25:15 +07:00
parent b77beb2d85
commit 0ad656ce35
14 changed files with 1274 additions and 223 deletions

27
prisma/seed/seed.ts Normal file
View File

@@ -0,0 +1,27 @@
import { PrismaClient } from '@prisma/client';
import { IcdSeeder } from './icd/icd.seed';
const prisma = new PrismaClient();
async function main() {
console.log('Starting database seeding...');
try {
// Seed ICD data
const icdSeeder = new IcdSeeder();
const icdResult = await icdSeeder.seed();
console.log('ICD seeding completed:', icdResult);
await icdSeeder.disconnect();
console.log('Database seeding completed successfully!');
} catch (error) {
console.error('Error during seeding:', error);
throw error;
}
}
main()
.catch(console.error)
.finally(() => {
void prisma.$disconnect();
});