{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "triage-queue-dashboard",
  "title": "Triage Queue Dashboard",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/triage-queue-dashboard/TriageQueueDashboard.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport { Bed, Clock, DoorOpen, HeartPulse, MoreHorizontal, Plus, RefreshCw, Search, Zap } from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuLabel,\n  DropdownMenuSeparator,\n  DropdownMenuTrigger,\n} from '@/components/ui/dropdown-menu'\nimport { Input } from '@/components/ui/input'\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'\nimport { Separator } from '@/components/ui/separator'\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'\n\nexport type EsiLevel = 'esi-1' | 'esi-2' | 'esi-3' | 'esi-4'\n\nexport interface PatientVitals {\n  bp: string\n  hr: number\n  spo2: number\n  temp: string\n  respRate: number\n}\n\nexport interface Caregiver {\n  name: string\n  role: 'RN' | 'MD' | 'PA' | 'NP'\n  initials: string\n  avatar?: string\n}\n\nexport interface TriagePatient {\n  id: string\n  mrn: string\n  name: string\n  age: number\n  gender: 'M' | 'F' | 'Other'\n  acuity: EsiLevel\n  acuityCode: string\n  acuityLabel: string\n  chiefComplaint: string\n  symptoms: string\n  waitTime: string\n  waitMinutes: number\n  vitals: PatientVitals\n  assignedRoom: string\n  roomType: 'trauma' | 'acute' | 'fast_track' | 'waiting'\n  primaryNurse: Caregiver\n  attendingPhysician: Caregiver\n  clinicalStatus: string\n}\n\nexport interface AcuitySummaryCard {\n  level: EsiLevel\n  title: string\n  subtitle: string\n  activeCount: number\n  targetWait: string\n  targetWindow: string\n  badgeVariantClass: string\n  indicatorDot?: string\n  pulse: boolean\n  description: string\n}\n\nexport interface TriageQueueDashboardProps {\n  className?: string\n  unitName?: string\n  facilityName?: string\n}\n\nconst defaultAcuityCards: AcuitySummaryCard[] = [\n  {\n    level: 'esi-1',\n    title: 'ESI 1 · Resuscitation',\n    subtitle: 'Immediate Life Threat',\n    activeCount: 1,\n    targetWait: 'Immediate',\n    targetWindow: '0 min wait',\n    badgeVariantClass: 'border-destructive/30 bg-destructive/10 text-destructive',\n    indicatorDot: 'bg-destructive',\n    pulse: true,\n    description: 'Hemodynamic instability, active airway compromise',\n  },\n  {\n    level: 'esi-2',\n    title: 'ESI 2 · Emergent',\n    subtitle: 'High Risk / Severe Pain',\n    activeCount: 3,\n    targetWait: '< 15m wait',\n    targetWindow: 'Max 15 min',\n    badgeVariantClass: 'border-orange-500/30 bg-orange-500/10 text-orange-700 dark:text-orange-400',\n    indicatorDot: 'bg-orange-500',\n    pulse: false,\n    description: 'Confused, lethargic, severe respiratory distress',\n  },\n  {\n    level: 'esi-3',\n    title: 'ESI 3 · Urgent',\n    subtitle: 'Multiple Resources Needed',\n    activeCount: 8,\n    targetWait: '< 30m wait',\n    targetWindow: 'Max 30 min',\n    badgeVariantClass: 'border-warning/30 bg-warning/10 text-warning',\n    indicatorDot: 'bg-warning',\n    pulse: false,\n    description: 'Stable vitals, 2+ diagnostic or lab orders needed',\n  },\n  {\n    level: 'esi-4',\n    title: 'ESI 4/5 · Non-Urgent',\n    subtitle: 'Low Resource / Fast Track',\n    activeCount: 6,\n    targetWait: '< 60m wait',\n    targetWindow: 'Max 60 min',\n    badgeVariantClass: 'border-success/30 bg-success/10 text-success',\n    indicatorDot: 'bg-success',\n    pulse: false,\n    description: 'Simple lacerations, routine medication re-eval',\n  },\n]\n\nconst initialPatients: TriagePatient[] = [\n  {\n    id: 'pt-1',\n    mrn: 'MRN-94021',\n    name: 'James Wilson',\n    age: 62,\n    gender: 'M',\n    acuity: 'esi-1',\n    acuityCode: 'ESI 1',\n    acuityLabel: 'ESI 1 - Resuscitation',\n    chiefComplaint: 'Severe Crushing Chest Pain',\n    symptoms: 'Diaphoresis, radiating left jaw pain, dyspnea. STAT STEMI protocol initiated.',\n    waitTime: '2 min',\n    waitMinutes: 2,\n    vitals: {\n      bp: '88/54',\n      hr: 124,\n      spo2: 91,\n      temp: '98.4°F',\n      respRate: 28,\n    },\n    assignedRoom: 'Trauma Bay 2',\n    roomType: 'trauma',\n    primaryNurse: {\n      name: 'Sarah Jenkins, RN',\n      role: 'RN',\n      initials: 'SJ',\n      avatar: 'https://images.unsplash.com/photo-1559839734-2b71ea197ec2?w=120&auto=format&fit=crop&q=80',\n    },\n    attendingPhysician: {\n      name: 'Dr. Marcus Chen, MD',\n      role: 'MD',\n      initials: 'MC',\n      avatar: 'https://images.unsplash.com/photo-1622253692010-333f2da6031d?w=120&auto=format&fit=crop&q=80',\n    },\n    clinicalStatus: 'Cath Lab Alert · In Bay',\n  },\n  {\n    id: 'pt-2',\n    mrn: 'MRN-88319',\n    name: 'Maria Garcia',\n    age: 34,\n    gender: 'F',\n    acuity: 'esi-2',\n    acuityCode: 'ESI 2',\n    acuityLabel: 'ESI 2 - Emergent',\n    chiefComplaint: 'Compound Tibia Fracture',\n    symptoms: 'Post-motorcycle collision, visible bone deformity, uncontrolled bleeding controlled by tourniquet.',\n    waitTime: '9 min',\n    waitMinutes: 9,\n    vitals: {\n      bp: '138/86',\n      hr: 106,\n      spo2: 97,\n      temp: '99.1°F',\n      respRate: 22,\n    },\n    assignedRoom: 'Trauma Bay 4',\n    roomType: 'trauma',\n    primaryNurse: {\n      name: 'Kevin Vance, RN',\n      role: 'RN',\n      initials: 'KV',\n      avatar: 'https://images.unsplash.com/photo-1537368910025-700350fe46c7?w=120&auto=format&fit=crop&q=80',\n    },\n    attendingPhysician: {\n      name: 'Dr. Lisa Thorne, MD',\n      role: 'MD',\n      initials: 'LT',\n      avatar: 'https://images.unsplash.com/photo-1594824813637-e54e44e26210?w=120&auto=format&fit=crop&q=80',\n    },\n    clinicalStatus: 'Ortho Paged · IV Analgesia',\n  },\n  {\n    id: 'pt-3',\n    mrn: 'MRN-72915',\n    name: 'Noah Miller',\n    age: 8,\n    gender: 'M',\n    acuity: 'esi-2',\n    acuityCode: 'ESI 2',\n    acuityLabel: 'ESI 2 - Emergent',\n    chiefComplaint: 'Acute Asthma Exacerbation',\n    symptoms: 'Inspiratory and expiratory stridor, intercostal retractions, refractory to home albuterol.',\n    waitTime: '14 min',\n    waitMinutes: 14,\n    vitals: {\n      bp: '104/68',\n      hr: 132,\n      spo2: 92,\n      temp: '99.8°F',\n      respRate: 34,\n    },\n    assignedRoom: 'Bed 06 (Peds Acute)',\n    roomType: 'acute',\n    primaryNurse: {\n      name: 'Angela Ray, RN',\n      role: 'RN',\n      initials: 'AR',\n      avatar: 'https://images.unsplash.com/photo-1582750433449-648ed127bb54?w=120&auto=format&fit=crop&q=80',\n    },\n    attendingPhysician: {\n      name: 'Dr. Marcus Chen, MD',\n      role: 'MD',\n      initials: 'MC',\n      avatar: 'https://images.unsplash.com/photo-1622253692010-333f2da6031d?w=120&auto=format&fit=crop&q=80',\n    },\n    clinicalStatus: 'Duoneb #2 · Continuous O2',\n  },\n  {\n    id: 'pt-4',\n    mrn: 'MRN-51829',\n    name: 'Sarah Lee',\n    age: 45,\n    gender: 'F',\n    acuity: 'esi-3',\n    acuityCode: 'ESI 3',\n    acuityLabel: 'ESI 3 - Urgent',\n    chiefComplaint: 'Right Lower Quadrant Abdominal Pain',\n    symptoms: 'Severe pain x 14h, focal McBurney point tenderness, nausea, low-grade fever.',\n    waitTime: '28 min',\n    waitMinutes: 28,\n    vitals: {\n      bp: '126/82',\n      hr: 92,\n      spo2: 98,\n      temp: '101.4°F',\n      respRate: 18,\n    },\n    assignedRoom: 'Bed 14',\n    roomType: 'acute',\n    primaryNurse: {\n      name: 'David Park, RN',\n      role: 'RN',\n      initials: 'DP',\n      avatar: 'https://images.unsplash.com/photo-1612349317150-e413f6a5b16d?w=120&auto=format&fit=crop&q=80',\n    },\n    attendingPhysician: {\n      name: 'Dr. Sophia Adams, MD',\n      role: 'MD',\n      initials: 'SA',\n      avatar: 'https://images.unsplash.com/photo-1559839734-2b71ea197ec2?w=120&auto=format&fit=crop&q=80',\n    },\n    clinicalStatus: 'CT Scan Queued · NPO',\n  },\n  {\n    id: 'pt-5',\n    mrn: 'MRN-63910',\n    name: 'Robert Chen',\n    age: 58,\n    gender: 'M',\n    acuity: 'esi-3',\n    acuityCode: 'ESI 3',\n    acuityLabel: 'ESI 3 - Urgent',\n    chiefComplaint: 'Suspected Renal Colic & Flank Pain',\n    symptoms: 'Sudden onset severe right flank pain radiating to groin, gross hematuria, pain score 8/10.',\n    waitTime: '42 min',\n    waitMinutes: 42,\n    vitals: {\n      bp: '146/94',\n      hr: 88,\n      spo2: 99,\n      temp: '98.4°F',\n      respRate: 16,\n    },\n    assignedRoom: 'Bed 18',\n    roomType: 'acute',\n    primaryNurse: {\n      name: 'Rachel Torres, RN',\n      role: 'RN',\n      initials: 'RT',\n      avatar: 'https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=120&auto=format&fit=crop&q=80',\n    },\n    attendingPhysician: {\n      name: 'Dr. Sophia Adams, MD',\n      role: 'MD',\n      initials: 'SA',\n      avatar: 'https://images.unsplash.com/photo-1559839734-2b71ea197ec2?w=120&auto=format&fit=crop&q=80',\n    },\n    clinicalStatus: 'Ultrasound Ordered · IV Fluids',\n  },\n  {\n    id: 'pt-6',\n    mrn: 'MRN-90423',\n    name: 'Marcus Vance',\n    age: 22,\n    gender: 'M',\n    acuity: 'esi-4',\n    acuityCode: 'ESI 4',\n    acuityLabel: 'ESI 4 - Non-Urgent',\n    chiefComplaint: 'Forearm Deep Glass Laceration',\n    symptoms: '4cm clean linear laceration, hemostasis achieved, neurovascular sensation intact distally.',\n    waitTime: '54 min',\n    waitMinutes: 54,\n    vitals: {\n      bp: '120/78',\n      hr: 74,\n      spo2: 100,\n      temp: '98.6°F',\n      respRate: 14,\n    },\n    assignedRoom: 'Fast Track 02',\n    roomType: 'fast_track',\n    primaryNurse: {\n      name: 'Kevin Vance, RN',\n      role: 'RN',\n      initials: 'KV',\n      avatar: 'https://images.unsplash.com/photo-1537368910025-700350fe46c7?w=120&auto=format&fit=crop&q=80',\n    },\n    attendingPhysician: {\n      name: 'Dr. Emily Watson, MD',\n      role: 'MD',\n      initials: 'EW',\n      avatar: 'https://images.unsplash.com/photo-1594824813637-e54e44e26210?w=120&auto=format&fit=crop&q=80',\n    },\n    clinicalStatus: 'Wound Irrigated · Suture Tray Ready',\n  },\n]\n\nexport function TriageQueueDashboard({\n  className,\n  unitName = 'Level 1 Trauma Center · Bay 4',\n  facilityName = 'St. Jude Metropolitan Academic Medical Center',\n}: TriageQueueDashboardProps) {\n  const [search, setSearch] = React.useState('')\n  const [acuityFilter, setAcuityFilter] = React.useState('all')\n  const [locationFilter, setLocationFilter] = React.useState('all')\n  const [sortBy] = React.useState<'wait-desc' | 'wait-asc' | 'acuity'>('acuity')\n\n  const filteredPatients = React.useMemo(() => {\n    return initialPatients\n      .filter((pt) => {\n        // Search filter\n        if (search.trim()) {\n          const query = search.toLowerCase()\n          const matchesName = pt.name.toLowerCase().includes(query)\n          const matchesMrn = pt.mrn.toLowerCase().includes(query)\n          const matchesComplaint = pt.chiefComplaint.toLowerCase().includes(query)\n          const matchesRoom = pt.assignedRoom.toLowerCase().includes(query)\n          if (!matchesName && !matchesMrn && !matchesComplaint && !matchesRoom) return false\n        }\n\n        // Acuity filter\n        if (acuityFilter !== 'all') {\n          if (pt.acuity !== acuityFilter) return false\n        }\n\n        // Location filter\n        if (locationFilter !== 'all') {\n          if (pt.roomType !== locationFilter) return false\n        }\n\n        return true\n      })\n      .sort((a, b) => {\n        if (sortBy === 'wait-desc') return b.waitMinutes - a.waitMinutes\n        if (sortBy === 'wait-asc') return a.waitMinutes - b.waitMinutes\n        const order: Record<EsiLevel, number> = { 'esi-1': 1, 'esi-2': 2, 'esi-3': 3, 'esi-4': 4 }\n        return order[a.acuity] - order[b.acuity]\n      })\n  }, [search, acuityFilter, locationFilter, sortBy])\n\n  const handleAcuityCardClick = (level: EsiLevel) => {\n    if (acuityFilter === level) {\n      setAcuityFilter('all')\n    } else {\n      setAcuityFilter(level)\n    }\n  }\n\n  const resetFilters = () => {\n    setSearch('')\n    setAcuityFilter('all')\n    setLocationFilter('all')\n  }\n\n  return (\n    <div\n      data-slot=\"triage-queue-dashboard\"\n      className={cn('bg-background text-foreground flex w-full flex-col gap-6 font-sans', className)}\n    >\n      {/* Live ED Header */}\n      <header className=\"bg-card border-border rounded-xl border p-5 shadow-xs sm:p-6\">\n        <div className=\"flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between\">\n          {/* Title & Operational Meta */}\n          <div className=\"space-y-1.5\">\n            <div className=\"flex flex-wrap items-center gap-2.5\">\n              <div className=\"bg-primary/10 text-primary flex size-9 items-center justify-center rounded-lg\">\n                <HeartPulse className=\"size-5\" />\n              </div>\n              <div>\n                <h1 className=\"text-foreground text-xl font-bold tracking-tight sm:text-2xl\">\n                  Emergency Department Triage Queue\n                </h1>\n                <p className=\"text-muted-foreground text-xs font-medium sm:text-sm\">{facilityName}</p>\n              </div>\n            </div>\n\n            <div className=\"flex flex-wrap items-center gap-2 pt-1 text-xs\">\n              <Badge variant=\"outline\" className=\"border-border bg-muted/50 text-foreground gap-1.5 font-medium\">\n                <Bed className=\"text-primary size-3.5\" />\n                {unitName}\n              </Badge>\n\n              <Badge variant=\"outline\" className=\"border-success/30 bg-success/10 text-success gap-1.5 font-medium\">\n                <span className=\"bg-success size-1.5 animate-pulse rounded-full\" />\n                18 In Unit · 4 Awaiting Triage\n              </Badge>\n\n              <span className=\"text-muted-foreground hidden items-center gap-1 sm:inline-flex\">\n                <Clock className=\"size-3\" />\n                Live Sync · Updated seconds ago\n              </span>\n            </div>\n          </div>\n\n          {/* Primary Actions */}\n          <div className=\"flex flex-wrap items-center gap-2.5\">\n            <Button variant=\"outline\" size=\"sm\" className=\"gap-1.5 text-xs font-medium\">\n              <RefreshCw className=\"text-muted-foreground size-3.5\" />\n              Refresh Queue\n            </Button>\n\n            <Button size=\"sm\" className=\"gap-1.5 text-xs font-semibold shadow-xs\">\n              <Plus className=\"size-4\" />\n              Admit New Patient\n            </Button>\n          </div>\n        </div>\n      </header>\n\n      {/* 4 Acuity Overview Cards (ESI 1 to ESI 4/5) */}\n      <section aria-label=\"Acuity Overview Cards\" className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n        {defaultAcuityCards.map((card) => {\n          const isSelected = acuityFilter === card.level\n          return (\n            <Card\n              key={card.level}\n              className={cn(\n                'border-border relative cursor-pointer transition-colors duration-150 select-none hover:shadow-sm',\n                isSelected && 'ring-primary/40 bg-accent/40 ring-2',\n              )}\n              onClick={() => handleAcuityCardClick(card.level)}\n            >\n              <CardContent className=\"p-4 sm:p-5\">\n                <div className=\"flex items-start justify-between gap-2\">\n                  <div className=\"space-y-1\">\n                    <div className=\"flex items-center gap-1.5\">\n                      <span\n                        className={cn('size-2 shrink-0 rounded-full', card.indicatorDot, card.pulse && 'animate-pulse')}\n                      />\n                      <span className=\"text-muted-foreground text-xs font-medium tracking-wider uppercase\">\n                        {card.subtitle}\n                      </span>\n                    </div>\n                    <h2 className=\"text-foreground text-sm font-semibold sm:text-base\">{card.title}</h2>\n                  </div>\n\n                  <Badge\n                    variant=\"outline\"\n                    className={cn('gap-1 px-2 py-0.5 text-xs font-semibold', card.badgeVariantClass)}\n                  >\n                    {card.pulse && <span className=\"bg-destructive size-1.5 animate-pulse rounded-full\" />}\n                    {card.targetWait}\n                  </Badge>\n                </div>\n\n                <div className=\"mt-4 flex flex-wrap items-baseline justify-between gap-x-2 gap-y-0.5\">\n                  <div className=\"flex items-baseline gap-1.5\">\n                    <span className=\"text-foreground text-2xl font-bold tracking-tight tabular-nums sm:text-3xl\">\n                      {card.activeCount}\n                    </span>\n                    <span className=\"text-muted-foreground text-xs font-medium\">active in queue</span>\n                  </div>\n\n                  <span className=\"text-muted-foreground text-xs tabular-nums\">{card.targetWindow}</span>\n                </div>\n\n                <p className=\"text-muted-foreground mt-2 text-xs leading-relaxed\">{card.description}</p>\n              </CardContent>\n            </Card>\n          )\n        })}\n      </section>\n\n      {/* Patient Queue Table Card */}\n      <Card className=\"border-border shadow-xs\">\n        <CardHeader className=\"border-border border-b p-4 sm:p-5\">\n          <div className=\"flex flex-col gap-4 md:flex-row md:items-center md:justify-between\">\n            {/* Title & Active Filter Summary */}\n            <div>\n              <div className=\"flex items-center gap-2\">\n                <CardTitle className=\"text-foreground text-base font-semibold sm:text-lg\">\n                  Patient Triage & Allocation Board\n                </CardTitle>\n                <Badge variant=\"secondary\" className=\"font-mono text-xs tabular-nums\">\n                  {filteredPatients.length} Patients\n                </Badge>\n              </div>\n              <CardDescription className=\"text-muted-foreground mt-0.5 text-xs\">\n                Continuous monitoring of emergency severity index, vital signs, and room throughput.\n              </CardDescription>\n            </div>\n\n            {/* Controls: Search & Filters */}\n            <div className=\"flex flex-wrap items-center gap-2.5\">\n              {/* Search Field */}\n              <div className=\"relative w-full min-w-[200px] sm:w-60\">\n                <Search className=\"text-muted-foreground absolute top-1/2 left-2.5 size-4 -translate-y-1/2\" />\n                <Input\n                  value={search}\n                  onChange={(e) => setSearch(e.target.value)}\n                  type=\"text\"\n                  placeholder=\"Search patient, MRN, bay...\"\n                  className=\"h-8 pl-8 text-xs sm:text-sm\"\n                />\n              </div>\n\n              {/* Acuity Level Filter */}\n              <div className=\"w-36 sm:w-40\">\n                <Select value={acuityFilter} onValueChange={setAcuityFilter}>\n                  <SelectTrigger className=\"h-8 text-xs\">\n                    <SelectValue placeholder=\"All Acuities\" />\n                  </SelectTrigger>\n                  <SelectContent>\n                    <SelectItem value=\"all\">All Acuities</SelectItem>\n                    <SelectItem value=\"esi-1\">ESI 1 - Resuscitation</SelectItem>\n                    <SelectItem value=\"esi-2\">ESI 2 - Emergent</SelectItem>\n                    <SelectItem value=\"esi-3\">ESI 3 - Urgent</SelectItem>\n                    <SelectItem value=\"esi-4\">ESI 4/5 - Non-Urgent</SelectItem>\n                  </SelectContent>\n                </Select>\n              </div>\n\n              {/* Location Filter */}\n              <div className=\"w-32 sm:w-36\">\n                <Select value={locationFilter} onValueChange={setLocationFilter}>\n                  <SelectTrigger className=\"h-8 text-xs\">\n                    <SelectValue placeholder=\"All Locations\" />\n                  </SelectTrigger>\n                  <SelectContent>\n                    <SelectItem value=\"all\">All Locations</SelectItem>\n                    <SelectItem value=\"trauma\">Trauma Bays</SelectItem>\n                    <SelectItem value=\"acute\">Acute Beds</SelectItem>\n                    <SelectItem value=\"fast_track\">Fast Track</SelectItem>\n                  </SelectContent>\n                </Select>\n              </div>\n\n              {/* Reset Button */}\n              {(search || acuityFilter !== 'all' || locationFilter !== 'all') && (\n                <Button variant=\"ghost\" size=\"sm\" className=\"h-8 px-2 text-xs\" onClick={resetFilters}>\n                  Clear\n                </Button>\n              )}\n            </div>\n          </div>\n        </CardHeader>\n\n        <CardContent className=\"p-0\">\n          <div className=\"overflow-x-auto\">\n            <Table>\n              <TableHeader>\n                <TableRow className=\"hover:bg-transparent\">\n                  <TableHead className=\"w-[140px] text-xs font-semibold\">Acuity (ESI)</TableHead>\n                  <TableHead className=\"min-w-[200px] text-xs font-semibold\">Patient Demographics</TableHead>\n                  <TableHead className=\"min-w-[240px] text-xs font-semibold\">Chief Complaint & Symptoms</TableHead>\n                  <TableHead className=\"w-[110px] text-xs font-semibold\">Wait Time</TableHead>\n                  <TableHead className=\"min-w-[190px] text-xs font-semibold\">Vitals Snapshot</TableHead>\n                  <TableHead className=\"w-[150px] text-xs font-semibold\">Bed / Room</TableHead>\n                  <TableHead className=\"min-w-[160px] text-xs font-semibold\">Attending Staff</TableHead>\n                  <TableHead className=\"w-[60px] text-right text-xs font-semibold\">\n                    <span className=\"sr-only\">Actions</span>\n                  </TableHead>\n                </TableRow>\n              </TableHeader>\n\n              <TableBody>\n                {/* Empty State */}\n                {filteredPatients.length === 0 ? (\n                  <TableRow>\n                    <TableCell colSpan={8} className=\"h-48 text-center\">\n                      <div className=\"flex flex-col items-center justify-center gap-2\">\n                        <div className=\"bg-muted flex size-10 items-center justify-center rounded-full\">\n                          <Search className=\"text-muted-foreground size-5\" />\n                        </div>\n                        <p className=\"text-foreground text-sm font-semibold\">No patients match current filters</p>\n                        <p className=\"text-muted-foreground text-xs\">\n                          Try clearing your search query or selecting \"All Acuities\".\n                        </p>\n                        <Button variant=\"outline\" size=\"sm\" className=\"mt-2 text-xs\" onClick={resetFilters}>\n                          Reset Filters\n                        </Button>\n                      </div>\n                    </TableCell>\n                  </TableRow>\n                ) : (\n                  filteredPatients.map((pt) => {\n                    const isEsi1 = pt.acuity === 'esi-1'\n                    const isEsi2 = pt.acuity === 'esi-2'\n                    const isEsi3 = pt.acuity === 'esi-3'\n                    const isEsi4 = pt.acuity === 'esi-4'\n\n                    return (\n                      <TableRow\n                        key={pt.id}\n                        className={cn('transition-colors', isEsi1 && 'bg-destructive/[0.03] dark:bg-destructive/10]')}\n                      >\n                        {/* Acuity ESI Badge */}\n                        <TableCell className=\"align-top font-medium\">\n                          <div className=\"flex flex-col items-start gap-1\">\n                            <Badge\n                              variant=\"outline\"\n                              className={cn(\n                                'gap-1.5 px-2.5 py-1 text-xs font-semibold whitespace-nowrap',\n                                isEsi1 && 'border-destructive/30 bg-destructive/10 text-destructive',\n                                isEsi2 && 'border-orange-500/30 bg-orange-500/10 text-orange-700 dark:text-orange-400',\n                                isEsi3 && 'border-warning/30 bg-warning/10 text-warning',\n                                isEsi4 && 'border-success/30 bg-success/10 text-success',\n                              )}\n                            >\n                              {isEsi1 && <span className=\"bg-destructive size-1.5 animate-pulse rounded-full\" />}\n                              {pt.acuityCode}\n                            </Badge>\n                            <span className=\"text-muted-foreground text-xs font-medium\">\n                              {isEsi1 ? 'Resuscitation' : isEsi2 ? 'Emergent' : isEsi3 ? 'Urgent' : 'Non-Urgent'}\n                            </span>\n                          </div>\n                        </TableCell>\n\n                        {/* Patient Demographics */}\n                        <TableCell className=\"align-top\">\n                          <div className=\"space-y-1\">\n                            <div className=\"flex items-center gap-1.5\">\n                              <span className=\"text-foreground text-sm font-semibold tracking-tight\">{pt.name}</span>\n                              <span className=\"text-muted-foreground text-xs font-medium\">\n                                ({pt.age}\n                                {pt.gender})\n                              </span>\n                            </div>\n                            <div className=\"text-muted-foreground flex items-center gap-2 font-mono text-xs\">\n                              <span>{pt.mrn}</span>\n                            </div>\n                          </div>\n                        </TableCell>\n\n                        {/* Chief Complaint & Symptoms */}\n                        <TableCell className=\"align-top\">\n                          <div className=\"space-y-1\">\n                            <p className=\"text-foreground text-xs font-semibold\">{pt.chiefComplaint}</p>\n                            <p className=\"text-muted-foreground text-xs leading-relaxed\">{pt.symptoms}</p>\n                          </div>\n                        </TableCell>\n\n                        {/* Wait Time Counter */}\n                        <TableCell className=\"align-top\">\n                          <div className=\"flex items-center gap-1.5 pt-0.5\">\n                            <Clock\n                              className={cn(\n                                'size-3.5 shrink-0',\n                                pt.waitMinutes > 30 ? 'text-warning' : 'text-muted-foreground',\n                              )}\n                            />\n                            <span\n                              className={cn(\n                                'text-xs font-semibold tabular-nums',\n                                pt.waitMinutes > 40 ? 'text-warning' : 'text-foreground',\n                              )}\n                            >\n                              {pt.waitTime}\n                            </span>\n                          </div>\n                        </TableCell>\n\n                        {/* Vitals Snapshot */}\n                        <TableCell className=\"align-top\">\n                          <div className=\"grid grid-cols-2 gap-x-3 gap-y-1 text-xs\">\n                            <div className=\"flex items-center justify-between gap-1 font-mono\">\n                              <span className=\"text-muted-foreground\">BP:</span>\n                              <span\n                                className={cn(\n                                  'font-semibold tabular-nums',\n                                  isEsi1 ? 'text-destructive' : 'text-foreground',\n                                )}\n                              >\n                                {pt.vitals.bp}\n                              </span>\n                            </div>\n\n                            <div className=\"flex items-center justify-between gap-1 font-mono\">\n                              <span className=\"text-muted-foreground\">HR:</span>\n                              <span\n                                className={cn(\n                                  'font-semibold tabular-nums',\n                                  pt.vitals.hr > 110 ? 'text-destructive' : 'text-foreground',\n                                )}\n                              >\n                                {pt.vitals.hr} bpm\n                              </span>\n                            </div>\n\n                            <div className=\"flex items-center justify-between gap-1 font-mono\">\n                              <span className=\"text-muted-foreground\">SpO2:</span>\n                              <span\n                                className={cn(\n                                  'font-semibold tabular-nums',\n                                  pt.vitals.spo2 < 95 ? 'text-destructive' : 'text-foreground',\n                                )}\n                              >\n                                {pt.vitals.spo2}%\n                              </span>\n                            </div>\n\n                            <div className=\"flex items-center justify-between gap-1 font-mono\">\n                              <span className=\"text-muted-foreground\">Temp:</span>\n                              <span className=\"text-foreground font-semibold tabular-nums\">{pt.vitals.temp}</span>\n                            </div>\n                          </div>\n                        </TableCell>\n\n                        {/* Assigned Bed / Room */}\n                        <TableCell className=\"align-top\">\n                          <div className=\"space-y-1\">\n                            <Badge\n                              variant=\"outline\"\n                              className=\"border-border bg-muted/40 text-foreground gap-1 text-xs font-medium\"\n                            >\n                              <Bed className=\"text-primary size-3\" />\n                              {pt.assignedRoom}\n                            </Badge>\n                            <p className=\"text-muted-foreground text-xs\">{pt.clinicalStatus}</p>\n                          </div>\n                        </TableCell>\n\n                        {/* Attending Staff */}\n                        <TableCell className=\"align-top\">\n                          <div className=\"space-y-1.5\">\n                            <div className=\"flex items-center gap-2\">\n                              <Avatar className=\"size-6\">\n                                <AvatarImage src={pt.primaryNurse.avatar} alt={pt.primaryNurse.name} />\n                                <AvatarFallback className=\"bg-primary/10 text-primary text-xs font-medium\">\n                                  {pt.primaryNurse.initials}\n                                </AvatarFallback>\n                              </Avatar>\n                              <span\n                                className=\"text-foreground max-w-[130px] truncate text-xs leading-none font-medium\"\n                                title={pt.primaryNurse.name}\n                              >\n                                {pt.primaryNurse.name}\n                              </span>\n                            </div>\n\n                            <div className=\"flex items-center gap-2\">\n                              <Avatar className=\"size-6\">\n                                <AvatarImage src={pt.attendingPhysician.avatar} alt={pt.attendingPhysician.name} />\n                                <AvatarFallback className=\"bg-secondary text-secondary-foreground text-xs font-medium\">\n                                  {pt.attendingPhysician.initials}\n                                </AvatarFallback>\n                              </Avatar>\n                              <span\n                                className=\"text-muted-foreground max-w-[130px] truncate text-xs leading-none\"\n                                title={pt.attendingPhysician.name}\n                              >\n                                {pt.attendingPhysician.name}\n                              </span>\n                            </div>\n                          </div>\n                        </TableCell>\n\n                        {/* Actions Menu */}\n                        <TableCell className=\"text-right align-top\">\n                          <DropdownMenu>\n                            <DropdownMenuTrigger asChild>\n                              <Button variant=\"ghost\" size=\"icon-sm\" className=\"size-8\">\n                                <MoreHorizontal className=\"size-4\" />\n                                <span className=\"sr-only\">Patient actions</span>\n                              </Button>\n                            </DropdownMenuTrigger>\n                            <DropdownMenuContent align=\"end\" className=\"w-48\">\n                              <DropdownMenuLabel>Triage Actions</DropdownMenuLabel>\n                              <DropdownMenuItem className=\"cursor-pointer gap-2\">\n                                <Bed className=\"size-4\" />\n                                Assign Room\n                              </DropdownMenuItem>\n                              <DropdownMenuItem className=\"cursor-pointer gap-2\">\n                                <HeartPulse className=\"size-4\" />\n                                Re-triage Acuity\n                              </DropdownMenuItem>\n                              <DropdownMenuItem className=\"cursor-pointer gap-2\">\n                                <Zap className=\"size-4\" />\n                                Order STAT Labs\n                              </DropdownMenuItem>\n                              <DropdownMenuSeparator />\n                              <DropdownMenuItem className=\"cursor-pointer gap-2\">\n                                <DoorOpen className=\"size-4\" />\n                                Discharge / Transfer\n                              </DropdownMenuItem>\n                            </DropdownMenuContent>\n                          </DropdownMenu>\n                        </TableCell>\n                      </TableRow>\n                    )\n                  })\n                )}\n              </TableBody>\n            </Table>\n          </div>\n\n          {/* Table Footer / Status Summary */}\n          <div className=\"border-border bg-muted/20 text-muted-foreground flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 text-xs\">\n            <div className=\"flex items-center gap-3 font-medium\">\n              <span>Level 1 Trauma Alert Protocol Active</span>\n              <Separator orientation=\"vertical\" className=\"h-3.5\" />\n              <span className=\"tabular-nums\">Average Door-to-Triage: 4.2 min</span>\n            </div>\n\n            <div className=\"flex items-center gap-2\">\n              <span className=\"text-foreground font-medium\">ED Occupancy:</span>\n              <span className=\"text-foreground font-semibold tabular-nums\">88% (22/25 Beds)</span>\n            </div>\n          </div>\n        </CardContent>\n      </Card>\n    </div>\n  )\n}\n\nexport default TriageQueueDashboard\n",
      "type": "registry:block",
      "target": "~/components/blocks/TriageQueueDashboard.tsx"
    }
  ],
  "dependencies": [
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/react/avatar.json",
    "https://uipkge.dev/r/react/badge.json",
    "https://uipkge.dev/r/react/button.json",
    "https://uipkge.dev/r/react/card.json",
    "https://uipkge.dev/r/react/dropdown-menu.json",
    "https://uipkge.dev/r/react/input.json",
    "https://uipkge.dev/r/react/select.json",
    "https://uipkge.dev/r/react/separator.json",
    "https://uipkge.dev/r/react/table.json"
  ],
  "description": "Emergency Department (ED) and Urgent Care patient acuity triage queue and room allocation board: live unit header, 4 ESI overview cards with target wait thresholds, searchable patient queue table with vitals snapshot, assigned room, attending care team, and quick clinical actions.",
  "categories": [
    "healthcare",
    "app"
  ]
}