{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dashboard-01",
  "title": "Dashboard 01",
  "description": "One patient at a glance: vital signs, a live ECG, lab results with trends and the day's medicines, with fictional data to replace with your records.",
  "registryDependencies": [
    "badge",
    "card",
    "@organui/ecg-trace",
    "@organui/lab-results",
    "@organui/medication-schedule",
    "@organui/vital-signs"
  ],
  "files": [
    {
      "path": "registry/base-nova/blocks/dashboard-01/page.tsx",
      "content": "import {\n  examplePatient,\n  PatientDashboard,\n} from \"@/components/patient-dashboard\"\n\nexport default function Page() {\n  return (\n    <main className=\"mx-auto w-full max-w-7xl p-4 md:p-6\">\n      <PatientDashboard patient={examplePatient} />\n    </main>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/dashboard/page.tsx"
    },
    {
      "path": "registry/base-nova/blocks/dashboard-01/components/patient-dashboard.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { Badge } from \"@/components/ui/badge\"\nimport {\n  Card,\n  CardContent,\n  CardDescription,\n  CardHeader,\n  CardTitle,\n} from \"@/components/ui/card\"\nimport { EcgTrace, syntheticEcgStream } from \"@/components/ui/ecg-trace\"\nimport { LabResultsTable, type LabResult } from \"@/components/ui/lab-results\"\nimport {\n  MedicationSchedule,\n  type DoseStatus,\n  type Medication,\n  type MedicationInteraction,\n} from \"@/components/ui/medication-schedule\"\nimport { VitalSigns, type VitalReadings } from \"@/components/ui/vital-signs\"\nimport { IconPlaceholder } from \"@/icons/icon-placeholder\"\n\nexport type Patient = {\n  name: string\n  /** Shown under the name, such as age, ward and bed. */\n  details: string\n  /** Shown as badges beside the name, such as allergies. */\n  alerts?: readonly string[]\n  vitals: VitalReadings\n  /** When the vitals were taken. */\n  vitalsTakenAt: string\n  labs: readonly LabResult[]\n  medications: readonly Medication[]\n  interactions?: readonly MedicationInteraction[]\n  /** The day the schedule opens on, as YYYY-MM-DD. */\n  date: string\n  /** The current time, as HH:mm, to mark doses due. */\n  now?: string\n}\n\n/**\n * One patient at a glance: vitals, a live ECG, labs with trends and today's\n * medicines. Replace examplePatient with your own records.\n */\nexport function PatientDashboard({ patient }: { patient: Patient }) {\n  const stream = React.useMemo(\n    () => syntheticEcgStream({ heartRate: patient.vitals.heartRate ?? 72 }),\n    [patient.vitals.heartRate]\n  )\n  const [date, setDate] = React.useState(patient.date)\n  const [doseStatus, setDoseStatus] = React.useState<\n    Record<string, DoseStatus>\n  >({})\n\n  return (\n    // The page provides the main landmark, so the dashboard also fits\n    // inside an app layout that has one.\n    <div className=\"flex flex-col gap-6\">\n      <header className=\"flex flex-col gap-2\">\n        <div className=\"flex flex-wrap items-center gap-2\">\n          <h1 className=\"text-2xl font-semibold tracking-tight\">\n            {patient.name}\n          </h1>\n          {/* Outlined with an icon: red is kept for critical values. */}\n          {patient.alerts?.map((alert) => (\n            <Badge key={alert} variant=\"outline\">\n              <IconPlaceholder\n                lucide=\"TriangleAlertIcon\"\n                tabler=\"IconAlertTriangle\"\n                hugeicons=\"Alert02Icon\"\n                phosphor=\"WarningIcon\"\n                remixicon=\"RiErrorWarningLine\"\n                aria-hidden=\"true\"\n                data-icon=\"inline-start\"\n              />\n              {alert}\n            </Badge>\n          ))}\n        </div>\n        <p className=\"text-sm text-muted-foreground\">{patient.details}</p>\n      </header>\n      <div className=\"grid grid-cols-1 items-start gap-6 lg:grid-cols-[minmax(0,3fr)_minmax(0,2fr)]\">\n        <VitalSigns\n          readings={patient.vitals}\n          description={`Taken ${patient.vitalsTakenAt}`}\n        />\n        <Card>\n          <CardHeader>\n            <CardTitle>Heart rhythm</CardTitle>\n            <CardDescription>Live monitor, synthetic signal</CardDescription>\n          </CardHeader>\n          <CardContent>\n            <EcgTrace stream={stream} label=\"Live ECG\" />\n          </CardContent>\n        </Card>\n        <Card>\n          <CardHeader>\n            <CardTitle>Lab results</CardTitle>\n            <CardDescription>Latest values and their trend</CardDescription>\n          </CardHeader>\n          <CardContent>\n            <LabResultsTable\n              results={patient.labs}\n              caption={`Lab results for ${patient.name}`}\n            />\n          </CardContent>\n        </Card>\n        <MedicationSchedule\n          medications={patient.medications}\n          interactions={patient.interactions}\n          date={date}\n          onDateChange={setDate}\n          doseStatus={doseStatus}\n          onDoseStatusChange={setDoseStatus}\n          now={patient.now}\n        />\n      </div>\n      <p className=\"text-xs text-muted-foreground\">\n        Fictional patient and synthetic ECG. Not for clinical use.\n      </p>\n    </div>\n  )\n}\n\n// A fictional patient, so the page shows something before you connect your\n// own records. Not a treatment plan or clinical guidance.\nexport const examplePatient: Patient = {\n  name: \"Sam Okafor\",\n  details: \"64 years · Ward 4B, bed 12 · Admitted Oct 17\",\n  alerts: [\"Penicillin allergy\"],\n  vitals: {\n    heartRate: 88,\n    systolic: 142,\n    diastolic: 86,\n    spo2: 95,\n    temperature: 37.4,\n  },\n  vitalsTakenAt: \"at 09:40\",\n  labs: [\n    {\n      id: \"glucose\",\n      name: \"Glucose, fasting\",\n      value: 118,\n      unit: \"mg/dL\",\n      date: \"2026-10-19\",\n      referenceRange: { low: 70, high: 99, criticalLow: 40, criticalHigh: 400 },\n      history: [\n        { value: 104, date: \"2026-10-17\" },\n        { value: 111, date: \"2026-10-18\" },\n        { value: 118, date: \"2026-10-19\" },\n      ],\n    },\n    {\n      id: \"potassium\",\n      name: \"Potassium\",\n      value: 4.1,\n      unit: \"mmol/L\",\n      decimals: 1,\n      date: \"2026-10-19\",\n      referenceRange: {\n        low: 3.5,\n        high: 5.1,\n        criticalLow: 2.5,\n        criticalHigh: 6.5,\n      },\n      history: [\n        { value: 3.6, date: \"2026-10-17\" },\n        { value: 3.9, date: \"2026-10-18\" },\n        { value: 4.1, date: \"2026-10-19\" },\n      ],\n    },\n    {\n      id: \"creatinine\",\n      name: \"Creatinine\",\n      value: 1.4,\n      unit: \"mg/dL\",\n      decimals: 1,\n      date: \"2026-10-19\",\n      referenceRange: { low: 0.7, high: 1.3 },\n      history: [\n        { value: 1.1, date: \"2026-10-17\" },\n        { value: 1.2, date: \"2026-10-18\" },\n        { value: 1.4, date: \"2026-10-19\" },\n      ],\n    },\n    {\n      id: \"hemoglobin\",\n      name: \"Hemoglobin\",\n      value: 13.2,\n      unit: \"g/dL\",\n      decimals: 1,\n      date: \"2026-10-19\",\n      referenceRange: { low: 13.5, high: 17.5, criticalLow: 7 },\n      history: [\n        { value: 13.9, date: \"2026-10-17\" },\n        { value: 13.5, date: \"2026-10-18\" },\n        { value: 13.2, date: \"2026-10-19\" },\n      ],\n    },\n  ],\n  // Each medication gets its own hue: a theme's chart colours can all be\n  // shades of one, which would make the doses hard to tell apart.\n  medications: [\n    {\n      id: \"metformin\",\n      name: \"Metformin\",\n      dose: \"500 mg\",\n      instructions: \"With breakfast and dinner\",\n      times: [\"08:00\", \"18:00\"],\n      color: \"oklch(0.62 0.13 160)\",\n    },\n    {\n      id: \"lisinopril\",\n      name: \"Lisinopril\",\n      dose: \"10 mg\",\n      times: [\"08:00\"],\n      color: \"oklch(0.62 0.15 250)\",\n    },\n    {\n      id: \"enoxaparin\",\n      name: \"Enoxaparin\",\n      dose: \"40 mg\",\n      instructions: \"Under the skin\",\n      times: [\"20:00\"],\n      color: \"oklch(0.6 0.18 25)\",\n    },\n    {\n      id: \"ibuprofen\",\n      name: \"Ibuprofen\",\n      dose: \"400 mg\",\n      instructions: \"With food\",\n      times: [\"12:00\"],\n      color: \"oklch(0.6 0.14 310)\",\n    },\n  ],\n  interactions: [\n    {\n      id: \"enoxaparin-ibuprofen\",\n      medicationIds: [\"enoxaparin\", \"ibuprofen\"],\n      severity: \"major\",\n      summary: \"Taken together, these can raise the risk of bleeding.\",\n    },\n  ],\n  date: \"2026-10-19\",\n  now: \"10:15\",\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "1120px"
  },
  "docs": "Dashboard 01: https://organui.com/blocks#dashboard-01. The patient and readings are fictional; connect your own records before clinical use.",
  "categories": [
    "dashboard"
  ],
  "type": "registry:block"
}