Generate and load NMC CBME curriculum seed data into Prisma database. Creates subjects, modules, topics, NMC competency codes, and AETCOM modules. Use when adding new subjects or restructuring the curriculum database. Accepts a subject code or "all" as argument. Examples: /seed-curriculum AN (Anatomy), /seed-curriculum PY (Physiology), /seed-curriculum all
Generate Prisma-compatible seed data for the MBBS curriculum and insert it into the database.
$ARGUMENTS = Subject code (e.g., "AN", "PY", "BI") or "all" for complete curriculumInvoke the curriculum-architect agent to generate the subject structure:
Generate a TypeScript seed file at prisma/seeds/seed-{subjectCode}.ts:
import { PrismaClient } from "@/generated/prisma/client";
export async function seedSubject(prisma: PrismaClient) {
const subject = await prisma.subject.upsert({
where: { code: "AN" },
update: {},
create: {
name: "Anatomy",
code: "AN",
phase: "PHASE_1",
totalHours: 700,
description: "...",
sortOrder: 1,
},
});
// ... modules, topics, competencies
}
Update prisma/seed.ts to import and call the new seed function.
Run the seed: npx prisma db seed
Verify by querying: count subjects, modules, topics, competencies.
| Code | Subject | Phase |
|---|---|---|
| AN | Anatomy | PHASE_1 |
| PY | Physiology | PHASE_1 |
| BI | Biochemistry | PHASE_1 |
| PA | Pathology | PHASE_2 |
| PH | Pharmacology | PHASE_2 |
| MI | Microbiology | PHASE_2 |
| FM | Forensic Medicine | PHASE_3_PART1 |
| CM | Community Medicine | PHASE_3_PART1 |
| EN | ENT | PHASE_3_PART1 |
| OP | Ophthalmology | PHASE_3_PART1 |
| IM | Medicine | PHASE_3_PART2 |
| SU | Surgery | PHASE_3_PART2 |
| OG | Obstetrics & Gynecology | PHASE_3_PART2 |
| PE | Pediatrics | PHASE_3_PART2 |
| DR | Dermatology | PHASE_3_PART2 |
| PS | Psychiatry | PHASE_3_PART2 |
| OR | Orthopedics | PHASE_3_PART2 |
| AS | Anesthesiology | PHASE_3_PART2 |
| RD | Radiology | PHASE_3_PART2 |