ConverTA / backend /core /patient_knobs.py
MikelWL's picture
Feat: patient attributes v1 (local-first)
83cfdf5
raw
history blame contribute delete
449 Bytes
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