Spaces:
Sleeping
Sleeping
Commit History
-
0.7.3: Smarter empty-state copy for No-HCCs-suggested
Charles tested four real-ish notes; three of four produced no HCCs (fracture, AFib captured HCC-96 correctly, GI bleed, COPD captured HCC-111 correctly). The prior "check filtered-mentions below" copy was unhelpful when there were no filtered mentions either — the note simply had no HCC-codable diagnoses. New empty state branches on result.filtered_mentions: * Non-empty → "conditions were filtered; expand the panel below" (old behavior). * Empty → "this note has no diagnoses in the CMS-HCC v28 payment model (acute fractures / acute bleeds / many surgical scenarios are not HCC-codable), or the NER missed a surface form. v28 covers ~115 chronic-condition HCCs — it is not a general clinical coder." This is the line a recruiter or clinician reads when they throw their first "realistic" note at the demo and are surprised to see zero captures. Framing it as model-scope rather than pipeline-failure matches the actual cod…5278b6c -
Milestone 0.7.0: LLM MEAT extractor (Qwen/Qwen2.5-3B-Instruct + T4)
Replaces the rule-based MEAT matcher (which couldn't follow implicit references like "Continue metformin" → TREAT-for-DM) with a small instruction-tuned LLM producing structured JSON. Component I's byte-exact substring guarantee still enforces faithfulness downstream. New - app/pipeline/components/f_meat_llm.py::LLMMEATExtractor * Lazy transformers import; CPU-only installs unaffected. * Chat-formatted prompt asking for {"M","E","A","T"} with verbatim quotes or null. * Balanced-JSON parser over the model output. * try_extract() returns None when unavailable / empty list when the LLM saw no MEAT — Composite uses the distinction. Changed - f_meat.py adds CompositeMEATExtractor and a HCC_MEAT_EXTRACTOR_BACKEND env selector. CompositeMEATExtractor only falls back to rule-based when the primary (LLM) is genuinely unavailable; empty LLM output is trusted ("LLM saw no MEAT") to avoid rule-based false positives. - app/api/server.py lifespan spawns a background thread fo…5eed8db -
0.6.4: /api/status diagnostic + StatusBanner + remove unused NotePanel prop
Runtime diagnostic - GET /api/status returns pipeline_ready, reference_counts (hcc_labels + hcc_crosswalk_icd10), gallery_size, metrics_available. Status is "ok" if everything loaded, else "degraded" with the failing facets exposed. - ui/src/components/StatusBanner.tsx renders ONLY on degraded state — rose-colored, calls out which facet is missing, points at the HF build logs. Normal OK status stays silent to avoid banner competition with the amber research-demo disclaimer. - App.tsx fetches /api/status on load alongside gallery + metrics. Cleanup - NotePanel.Props no longer declares a `result: CodingResult | null` prop it never read. App stops passing it. Strict TS stays clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>d0ec498 -
0.6.0: Dark mode
Foundation - tailwind.config.ts: darkMode: "class". - ui/src/lib/useTheme.ts: class-strategy toggle with localStorage persistence, prefers-color-scheme fallback on first load, cross-tab sync via storage events. - ui/src/components/ThemeToggle.tsx: header toggle button (Sun/Moon icon). UI sweep — every rendered surface now has a dark: variant: - App shell: header, footer, main background, kbd hints. - TabBar, DisclaimerBanner. - NotePanel (including textarea + highlight preview + gallery select). - HCCList (rows, skeleton, copy/query pills, MEAT dots). - DrillIn (MEAT rows with category bars, risk reasons + component weights, supporting-ICD list, copyable codes). - RAFSummary (three tinted cards + totals footer). - FilteredMentionsPanel (collapsible; struck-through spans retain contrast). - SpecificityHints (amber callout + hint rows). - QueryModal (backdrop, headers, markdown pre block, Copy button). - WelcomeModal (gradient header, body bullets, amber disclaimer, footer kbd…9ce893e -
0.5.3: Print stylesheet + Print button
CSS @media print strips interactive chrome (tabs, footer, buttons, keyboard-shortcut cheatsheet) and lays out the coding view as a clean audit-summary paper output. Textareas and highlighted spans retain their color via print-color-adjust so MEAT highlights survive black-and-white mental models. UI additions: - .no-print / .print-only utility classes for selective visibility. - print-container class marks the root for print-specific padding. - Printer button next to CSV in the RAFSummary header invokes window.print(); users save as PDF via browser dialog. - print-only header under the page header shows note_id + timestamp so paper copies are dated and traceable. - Tab bar + footer kept for screen, replaced with a compact print-only footer (pipeline version + verifier drops). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>17c1232 -
0.5.2: Specificity hints
Pipeline: new components/specificity.py emits SpecificityHint objects when the note contains a keyword pointing to a higher-specificity HCC that the pipeline didn't capture. Conservative rule set: diabetic complication keywords (neuropathy / nephropathy / retinopathy / polyneuropathy / ketoacidosis / hyperosmolarity), dialysis/hemodialysis, cirrhosis, and pulmonary-fibrosis signals. Rules: * Fires only when the less-specific HCC is ACCEPTED (not trumped). * Never fires if the suggested HCC is already anywhere in the candidate list — trumping already communicates that case. * Advisory only: the coder owns the upgrade decision. The suspect list is not modified. Types: SpecificityHint added to pydantic types and TS types. CodingResult now carries specificity_hints: list[SpecificityHint]. UI: SpecificityHintsPanel renders below the suspect list when hints are present — amber callout with one row per hint showing current → suggested with a lucide arrow, trigger keyword, and…9caee33 -
0.5.1: Submit-list CSV export
Client-side Blob download of the current result as a CSV a coder's scrubber can consume. Fields: status, hcc, label, icd10_codes, raf_weight, confidence, risk_level, query_needed, meat_M/E/A/T, risk_reasons, trumped_by. Trumped candidates are included with status="trumped" so the full reasoning chain is auditable downstream. Download button lives next to the RAFSummary header where the coder already reads the summary. Filename stamps the note_id + ISO timestamp. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>35a7f1a -
Milestone 0.5.0: clinical UX pass (chart-query, RAF summary, filtered mentions, glossary)
Pipeline - Chart-query generator: every HCCCandidate gets query_draft (markdown the coder pastes into their provider-query tool) when any MEAT category is insufficient. None when MEAT is complete. - CodingResult.filtered_mentions: expose every span the pipeline saw but did not attribute, with a FilterReason (negated / family_history / historical_non_chronic / hypothetical). Gives the coder a reassurance surface that the filter didn't overreach. - New helper functions: CodingResult.captured_raf / low_risk_raf / audit_exposure_raf for the RAF summary card. UI - RAFSummary hero card: three tiles (Submit as-is / After query / Audit exposure) with RAF sums + candidate counts. Externalizes the coder's mental model into a single-screen glance. - FilteredMentionsPanel: collapsible, groups dropped spans by reason, shows surface text + section kind + plain-English explanation per bucket. - RiskBadge: color-coded with lucide icons (CheckCircle2 / AlertTriangle / AlertOctagon …af68ac3 -
Milestone 0.4.0: narrative + polish (blog, demo script, keybinds, calibrator fit)
Narrative - docs/BLOG_DRAFT.md — clinical-workflow framing first, ML second. Opens on RADV audits; pitches calibrated + auditable over SOTA F1. - docs/DEMO_SCRIPT.md — 75-second shot-by-shot demo video script with narration, UI actions, and recording hygiene notes. UI polish - ui/src/lib/useKeybinds.ts + App.tsx wiring: ⌘/Ctrl + Enter codes the note; j / ↓ and k / ↑ navigate the HCC suspect list. Disabled while focus is in an editable control. - HCCList now shows a three-row animated pulse skeleton while loading, an informative empty-state explaining negation/family-history/historical filtering, and a pre-run state pointing at the keyboard shortcut. - Footer surfaces verifier_drops alongside latency — S1 is visible per run. - Header shows the keybinding cheatsheet on md+ screens. Calibrator - g_calibrator.default_calibrator() now loads data/models/calibrator.pkl if present (overridable via HCC_MEAT_CALIBRATOR_PATH). Identity fallback unchanged. - scripts/fit_calibrato…6fc49c1 -
Milestone 0.3.0: coder-voiced README, benchmark button, NER feature flag, CMS fetcher
README - Opening rewritten in coder vocabulary (suspect list / capture / MEAT / RADV risk / hierarchy trumping). Targets the S4 30-second recruiter skim. Benchmark endpoint + UI - POST /api/benchmark re-runs every gallery item live and returns min/median/p95/max/mean ms + per-case timings. Surfaces the S2 target (8000 ms p95 on CPU free tier) explicitly. - MetricsTab now has a "Run gallery benchmark" button with a red/green p95 card and a collapsible per-case breakdown. NER backend feature flag - New TransformersNER wrapper around the HF token-classification pipeline with lazy import + label normalization onto SpanType. - default_ner() reads HCC_MEAT_NER_BACKEND (dictionary|transformers) and HCC_MEAT_NER_MODEL (default blaze999/Medical-NER). - test_ner_backend_selection.py asserts selector behavior without importing transformers when the env var is unset — keeps CI lean. CMS fetcher - scripts/fetch_cms_hcc_v28.py now has two subcommands: inspect — download the CMS …e43bca6 -
Milestone 0.2.0: metrics tabs, TF-IDF linker, 25-case fixture, Synthea scaffold
UI - Add Metrics / Calibration / Subgroups / About tabs alongside the existing three-panel Coding view. - Wire a TabBar so switching tabs doesn't rerun the pipeline. API - New GET /api/metrics returning a snapshot computed against the regression fixture at startup. Shape is frozen for the UI contract. Pipeline - New TFIDFLinker — sklearn char-ngram TF-IDF over ICD-10 descriptions with an alias fast-path and exact-description shortcut. Now the default; the prior ExactMatchLinker stays available for lean runs. - Introduce a Linker Protocol in d_linker and drop the concrete dep on ExactMatchLinker from the orchestrator. Fixtures - Expand regression_suite.json from 10 → 25 cases: paroxysmal AF, unstable angina, hepatitis-C + cirrhosis trumping, PVD, COPD exacerbation, lowercase + typo'd notes, resolved acute, three-level kidney hierarchy, rare HCC-48, systolic-CHF specificity, pulmonary fibrosis, hypothetical workup, long multi-specialty prose, and an empty-note edge c…cd5b31c -
Initial scaffold: HCC-MEAT Coder v0.1.0
End-to-end runnable pipeline with rule-based baselines in place of ML components, a FastAPI backend serving a React three-panel UI, and a 10-case regression suite guarding the invariants from AGENT_BRIEF.md §3 (faithfulness, negation/family-history filtering, hierarchy trumping, transparent risk). Deterministic components (real, tested): - E — HCC crosswalk + trumping over CMS-HCC v28 seed tables - H — over-coding (RADV) risk heuristic with named components + reasons - I — faithfulness verifier (substring guarantee + NLI hook) Baseline / swappable components: - A segmenter, B dictionary NER, C negation, D exact/alias linker, F rule-based MEAT extractor, G identity calibrator Infra: uv-driven pyproject, ruff + pytest + pre-commit, GH Actions CI for Python and UI, multi-stage Dockerfile for the HF Docker Space, typer CLIs for pipeline (`hcc-meat`) and evaluation (`hcc-meat-eval`). Reference data in data/reference/ uses PLACEHOLDER RAF weights; hydrate via scripts/fetch_cms_hcc_v28.…c6cfe5f