Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a deterministic verification core: clinical-trial claims checked against ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI recomputed in code, oracle-tested), code-enforced exact-span grounding, and multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing at scale (unpdf + Docling), agentic workflows, Claude Science connector, compliance/audit, billing, public API, and more. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
51 lines
1.7 KiB
TypeScript
51 lines
1.7 KiB
TypeScript
import { ExtractedFinding } from "@/lib/schemas";
|
|
|
|
interface FindingCardProps {
|
|
finding: ExtractedFinding;
|
|
}
|
|
|
|
function isReported(value: string): boolean {
|
|
return value.trim().toLowerCase() !== "not reported" && value.trim() !== "";
|
|
}
|
|
|
|
function FieldRow({ label, value }: { label: string; value: string }) {
|
|
const reported = isReported(value);
|
|
return (
|
|
<div>
|
|
<div className="text-xs font-medium uppercase tracking-wide text-ink/40">{label}</div>
|
|
<p className={`mt-0.5 text-sm ${reported ? "text-ink/70" : "text-ink/40 italic"}`}>
|
|
{reported ? value : "Not reported"}
|
|
</p>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export function FindingCard({ finding }: FindingCardProps) {
|
|
const caveats = finding.caveats.filter((caveat) => caveat.trim() !== "");
|
|
return (
|
|
<div className="rounded-lg border border-ink/10 bg-white p-4">
|
|
<div className="mb-3 text-xs font-medium uppercase tracking-wide text-ink/40">
|
|
What the source found
|
|
</div>
|
|
<div className="space-y-3">
|
|
<FieldRow label="Effect size" value={finding.effect_size} />
|
|
<FieldRow label="Population" value={finding.population} />
|
|
<FieldRow label="Condition" value={finding.condition} />
|
|
<FieldRow label="Endpoint" value={finding.endpoint} />
|
|
<div>
|
|
<div className="text-xs font-medium uppercase tracking-wide text-ink/40">Caveats</div>
|
|
{caveats.length > 0 ? (
|
|
<ul className="mt-1 list-disc space-y-1 pl-5 text-sm text-ink/70">
|
|
{caveats.map((caveat, index) => (
|
|
<li key={index}>{caveat}</li>
|
|
))}
|
|
</ul>
|
|
) : (
|
|
<p className="mt-0.5 text-sm italic text-ink/40">None reported</p>
|
|
)}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|