Inspiration## Inspiration

Dosing errors are one of the most common and dangerous mistakes in clinical practice — small things like a misplaced decimal, mg/mcg confusion, or forgetting to adjust for a patient's condition can have serious consequences. Students get very little repeated, low-stakes practice at exactly this skill before they're doing it for real. We wanted to build something that gives students unlimited, realistic practice with instant, explained feedback — not just a static textbook problem set.

What it does

DoseDrill generates a realistic drug-dosing scenario based on a patient's drug, age, weight, and condition, tailored to a category (Pediatric, Renal Impairment, Pregnancy, Adult standard etc.) and difficulty level the student picks. The student calculates and submits their answer, and the AI grades it with a full explanation of the correct reasoning — right or wrong. It also includes an optional "dosing trap" mode, where the AI deliberately builds a scenario around a classic real-world dosing error, then reveals what the trap was afterward — training students to spot the mistakes that actually cause harm in practice. Progress is tracked locally on the student's device, with an accuracy breakdown by category so they can see exactly where they're weak.

How we built it

The frontend is plain HTML, CSS, and JavaScript — no framework — kept deliberately lightweight. The backend is a Vercel serverless function that calls the Google Gemini API to generate scenarios and grade answers. Progress history is stored client-side using the browser's localStorage, so no database is required. The whole thing is deployed on Vercel.

Challenges we ran into

Getting the AI to reliably generate scenarios that scaled correctly across three difficulty levels while staying medically coherent took some prompt iteration. We also ran into a tricky CSS specificity bug where a later stylesheet rule was silently overriding our JavaScript's show/hide logic for the dosing-trap badge — a good reminder that not every bug is where you first assume it is.

Accomplishments that we're proud of

Getting the trap-mode feature working end-to-end — where the AI actually understands and executes a "deliberately hide a common error in this scenario" instruction — feels like a genuinely useful teaching tool, not just a gimmick.

What we learned

How to design AI prompts that adapt reliably across different structured inputs (difficulty, category, trap mode) without the output becoming inconsistent or losing educational value.

What's next for DoseDrill

Expanding the drug and condition database, adding more nuanced difficulty scaling, and potentially supporting multi-question timed practice sessions for exam prep making it a go to study app for students.

Built With

Share this project:

Updates

Submission history