Vector Motion
Medical

Coding Accuracy Card - Medical Coding

Monitor medical coding accuracy and compliance. Track coding quality and billing accuracy metrics.

Coding Accuracy Card

The Coding Accuracy Card Monitor medical coding accuracy rates and compliance metrics.

Preview

Installation

ash npx shadcn@latest add https://vectormotion.vercel.app/registry/coding-accuracy-card.json

Coding Accuracy Card
'use client'import React from 'react';import { FileCheck, AlertTriangle, FileText } from 'lucide-react';import { motion } from 'motion/react';import { clsx, type ClassValue } from "clsx";import { twMerge } from "tailwind-merge";import { RadialBarChart, RadialBar, PolarAngleAxis, ResponsiveContainer } from 'recharts';function cn(...inputs: ClassValue[]) {   return twMerge(clsx(inputs));}interface AccuracyData {   name: string;   value: number;   fill: string;   [key: string]: any;}interface CodingAccuracyCardProps {   className?: string;   title?: string;   subtitle?: string;   accuracyValue?: number;   topQueryName?: string;   topQueryCount?: number;   reviewedCount?: number;   data?: AccuracyData[];}const DEFAULT_DATA: AccuracyData[] = [{ name: 'Accuracy', value: 96.2, fill: '#3b82f6' }];const DEFAULT_TITLE = "CDI";const DEFAULT_SUBTITLE = "Coding Accuracy";const DEFAULT_ACCURACY_VALUE = 96; // Should ideally match data or be derivedconst DEFAULT_TOP_QUERY_NAME = "Sepsis Specificity";const DEFAULT_TOP_QUERY_COUNT = 12;const DEFAULT_REVIEWED_COUNT = 842;export const CodingAccuracyCard: React.FC<CodingAccuracyCardProps> = ({   className = "",   title = DEFAULT_TITLE,   subtitle = DEFAULT_SUBTITLE,   accuracyValue = DEFAULT_ACCURACY_VALUE,   topQueryName = DEFAULT_TOP_QUERY_NAME,   topQueryCount = DEFAULT_TOP_QUERY_COUNT,   reviewedCount = DEFAULT_REVIEWED_COUNT,   data = DEFAULT_DATA,}) => {   const isInteractive = true;   const index = 41;   return (      <motion.div         layoutId={isInteractive ? `card-${index}-${title}` : undefined}         transition={{ duration: 0.4, ease: "easeOut" }}         className={cn(            "relative overflow-hidden rounded-2xl border border-border bg-card text-card-foreground shadow-sm transition-all flex flex-col h-full",            isInteractive ? "hover:border-primary/50 hover:shadow-md" : "",            className         )}      >         <div className="p-5 flex flex-col h-full relative z-10">            <div className="mb-2 flex items-start justify-between">               <div>                  <h3 className="font-bold text-lg text-foreground">                     {title}                  </h3>                  <div className="flex items-center gap-1.5 mt-1">                     <span className="relative flex h-2 w-2">                        <span className="relative inline-flex rounded-full h-2 w-2 bg-blue-500"></span>                     </span>                     <p className="text-sm text-muted-foreground font-medium">                        {subtitle}                     </p>                  </div>               </div>               <div className="rounded-xl bg-blue-500/10 p-2.5 text-blue-500 flex items-center justify-center ring-1 ring-blue-100 dark:ring-blue-800">                  <FileCheck className="h-5 w-5" />               </div>            </div>            <div className="flex-1 flex gap-4 items-center">               <div className="relative h-24 w-24 flex-shrink-0">                  <ResponsiveContainer width="100%" height="100%">                     <RadialBarChart                        cx="50%"                        cy="50%"                        innerRadius="70%"                        outerRadius="100%"                        barSize={8}                        data={data}                        startAngle={90}                        endAngle={-270}                     >                        <PolarAngleAxis type="number" domain={[0, 100]} angleAxisId={0} tick={false} />                        <RadialBar background dataKey="value" cornerRadius={10} />                     </RadialBarChart>                  </ResponsiveContainer>                  <div className="absolute inset-0 flex flex-col items-center justify-center">                     <span className="text-xl font-bold text-foreground">{accuracyValue}%</span>                  </div>               </div>               <div className="flex-1 space-y-3">                  <div className="space-y-1">                     <span className="text-[10px] font-bold text-muted-foreground uppercase tracking-wider">Top Query</span>                     <div className="p-2 bg-amber-50 dark:bg-amber-900/10 rounded-lg border border-amber-100 dark:border-amber-900/30">                        <div className="flex items-start gap-2">                           <AlertTriangle className="h-3.5 w-3.5 text-amber-500 mt-0.5" />                           <div>                              <p className="text-xs font-bold text-zinc-800 dark:text-zinc-200">{topQueryName}</p>                              <p className="text-[10px] text-amber-600 dark:text-amber-500">{topQueryCount} Pending</p>                           </div>                        </div>                     </div>                  </div>                  <div className="flex items-center gap-1.5 text-xs text-muted-foreground">                     <FileText className="h-3.5 w-3.5" />                     <span><span className="font-bold text-foreground">{reviewedCount}</span> charts reviewed</span>                  </div>               </div>            </div>         </div>      </motion.div>   );};

Usage

This component is a demo card displaying medical metrics with animated visualizations and dark mode support.

Prop

Type