{
  "$schema": "https://uipkge.dev/schema/registry-item.json",
  "name": "lab-results-viewer",
  "title": "Lab Results Viewer",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-angular/blocks/lab-results-viewer/lab-results-viewer.component.ts",
      "content": "// Quest and Labcorp style diagnostic lab results report viewer: patient metadata header,\n// clinical attention banner, grouped test panels (Lipid, Glucose, Renal) with LOINC codes,\n// reference range linear scale bars, historical 6-month trend deltas, and doctor clinical\n// impression card with electronic verification. Port of the React block 1:1.\nimport { ChangeDetectionStrategy, Component, Input, computed, signal } from '@angular/core'\nimport {\n  AlertTriangle,\n  CheckCircle2,\n  FileCheck2,\n  FileDown,\n  FlaskConical,\n  LucideAngularModule,\n  MapPin,\n  Printer,\n  Search,\n  Share2,\n  ShieldCheck,\n  Stethoscope,\n  TrendingDown,\n  TrendingUp,\n} from 'lucide-angular'\nimport { cn } from '@/lib/utils'\nimport { UiBadgeComponent } from '@/ui/badge/badge.component'\nimport { UiButtonComponent } from '@/ui/button/button.component'\nimport {\n  UiCardComponent,\n  UiCardContentComponent,\n  UiCardDescriptionComponent,\n  UiCardHeaderComponent,\n  UiCardTitleComponent,\n} from '@/ui/card/card.component'\nimport { UiSeparatorComponent } from '@/ui/separator/separator.component'\nimport {\n  UiTableBodyComponent,\n  UiTableCellComponent,\n  UiTableComponent,\n  UiTableHeadComponent,\n  UiTableHeaderComponent,\n  UiTableRowComponent,\n} from '@/ui/table/table.component'\nimport { UiTabsComponent, UiTabsListComponent, UiTabsTriggerComponent } from '@/ui/tabs/tabs.component'\n\nexport type TestStatus = 'Normal' | 'High' | 'Low'\n\nexport interface LabTest {\n  id: string\n  name: string\n  panel: 'lipid' | 'metabolic' | 'renal'\n  panelLabel: string\n  loinc: string\n  value: number\n  unit: string\n  referenceRangeText: string\n  status: TestStatus\n  scaleMin: number\n  scaleMax: number\n  normalMin: number\n  normalMax: number\n  markerPercent: number\n  rangeZoneLeft: number\n  rangeZoneWidth: number\n  trendDelta: string\n  trendDirection: 'up' | 'down' | 'flat'\n  trendStatus: 'warning' | 'success' | 'neutral'\n  priorValue: string\n  clinicalNote: string\n}\n\nconst patientInfo = {\n  name: 'Sarah Jenkins',\n  mrn: 'MRN-9482104',\n  dob: 'Apr 12, 1984 (Age 42)',\n  sex: 'Female',\n  fasting: 'Fasting (12 hours)',\n  accession: 'Q-94827104',\n  orderedBy: 'Dr. Marcus Thorne, MD, FACP',\n  facility: 'Quest Diagnostics Central Lab #842',\n  facilityAddress: '100 Clifton Blvd, Clifton, NJ 07012 (CLIA: 31D0691234)',\n  collectedDate: 'Aug 18, 2026 · 08:30 AM EDT',\n  reportedDate: 'Aug 18, 2026 · 02:45 PM EDT',\n  specimen: 'Serum & Plasma (Gold SST / Lavender EDTA)',\n}\n\nconst defaultTests: LabTest[] = [\n  {\n    id: 'chol-total',\n    name: 'Total Cholesterol',\n    panel: 'lipid',\n    panelLabel: 'Lipid Panel (Cardiovascular Risk)',\n    loinc: '2093-3',\n    value: 215,\n    unit: 'mg/dL',\n    referenceRangeText: '< 200 mg/dL',\n    status: 'High',\n    scaleMin: 100,\n    scaleMax: 300,\n    normalMin: 100,\n    normalMax: 200,\n    markerPercent: 57.5,\n    rangeZoneLeft: 0,\n    rangeZoneWidth: 50,\n    trendDelta: '+12 mg/dL vs 6 mos ago',\n    trendDirection: 'up',\n    trendStatus: 'warning',\n    priorValue: '203 mg/dL (Feb 2026)',\n    clinicalNote: 'Mild elevation. Suggests elevated total circulating atherogenic lipoprotein particles.',\n  },\n  {\n    id: 'chol-ldl',\n    name: 'LDL Cholesterol (Calculated)',\n    panel: 'lipid',\n    panelLabel: 'Lipid Panel (Cardiovascular Risk)',\n    loinc: '13457-7',\n    value: 138,\n    unit: 'mg/dL',\n    referenceRangeText: '< 100 mg/dL',\n    status: 'High',\n    scaleMin: 50,\n    scaleMax: 200,\n    normalMin: 50,\n    normalMax: 100,\n    markerPercent: 58.7,\n    rangeZoneLeft: 0,\n    rangeZoneWidth: 33.3,\n    trendDelta: '+18 mg/dL vs 6 mos ago',\n    trendDirection: 'up',\n    trendStatus: 'warning',\n    priorValue: '120 mg/dL (Feb 2026)',\n    clinicalNote: 'Above primary prevention target (< 100 mg/dL). Lifestyle modifications indicated.',\n  },\n  {\n    id: 'chol-hdl',\n    name: 'HDL Cholesterol',\n    panel: 'lipid',\n    panelLabel: 'Lipid Panel (Cardiovascular Risk)',\n    loinc: '2085-9',\n    value: 58,\n    unit: 'mg/dL',\n    referenceRangeText: '≥ 50 mg/dL',\n    status: 'Normal',\n    scaleMin: 20,\n    scaleMax: 100,\n    normalMin: 50,\n    normalMax: 100,\n    markerPercent: 47.5,\n    rangeZoneLeft: 37.5,\n    rangeZoneWidth: 62.5,\n    trendDelta: '+2 mg/dL vs 6 mos ago',\n    trendDirection: 'up',\n    trendStatus: 'success',\n    priorValue: '56 mg/dL (Feb 2026)',\n    clinicalNote: 'Desirable cardio-protective level for adult female population.',\n  },\n  {\n    id: 'triglycerides',\n    name: 'Triglycerides',\n    panel: 'lipid',\n    panelLabel: 'Lipid Panel (Cardiovascular Risk)',\n    loinc: '2571-8',\n    value: 142,\n    unit: 'mg/dL',\n    referenceRangeText: '< 150 mg/dL',\n    status: 'Normal',\n    scaleMin: 50,\n    scaleMax: 250,\n    normalMin: 50,\n    normalMax: 150,\n    markerPercent: 46.0,\n    rangeZoneLeft: 0,\n    rangeZoneWidth: 50,\n    trendDelta: '-15 mg/dL vs 6 mos ago',\n    trendDirection: 'down',\n    trendStatus: 'success',\n    priorValue: '157 mg/dL (Feb 2026)',\n    clinicalNote: 'Improved from borderline threshold into normal reference zone.',\n  },\n  {\n    id: 'glucose-fasting',\n    name: 'Fasting Glucose',\n    panel: 'metabolic',\n    panelLabel: 'Glucose Metabolism & Glycemic Control',\n    loinc: '1558-6',\n    value: 92,\n    unit: 'mg/dL',\n    referenceRangeText: '70 – 99 mg/dL',\n    status: 'Normal',\n    scaleMin: 50,\n    scaleMax: 150,\n    normalMin: 70,\n    normalMax: 99,\n    markerPercent: 42.0,\n    rangeZoneLeft: 20,\n    rangeZoneWidth: 29,\n    trendDelta: '-3 mg/dL vs 6 mos ago',\n    trendDirection: 'down',\n    trendStatus: 'success',\n    priorValue: '95 mg/dL (Feb 2026)',\n    clinicalNote: 'Normal euglycemic fasting state. No prediabetes indicators.',\n  },\n  {\n    id: 'egfr-renal',\n    name: 'eGFR (Kidney Function)',\n    panel: 'renal',\n    panelLabel: 'Renal Function & Filtration',\n    loinc: '33914-3',\n    value: 104,\n    unit: 'mL/min/1.73m²',\n    referenceRangeText: '≥ 60 mL/min/1.73m²',\n    status: 'Normal',\n    scaleMin: 30,\n    scaleMax: 130,\n    normalMin: 60,\n    normalMax: 130,\n    markerPercent: 74.0,\n    rangeZoneLeft: 30,\n    rangeZoneWidth: 70,\n    trendDelta: '+1 mL/min vs 6 mos ago',\n    trendDirection: 'up',\n    trendStatus: 'success',\n    priorValue: '103 mL/min (Feb 2026)',\n    clinicalNote: 'Calculated using CKD-EPI 2021 equation. Robust renal clearance performance.',\n  },\n]\n\n@Component({\n  changeDetection: ChangeDetectionStrategy.Eager,\n  selector: 'ui-lab-results-viewer, [ui-lab-results-viewer]',\n  standalone: true,\n  // React renders the root <div> itself: the host stays out of layout and `class` goes to the root.\n  host: { '[attr.class]': '\"contents\"' },\n  imports: [\n    LucideAngularModule,\n    UiBadgeComponent,\n    UiButtonComponent,\n    UiCardComponent,\n    UiCardContentComponent,\n    UiCardDescriptionComponent,\n    UiCardHeaderComponent,\n    UiCardTitleComponent,\n    UiSeparatorComponent,\n    UiTableComponent,\n    UiTableBodyComponent,\n    UiTableCellComponent,\n    UiTableHeadComponent,\n    UiTableHeaderComponent,\n    UiTableRowComponent,\n    UiTabsComponent,\n    UiTabsListComponent,\n    UiTabsTriggerComponent,\n  ],\n  template: `\n    <div data-slot=\"lab-results-viewer\" [class]=\"rootClass\">\n      <!-- Header: Diagnostic Pathology Report -->\n      <div ui-card class=\"border-border bg-card shadow-xs\">\n        <div ui-card-header class=\"p-5 pb-4 sm:p-6 sm:pb-4\">\n          <div class=\"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between\">\n            <div class=\"space-y-1.5\">\n              <div class=\"flex flex-wrap items-center gap-2\">\n                <span ui-badge variant=\"outline\" class=\"gap-1.5 font-mono text-xs\">\n                  <lucide-icon [img]=\"FlaskConical\" class=\"text-primary size-3.5\" />\n                  {{ patient.accession }}\n                </span>\n                <span ui-badge variant=\"success\" class=\"gap-1 text-xs\">\n                  <lucide-icon [img]=\"FileCheck2\" class=\"size-3\" />\n                  Final Diagnostic Report\n                </span>\n              </div>\n              <h3 ui-card-title class=\"text-foreground text-xl font-semibold tracking-tight sm:text-2xl\">\n                Comprehensive Metabolic Panel & Lipid Panel\n              </h3>\n              <p ui-card-description class=\"text-muted-foreground text-xs sm:text-sm\">\n                Clinical chemistry and lipid risk profiling conducted by {{ patient.facility }}\n              </p>\n            </div>\n\n            <div class=\"flex flex-wrap items-center gap-2 pt-1 lg:pt-0\">\n              <button\n                ui-button\n                aria-label=\"Download attachment\"\n                variant=\"outline\"\n                size=\"sm\"\n                class=\"gap-1.5 text-xs shadow-xs\"\n                [disabled]=\"isDownloadingPdf()\"\n                (click)=\"handleDownloadPdf()\"\n              >\n                <lucide-icon [img]=\"FileDown\" class=\"size-4\" />\n                {{ isDownloadingPdf() ? 'Generating PDF...' : 'Download Official PDF' }}\n              </button>\n              <button ui-button variant=\"outline\" size=\"sm\" class=\"gap-1.5 text-xs shadow-xs\" (click)=\"handleShare()\">\n                <lucide-icon [img]=\"Share2\" class=\"size-4\" />\n                {{ isCopiedShare() ? 'Link Copied!' : 'Share with Doctor' }}\n              </button>\n              <button\n                ui-button\n                variant=\"ghost\"\n                size=\"sm\"\n                class=\"text-muted-foreground hover:text-foreground hidden sm:inline-flex\"\n                (click)=\"handlePrint()\"\n              >\n                <lucide-icon [img]=\"Printer\" class=\"size-4\" />\n                <span class=\"sr-only\">Print Report</span>\n              </button>\n            </div>\n          </div>\n        </div>\n\n        <div ui-card-content class=\"p-5 pt-0 sm:p-6 sm:pt-0\">\n          <ui-separator class=\"mb-4\" />\n          <dl class=\"grid grid-cols-1 gap-x-6 gap-y-3 sm:grid-cols-2 lg:grid-cols-4\">\n            <div class=\"space-y-0.5\">\n              <dt class=\"text-muted-foreground text-xs font-medium\">Patient Details</dt>\n              <dd class=\"text-foreground text-xs font-semibold sm:text-sm\">{{ patient.name }}</dd>\n              <p class=\"text-muted-foreground text-xs\">{{ patient.sex }} · {{ patient.dob }}</p>\n            </div>\n            <div class=\"space-y-0.5\">\n              <dt class=\"text-muted-foreground text-xs font-medium\">Ordering Physician</dt>\n              <dd class=\"text-foreground text-xs font-semibold sm:text-sm\">{{ patient.orderedBy }}</dd>\n              <p class=\"text-muted-foreground text-xs\">Internal Medicine & Cardiology</p>\n            </div>\n            <div class=\"space-y-0.5\">\n              <dt class=\"text-muted-foreground text-xs font-medium\">Collection & Fasting</dt>\n              <dd class=\"text-foreground text-xs font-semibold tabular-nums sm:text-sm\">{{ patient.collectedDate }}</dd>\n              <p class=\"text-muted-foreground text-xs\">{{ patient.fasting }}</p>\n            </div>\n            <div class=\"space-y-0.5\">\n              <dt class=\"text-muted-foreground text-xs font-medium\">Testing Facility</dt>\n              <dd class=\"text-foreground text-xs font-semibold sm:text-sm\">{{ patient.facility }}</dd>\n              <p class=\"text-muted-foreground text-xs\">CLIA ID: 31D0691234 · CAP Accredited</p>\n            </div>\n          </dl>\n        </div>\n      </div>\n\n      <!-- Overall Summary Banner -->\n      <div\n        class=\"border-warning/30 bg-warning/10 text-foreground flex flex-col gap-4 rounded-xl border p-4 sm:flex-row sm:items-center sm:justify-between sm:p-5\"\n      >\n        <div class=\"flex items-start gap-3.5\">\n          <div\n            class=\"border-warning/30 bg-warning/20 text-warning mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-lg border\"\n          >\n            <lucide-icon [img]=\"AlertTriangle\" class=\"size-5\" />\n          </div>\n          <div class=\"space-y-1\">\n            <div class=\"flex flex-wrap items-center gap-2\">\n              <h3 class=\"text-foreground text-sm font-semibold sm:text-base\">\n                14 tests normal · 2 tests out of reference range\n              </h3>\n              <span ui-badge variant=\"warning\" class=\"text-xs font-medium\">Clinical Review Advised</span>\n            </div>\n            <p class=\"text-muted-foreground text-xs leading-relaxed sm:text-sm\">\n              Total Cholesterol and LDL Cholesterol exceed recommended reference thresholds. Fasting glucose metabolism\n              and renal function (eGFR) remain optimal.\n            </p>\n          </div>\n        </div>\n        <div class=\"flex shrink-0 flex-wrap items-center gap-2 sm:self-center\">\n          <div\n            class=\"border-border bg-card/90 flex items-center gap-2 rounded-lg border px-3 py-1.5 text-xs shadow-2xs\"\n          >\n            <span class=\"bg-success size-2 rounded-full\"></span>\n            <span class=\"text-muted-foreground font-medium\">In Range:</span>\n            <span class=\"text-foreground font-semibold tabular-nums\">14</span>\n          </div>\n          <div\n            class=\"border-border bg-card/90 flex items-center gap-2 rounded-lg border px-3 py-1.5 text-xs shadow-2xs\"\n          >\n            <span class=\"bg-warning size-2 rounded-full\"></span>\n            <span class=\"text-muted-foreground font-medium\">Out of Range:</span>\n            <span class=\"text-warning font-semibold tabular-nums\">2</span>\n          </div>\n        </div>\n      </div>\n\n      <!-- Interactive Filtering & Search Header -->\n      <div class=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n        <ui-tabs [value]=\"activeTab()\" (valueChange)=\"setActiveTab($event)\" class=\"w-full sm:w-auto\">\n          <ui-tabs-list class=\"grid grid-cols-4 sm:inline-flex\">\n            <button ui-tabs-trigger value=\"all\" class=\"text-xs font-medium\">All ({{ tests().length }})</button>\n            <button ui-tabs-trigger value=\"out-of-range\" class=\"text-xs font-medium\">\n              Out of Range ({{ outOfRangeCount() }})\n            </button>\n            <button ui-tabs-trigger value=\"lipid\" class=\"text-xs font-medium\">Lipid (4)</button>\n            <button ui-tabs-trigger value=\"metabolic-renal\" class=\"text-xs font-medium\">Metabolic & Renal (2)</button>\n          </ui-tabs-list>\n        </ui-tabs>\n\n        <div class=\"relative w-full sm:w-64\">\n          <lucide-icon [img]=\"Search\" class=\"text-muted-foreground absolute top-1/2 left-3 size-3.5 -translate-y-1/2\" />\n          <input\n            [value]=\"searchQuery()\"\n            (input)=\"searchQuery.set($any($event.target).value)\"\n            type=\"text\"\n            placeholder=\"Filter tests or LOINC...\"\n            class=\"border-border bg-background text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 h-8.5 w-full rounded-lg border pr-3 pl-9 text-xs transition-colors focus-visible:ring-[3px] focus-visible:outline-none\"\n          />\n        </div>\n      </div>\n\n      <!-- Diagnostic Panels & Test Results Table -->\n      <div ui-card class=\"border-border bg-card shadow-xs\">\n        <div ui-card-header class=\"border-border border-b p-4 sm:px-6\">\n          <div class=\"flex items-center justify-between\">\n            <div>\n              <h3 ui-card-title class=\"text-base font-semibold\">Laboratory Test Panels</h3>\n              <p ui-card-description class=\"text-xs\">\n                Quantitative measurements, standard LOINC reference intervals, and 6-month historical trend comparison.\n              </p>\n            </div>\n            <span class=\"text-muted-foreground hidden font-mono text-xs tabular-nums sm:inline-block\">\n              Showing {{ filteredTests().length }} of {{ tests().length }} tests\n            </span>\n          </div>\n        </div>\n\n        <div ui-card-content class=\"p-0\">\n          <div class=\"overflow-x-auto\">\n            <table ui-table>\n              <thead ui-table-header class=\"bg-muted/40\">\n                <tr ui-table-row>\n                  <th ui-table-head class=\"min-w-[180px] text-xs font-semibold\">Test Name & Code</th>\n                  <th ui-table-head class=\"min-w-[120px] text-xs font-semibold\">Measured Value</th>\n                  <th ui-table-head class=\"w-24 text-xs font-semibold\">Flag</th>\n                  <th ui-table-head class=\"min-w-[120px] text-xs font-semibold\">Reference Range</th>\n                  <th ui-table-head class=\"min-w-[210px] text-xs font-semibold\">Visual Scale</th>\n                  <th ui-table-head class=\"min-w-[170px] text-right text-xs font-semibold\">Historical 6-Mo Delta</th>\n                </tr>\n              </thead>\n              <tbody ui-table-body>\n                @for (test of filteredTests(); track test.id) {\n                  <tr ui-table-row [class]=\"testRowClass(test)\">\n                    <td ui-table-cell class=\"py-3.5\">\n                      <div class=\"space-y-0.5\">\n                        <p class=\"text-foreground text-xs font-semibold sm:text-sm\">{{ test.name }}</p>\n                        <div class=\"flex items-center gap-1.5\">\n                          <span class=\"text-muted-foreground font-mono text-xs\">LOINC: {{ test.loinc }}</span>\n                          <span class=\"text-muted-foreground text-xs\">{{ test.panelLabel }}</span>\n                        </div>\n                      </div>\n                    </td>\n                    <td ui-table-cell class=\"py-3.5\">\n                      <div class=\"flex items-baseline gap-1\">\n                        <span [class]=\"valueClass(test)\">{{ test.value }}</span>\n                        <span class=\"text-muted-foreground text-xs font-medium\">{{ test.unit }}</span>\n                      </div>\n                    </td>\n                    <td ui-table-cell class=\"py-3.5\">\n                      <span\n                        ui-badge\n                        [variant]=\"test.status === 'High' ? 'warning' : 'success'\"\n                        class=\"px-2 py-0.5 text-xs font-semibold\"\n                      >\n                        {{ test.status }}\n                      </span>\n                    </td>\n                    <td ui-table-cell class=\"py-3.5\">\n                      <span class=\"text-foreground font-mono text-xs font-medium tabular-nums\">\n                        {{ test.referenceRangeText }}\n                      </span>\n                    </td>\n                    <td ui-table-cell class=\"py-3.5\">\n                      <div class=\"w-full max-w-[210px] space-y-1\">\n                        <div class=\"bg-muted/80 relative flex h-2.5 w-full items-center overflow-visible rounded-full\">\n                          <div\n                            class=\"border-success/40 bg-success/25 absolute h-full rounded-full border-x\"\n                            [style.left.%]=\"test.rangeZoneLeft\"\n                            [style.width.%]=\"test.rangeZoneWidth\"\n                          ></div>\n                          <div\n                            class=\"absolute flex -translate-x-1/2 flex-col items-center\"\n                            [style.left.%]=\"test.markerPercent\"\n                          >\n                            <span [class]=\"markerClass(test)\"></span>\n                          </div>\n                        </div>\n                        <div\n                          class=\"text-muted-foreground flex items-center justify-between font-mono text-xs tabular-nums\"\n                        >\n                          <span>{{ test.scaleMin }}</span>\n                          <span class=\"text-success text-xs font-medium\">Normal</span>\n                          <span>{{ test.scaleMax }}</span>\n                        </div>\n                      </div>\n                    </td>\n                    <td ui-table-cell class=\"py-3.5 text-right\">\n                      <div class=\"flex flex-col items-end gap-0.5\">\n                        <div class=\"flex items-center gap-1\">\n                          @if (test.trendDirection === 'up') {\n                            <lucide-icon [img]=\"TrendingUp\" [class]=\"trendIconClass(test)\" />\n                          } @else {\n                            <lucide-icon [img]=\"TrendingDown\" [class]=\"trendIconClass(test)\" />\n                          }\n                          <span [class]=\"trendDeltaClass(test)\">{{ test.trendDelta }}</span>\n                        </div>\n                        <span class=\"text-muted-foreground text-xs tabular-nums\">Prior: {{ test.priorValue }}</span>\n                      </div>\n                    </td>\n                  </tr>\n                }\n                @if (filteredTests().length === 0) {\n                  <tr ui-table-row>\n                    <td ui-table-cell colspan=\"6\" class=\"py-8 text-center\">\n                      <p class=\"text-muted-foreground text-xs\">\n                        No laboratory test records matched your filter criteria.\n                      </p>\n                    </td>\n                  </tr>\n                }\n              </tbody>\n            </table>\n          </div>\n        </div>\n      </div>\n\n      <!-- Doctor's Clinical Impression Card -->\n      <div ui-card class=\"border-border bg-card shadow-xs\">\n        <div ui-card-header class=\"p-5 pb-3 sm:p-6 sm:pb-4\">\n          <div class=\"flex flex-wrap items-center justify-between gap-3\">\n            <div class=\"flex items-center gap-2.5\">\n              <div class=\"bg-primary/10 text-primary flex size-8 items-center justify-center rounded-lg\">\n                <lucide-icon [img]=\"Stethoscope\" class=\"size-4\" />\n              </div>\n              <div>\n                <h3 ui-card-title class=\"text-base font-semibold\">Doctor's Clinical Impression & Action Plan</h3>\n                <p ui-card-description class=\"text-xs\">Physician interpretation provided by {{ patient.orderedBy }}</p>\n              </div>\n            </div>\n            <span ui-badge variant=\"outline\" class=\"gap-1.5 text-xs font-normal\">\n              <lucide-icon [img]=\"ShieldCheck\" class=\"text-success size-3.5\" />\n              Verified Electronic Signature\n            </span>\n          </div>\n        </div>\n\n        <div ui-card-content class=\"space-y-4 p-5 pt-0 sm:p-6 sm:pt-0\">\n          <div class=\"border-border/70 bg-muted/30 rounded-lg border p-4\">\n            <p class=\"text-foreground text-xs leading-relaxed sm:text-sm\">\n              “Lipid panel shows mild elevation in LDL Cholesterol (138 mg/dL) and Total Cholesterol (215 mg/dL).\n              Fasting blood glucose (92 mg/dL) and renal filtration markers (eGFR 104 mL/min/1.73m²) demonstrate\n              outstanding stability. Recommend continuing Mediterranean dietary pattern with emphasis on soluble fiber\n              and healthy monounsaturated fats, 150 minutes of moderate aerobic exercise weekly, and repeat lipid panel\n              in 3 months. Statin therapy is not warranted at the patient's current 10-year ASCVD risk threshold.”\n            </p>\n          </div>\n\n          <div class=\"space-y-2\">\n            <span class=\"text-muted-foreground text-xs font-medium tracking-wide uppercase\">\n              Recommended Clinical Action Items\n            </span>\n            <div class=\"grid grid-cols-1 gap-2.5 sm:grid-cols-3\">\n              <div class=\"border-border bg-card flex items-start gap-2.5 rounded-lg border p-3\">\n                <lucide-icon [img]=\"CheckCircle2\" class=\"text-primary mt-0.5 size-4 shrink-0\" />\n                <div class=\"space-y-0.5\">\n                  <p class=\"text-foreground text-xs font-medium\">Repeat Lipid Panel</p>\n                  <p class=\"text-muted-foreground text-xs\">Schedule re-test in 90 days (Nov 2026)</p>\n                </div>\n              </div>\n              <div class=\"border-border bg-card flex items-start gap-2.5 rounded-lg border p-3\">\n                <lucide-icon [img]=\"CheckCircle2\" class=\"text-primary mt-0.5 size-4 shrink-0\" />\n                <div class=\"space-y-0.5\">\n                  <p class=\"text-foreground text-xs font-medium\">Mediterranean Diet</p>\n                  <p class=\"text-muted-foreground text-xs\">Maintain high fiber and plant sterols intake</p>\n                </div>\n              </div>\n              <div class=\"border-border bg-card flex items-start gap-2.5 rounded-lg border p-3\">\n                <lucide-icon [img]=\"CheckCircle2\" class=\"text-primary mt-0.5 size-4 shrink-0\" />\n                <div class=\"space-y-0.5\">\n                  <p class=\"text-foreground text-xs font-medium\">Cardiovascular Wellness</p>\n                  <p class=\"text-muted-foreground text-xs\">150 mins weekly moderate aerobic activity</p>\n                </div>\n              </div>\n            </div>\n          </div>\n\n          <ui-separator />\n          <div class=\"flex flex-col gap-2 pt-1 sm:flex-row sm:items-center sm:justify-between\">\n            <div class=\"flex items-center gap-2\">\n              <div\n                class=\"border-border bg-muted flex size-7 shrink-0 items-center justify-center rounded-full border text-xs font-semibold\"\n              >\n                MT\n              </div>\n              <div>\n                <p class=\"text-foreground text-xs font-semibold\">{{ patient.orderedBy }}</p>\n                <p class=\"text-muted-foreground text-xs\">NPI #1849204812 · Medical License #20MD084721</p>\n              </div>\n            </div>\n            <p class=\"text-muted-foreground font-mono text-xs tabular-nums\">\n              Digitally signed on Aug 18, 2026 · 15:45 EDT\n            </p>\n          </div>\n        </div>\n      </div>\n\n      <!-- Lab Facility Certification Footer -->\n      <div\n        class=\"border-border/60 text-muted-foreground flex flex-col gap-2 rounded-lg border border-dashed px-4 py-3 text-xs sm:flex-row sm:items-center sm:justify-between\"\n      >\n        <div class=\"flex items-center gap-1.5\">\n          <lucide-icon [img]=\"MapPin\" class=\"size-3.5 shrink-0\" />\n          <span>{{ patient.facilityAddress }}</span>\n        </div>\n        <div class=\"flex items-center gap-2 font-mono text-xs\">\n          <span>Specimen: {{ patient.specimen }}</span>\n          <span>·</span>\n          <span>CLIA Certified</span>\n        </div>\n      </div>\n    </div>\n  `,\n})\nexport class UiLabResultsViewerComponent {\n  protected readonly AlertTriangle = AlertTriangle\n  protected readonly CheckCircle2 = CheckCircle2\n  protected readonly FileCheck2 = FileCheck2\n  protected readonly FileDown = FileDown\n  protected readonly FlaskConical = FlaskConical\n  protected readonly MapPin = MapPin\n  protected readonly Printer = Printer\n  protected readonly Search = Search\n  protected readonly Share2 = Share2\n  protected readonly ShieldCheck = ShieldCheck\n  protected readonly Stethoscope = Stethoscope\n  protected readonly TrendingDown = TrendingDown\n  protected readonly TrendingUp = TrendingUp\n\n  protected readonly patient = patientInfo\n\n  @Input() set initialTab(v: string) {\n    this.activeTab.set(v ?? 'all')\n  }\n  @Input() set initialSearch(v: string) {\n    this.searchQuery.set(v ?? '')\n  }\n  @Input('class') className?: string\n\n  readonly tests = signal<LabTest[]>([...defaultTests])\n  readonly activeTab = signal('all')\n  readonly searchQuery = signal('')\n  readonly isCopiedShare = signal(false)\n  readonly isDownloadingPdf = signal(false)\n  private shareTimer: ReturnType<typeof setTimeout> | undefined\n  private pdfTimer: ReturnType<typeof setTimeout> | undefined\n\n  readonly filteredTests = computed(() => {\n    const tab = this.activeTab()\n    const q = this.searchQuery().toLowerCase().trim()\n    return this.tests().filter((test) => {\n      if (tab === 'out-of-range' && test.status === 'Normal') return false\n      if (tab === 'lipid' && test.panel !== 'lipid') return false\n      if (tab === 'metabolic-renal' && test.panel !== 'metabolic' && test.panel !== 'renal') return false\n      if (q) {\n        return (\n          test.name.toLowerCase().includes(q) ||\n          test.loinc.toLowerCase().includes(q) ||\n          test.panelLabel.toLowerCase().includes(q)\n        )\n      }\n      return true\n    })\n  })\n\n  readonly outOfRangeCount = computed(() => this.tests().filter((t) => t.status !== 'Normal').length)\n\n  get rootClass(): string {\n    return cn('text-foreground w-full space-y-6', this.className)\n  }\n\n  setActiveTab(value: string): void {\n    this.activeTab.set(value)\n  }\n\n  testRowClass(test: LabTest): string {\n    return cn('transition-colors', test.status === 'High' && 'bg-warning/5 hover:bg-warning/10')\n  }\n\n  valueClass(test: LabTest): string {\n    return cn(\n      'text-base font-semibold tabular-nums sm:text-lg',\n      test.status === 'High' && 'text-warning font-semibold',\n      test.status === 'Normal' && 'text-foreground',\n    )\n  }\n\n  markerClass(test: LabTest): string {\n    return cn(\n      'border-background size-3.5 rounded-full border-2 shadow-xs transition-transform hover:scale-125',\n      test.status === 'High' && 'bg-warning ring-warning/30 ring-2',\n      test.status === 'Normal' && 'bg-success ring-success/30 ring-2',\n      test.status === 'Low' && 'bg-info ring-info/30 ring-2',\n    )\n  }\n\n  trendIconClass(test: LabTest): string {\n    return cn(\n      'size-3.5',\n      test.trendStatus === 'warning' && 'text-warning',\n      test.trendStatus === 'success' && 'text-success',\n    )\n  }\n\n  trendDeltaClass(test: LabTest): string {\n    return cn(\n      'text-xs font-semibold tabular-nums',\n      test.trendStatus === 'warning' && 'text-warning',\n      test.trendStatus === 'success' && 'text-foreground',\n    )\n  }\n\n  handleShare(): void {\n    try {\n      void navigator.clipboard?.writeText(\n        `Lab Results for ${patientInfo.name} (${patientInfo.accession}) - ${patientInfo.collectedDate}`,\n      )\n      this.isCopiedShare.set(true)\n      clearTimeout(this.shareTimer)\n      this.shareTimer = setTimeout(() => this.isCopiedShare.set(false), 2000)\n    } catch {\n      // Clipboard fallback\n    }\n  }\n\n  handleDownloadPdf(): void {\n    if (this.isDownloadingPdf()) return\n    this.isDownloadingPdf.set(true)\n    clearTimeout(this.pdfTimer)\n    this.pdfTimer = setTimeout(() => this.isDownloadingPdf.set(false), 1500)\n  }\n\n  handlePrint(): void {\n    if (typeof window !== 'undefined') window.print()\n  }\n}\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/lab-results-viewer/lab-results-viewer.component.ts"
    },
    {
      "path": "packages/registry-angular/blocks/lab-results-viewer/index.ts",
      "content": "export { UiLabResultsViewerComponent, type LabTest, type TestStatus } from './lab-results-viewer.component'\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/lab-results-viewer/index.ts"
    }
  ],
  "dependencies": [
    "lucide-angular"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/angular/badge.json",
    "https://uipkge.dev/r/angular/button.json",
    "https://uipkge.dev/r/angular/card.json",
    "https://uipkge.dev/r/angular/separator.json",
    "https://uipkge.dev/r/angular/table.json",
    "https://uipkge.dev/r/angular/tabs.json"
  ],
  "description": "Quest and Labcorp style diagnostic lab results report viewer: patient metadata header, clinical attention banner, grouped test panels (Lipid, Glucose, Renal) with LOINC codes, reference range linear scale bars, historical 6-month trend deltas, and doctor clinical impression card with electronic verification.",
  "categories": [
    "healthcare",
    "app"
  ]
}