Builds PaperTrail from the base skeleton into a full evidence-verification platform for the "Built with Claude: Life Sciences" hackathon (Builder Track). New named-user features (Build Beyond the Bench): - Lab Notebook Companion — rough bench notes -> structured, searchable, grounded experiment records (lib/labNotebook, /console/lab-notebook, migration 0059) - Clinical Trial Matcher — de-identified patient notes -> ranked eligible ClinicalTrials.gov trials with per-criterion inclusion/exclusion reasoning (lib/trialMatcher, /console/trial-matcher, migrations 0060) Platform: - Deterministic verification moat (biostats recompute, exact-span grounding) - 11 biomedical evidence engines (FAERS, GWAS, Open Targets, ChEMBL, ClinVar, PharmGKB, PubTator, DDI, repurposing, biomarker, unified verifier) - Evidence Intelligence (KG, dossier, provenance/export, RWE) + enterprise governance (RBAC, /api/v1 gateway, metering, audit chain, retention) - 17 OSS projects assimilated into native TypeScript on our stack (backend/engines retained + credited in NOTICE) - Multi-format upload (PDF/DOCX/XLSX/CSV/MD/TXT), logo, marketing site - Next.js 16 upgrade, benchmark harness (honest smoke-test caveat) Licensing: Apache-2.0 (LICENSE + NOTICE).
35 lines
1.0 KiB
TypeScript
35 lines
1.0 KiB
TypeScript
import type { AuditVerdict } from "@/lib/guidelineAudit/schemas";
|
|
|
|
// Per-claim verdict badge. Deterministic verdict → colour + label. Kept pure so the
|
|
// same mapping is reused in the summary bar and the table.
|
|
|
|
const STYLES: Record<AuditVerdict, { label: string; className: string }> = {
|
|
accurate: {
|
|
label: "Accurate",
|
|
className: "bg-emerald-500/10 text-emerald-600 ring-emerald-500/20",
|
|
},
|
|
overstated: {
|
|
label: "Overstated",
|
|
className: "bg-red-500/10 text-red-600 ring-red-500/20",
|
|
},
|
|
unsupported: {
|
|
label: "Unsupported",
|
|
className: "bg-amber-500/10 text-amber-600 ring-amber-500/20",
|
|
},
|
|
uncertain: {
|
|
label: "Uncertain",
|
|
className: "bg-slate-500/10 text-slate-600 ring-slate-500/20",
|
|
},
|
|
};
|
|
|
|
export function VerdictBadge({ verdict }: { verdict: AuditVerdict }) {
|
|
const style = STYLES[verdict];
|
|
return (
|
|
<span
|
|
className={`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ring-1 ring-inset ${style.className}`}
|
|
>
|
|
{style.label}
|
|
</span>
|
|
);
|
|
}
|