import type { ClaimDetail } from "@/types"; type DiagnosesListProps = { diagnoses: ClaimDetail["diagnoses"]; }; // Minimal ICD-10 description lookup. Covers the most common codes // likely to appear in the test fixtures; the full ICD-10 catalog is // ~95k entries and out of scope. Codes not in this map render without // a description (the code + qualifier still display). const ICD10_DESCRIPTION: Record = { "E11.9": "Type 2 diabetes mellitus without complications", "E11.65": "Type 2 diabetes mellitus with hyperglycemia", "I10": "Essential (primary) hypertension", "J45.909": "Unspecified asthma, uncomplicated", "M54.5": "Low back pain", "R51": "Headache", "Z00.00": "General adult medical examination", }; function describe(code: string): string | null { return ICD10_DESCRIPTION[code] ?? null; } /** * Diagnoses list for the claim detail drawer (SP4). * * Inline list of mono codes + (when present) qualifier + (when the * code is in our small ICD-10 dictionary) a short human description. * The dictionary is intentionally tiny — the drawer's purpose is to * show what the claim says, not to be an ICD-10 reference. */ export function DiagnosesList({ diagnoses }: DiagnosesListProps) { return (

Diagnoses ({diagnoses.length})

{diagnoses.length === 0 ? (

No diagnoses

) : ( )}
); }