| from __future__ import annotations | |
| from typing import Any | |
| def compile_patient_attributes_overlay(attributes: Any) -> str: | |
| if not isinstance(attributes, list): | |
| return "" | |
| cleaned = [s.strip() for s in attributes if isinstance(s, str) and s.strip()] | |
| if not cleaned: | |
| return "" | |
| bullets = "\n".join(f"- {line}" for line in cleaned) | |
| return "Continue the conversation following these patient attributes:\n" + bullets | |