"""Render cross-marker interpretation patterns for the health report UI.""" from __future__ import annotations import html from src.interpretation import build_interpretation def patterns_html(tests: list[dict]) -> str: """Render ONLY the cross-marker patterns as an HTML block (empty string if none). Designed to sit alongside an existing per-marker report (e.g. the knowledge-graph health report) so it adds cross-marker reasoning — anemia picture, liver cluster, lipid risk — without duplicating per-marker interpretation. """ interp = build_interpretation(tests) if not interp.patterns: return "" def esc(value: object) -> str: return html.escape(str(value)) cards = "".join( '