File size: 449 Bytes
83cfdf5
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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