You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
604 B
13 lines
604 B
from scoliosis_arcs import chaklin_degree |
|
|
|
def build_scoliosis_description(arc_infos): |
|
if not arc_infos: |
|
return "Признаков сколиоза не выявлено." |
|
lines = [] |
|
for i, a in enumerate(sorted(arc_infos, key=lambda x: x["cobb_deg"], reverse=True), start=1): |
|
degree = chaklin_degree(a["cobb_deg"]) |
|
lines.append( |
|
f"Дуга {i}: {a['direction']}, уровни {a['upper_end']}-{a['lower_end']}, " |
|
f"вершина ~ {a['apex_label']}, Cobb={a['cobb_deg']:.1f}°, степень={degree}." |
|
) |
|
return " ".join(lines)
|
|
|