{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "report-01",
  "type": "registry:block",
  "description": "A biomarker report with a summary and results grouped by body system.",
  "files": [
    {
      "path": "registry/predict/blocks/report-01/page.tsx",
      "content": "\"use client\"\n\nimport { DownloadIcon, ShareIcon } from \"lucide-react\"\n\nimport { Badge } from \"@workspace/ui/components/badge\"\nimport { Button } from \"@workspace/ui/components/button\"\nimport { Separator } from \"@workspace/ui/components/separator\"\nimport {\n  Tabs,\n  TabsContent,\n  TabsList,\n  TabsTrigger,\n} from \"@workspace/ui/components/tabs\"\nimport {\n  biomarkerCategoryLabels,\n  biomarkerRange,\n  getBiomarker,\n  type BiomarkerCategory,\n} from \"@workspace/ui/lib/biomarkers\"\nimport { flagValue, isConcern } from \"@workspace/ui/lib/reference-range\"\nimport { ReferenceRange } from \"@workspace/ui/tools/reference-range\"\n\n// Example results, grouped the way the report reads.\nconst panel: Partial<Record<BiomarkerCategory, { id: string; value: number }[]>> = {\n  inflammation: [\n    { id: \"hs-crp\", value: 3.5 },\n    { id: \"nlr\", value: 3.2 },\n    { id: \"il-6\", value: 9.8 },\n    { id: \"tnf-alpha\", value: 4.1 },\n  ],\n  lipids: [\n    { id: \"total-cholesterol\", value: 225.6 },\n    { id: \"ldl-c\", value: 185.5 },\n    { id: \"hdl-c\", value: 35.7 },\n    { id: \"triglycerides\", value: 120 },\n  ],\n  metabolic: [\n    { id: \"fbs\", value: 94 },\n    { id: \"fsi\", value: 11 },\n    { id: \"hba1c\", value: 7.6 },\n  ],\n  kidney: [\n    { id: \"egfr\", value: 82.7 },\n    { id: \"creatinine\", value: 1.8 },\n    { id: \"bun\", value: 21.8 },\n    { id: \"albumin\", value: 4.3 },\n  ],\n}\n\nconst groups = Object.keys(panel) as BiomarkerCategory[]\n\nconst all = groups.flatMap((group) => panel[group]!)\n// Only count results on the side the direction marks as bad.\nconst outOfRange = all.filter(({ id, value }) => {\n  const range = biomarkerRange(getBiomarker(id)!)\n  return isConcern(flagValue(value, range), range.direction)\n}).length\n\nexport default function Page() {\n  return (\n    <div className=\"mx-auto flex w-full max-w-5xl flex-col gap-6 p-4 md:p-8\">\n      <header className=\"flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between\">\n        <div className=\"flex flex-col gap-1\">\n          <div className=\"flex items-center gap-2\">\n            <h1 className=\"text-xl font-medium tracking-tight\">Biomarker report</h1>\n            <Badge variant=\"outline\">October panel</Badge>\n          </div>\n          <p className=\"text-sm text-muted-foreground\">\n            Priya Sharma · Collected 12 Oct 2026 · Fasting 10 hours\n          </p>\n        </div>\n        <div className=\"flex gap-2\">\n          <Button variant=\"outline\" size=\"sm\">\n            <ShareIcon data-icon=\"inline-start\" />\n            Share\n          </Button>\n          <Button size=\"sm\">\n            <DownloadIcon data-icon=\"inline-start\" />\n            Download PDF\n          </Button>\n        </div>\n      </header>\n\n      <dl className=\"grid grid-cols-3 rounded-lg border\">\n        {[\n          { label: \"Biomarkers\", value: all.length },\n          { label: \"In range\", value: all.length - outOfRange },\n          { label: \"Needs attention\", value: outOfRange },\n        ].map((stat) => (\n          <div key={stat.label} className=\"flex flex-col gap-1 p-4 not-first:border-l\">\n            <dt className=\"text-xs text-muted-foreground\">{stat.label}</dt>\n            <dd className=\"text-2xl font-medium tabular-nums\">{stat.value}</dd>\n          </div>\n        ))}\n      </dl>\n\n      <Separator />\n\n      <Tabs defaultValue={groups[0]}>\n        <TabsList className=\"max-w-full overflow-x-auto\">\n          {groups.map((group) => (\n            <TabsTrigger key={group} value={group}>\n              {biomarkerCategoryLabels[group]}\n            </TabsTrigger>\n          ))}\n        </TabsList>\n        {groups.map((group) => (\n          <TabsContent key={group} value={group} className=\"pt-4\">\n            <div className=\"grid gap-4 sm:grid-cols-2\">\n              {panel[group]!.map(({ id, value }) => {\n                const biomarker = getBiomarker(id)!\n                return (\n                  <ReferenceRange\n                    key={id}\n                    name={biomarker.abbreviation}\n                    description={biomarker.name}\n                    value={value}\n                    unit={biomarker.unit}\n                    range={biomarkerRange(biomarker)}\n                    className=\"max-w-none\"\n                  />\n                )\n              })}\n            </div>\n          </TabsContent>\n        ))}\n      </Tabs>\n\n      <p className=\"text-xs text-muted-foreground\">\n        General information, not medical advice. Discuss your results with a clinician.\n      </p>\n    </div>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/report/page.tsx"
    }
  ],
  "meta": {
    "iframeHeight": "900px"
  },
  "categories": [
    "reports"
  ]
}