Basepair
Basepair watches for one specific kind of preventable mistake.
Core trick
Matches a patient's genotype against 2,115 CPIC and DPWG rules on prescribing events, holding conflicts for one-click pharmacist sign-off.
Tags
Description
Basepair watches for one specific kind of preventable mistake. A patient's genetics can make a drug useless or dangerous. Clopidogrel does nothing for a CYP2C19 poor metabolizer. Some HLA-B carriers can die from a normal dose of abacavir. The hospital usually has the genetic result sitting in a file somewhere, but when a doctor prescribes months later, nobody re-checks it, and the patient gets the wrong drug.
So I built the thing that re-checks. Basepair listens to prescribing events from the EHR, matches the patient's genotype against 2,115 published CPIC and DPWG rules, and catches the ones that conflict. Each conflict becomes a short, cited alert that a pharmacist clears in one click before the drug goes out. It runs as a durable task that waits for that human decision and records the whole exchange as FHIR.
The part I care about most is that the model never makes the call. A plain lookup finds the rule. Claude only reads the messy inputs and checks each alert against the guideline's actual words. The bar is a published citation.
README excerpt
# Basepair An always-on, EHR-embedded pharmacogenomics (PGx) safety service. It catches dangerous drug-gene mismatches at the moment of prescribing and holds them for a clinical pharmacist's one-click sign-off, with the exact published guideline citation. Built for the **Built with Claude: Life Sciences** hackathon (Build track) with Claude Code and the Vercel AI SDK. For how Claude Code built it, including an autonomous refactor loop and a run where Claude dogfooded its own console, see [docs/CLAUDE_USAGE.md](./docs/CLAUDE_USAGE.md). ## The idea in one paragraph Some drugs are useless or dangerous for patients with certain genetic variants (for example, clopidogrel does not work in CYP2C19 poor metabolizers). Health systems often have the genetic result on file, but nobody re-checks it when a drug is later prescribed, so preventable adverse events slip through. Basepair watches prescription events, cross-checks the patient's genetics against the published CPIC/DPWG guidelines, and surfaces a verified, cited alert to a pharmacist before the drug reaches the patient. The AI does not make clinical judgments; it parses messy inputs and verifies each alert against the guideline text, so the correctness bar is a published rule, not an opinion. ## Stack Next.js 16, TypeScript, Bun, Drizzle, Supabase (app config + RLS), Better Auth (email/password console login), Trigger.dev (durable evaluation tasks + wait-token approvals), Upstash Redis (ratelimit / cache), Pinecone (guideli