docs: 아웃바운드 WebforAI 2~6군 병원 측정·감사 원자료와 진단·덱 빌드 스크립트 갱신

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Haewon KamandClaude Opus 5.5 committed 2026-11-25 10:56:42 +09:00
1 parent ec031f3149
commit 2e23222fee
68 files changed
+42267 -195

No files matched your search

+26 -12
View File
@@ -59,14 +59,21 @@ def cover(slide, d):
card(slide, X0, Y0, W, Y1 - Y0)
lx, split = X0 + 0.8, X0 + 11.4
# 왼쪽 묶음을 세로 가운데에 두고 로고·병원명 간격을 좁힌다
stack = 0.5 + 0.55 + 0.5 + 0.2 + 1.45 + 0.2 + 0.5
# 병원명이 한 줄(88pt, 폭 10.2in)에 안 들어가면 '성형외과' 앞에서 두 줄로 나눈다 (haewon 2026-11-03, 글자 크기 유지)
name_lines = [d["name"]]
if lines_needed(d["name"], 10.2, 88.0) > 1 and d["name"].endswith("성형외과"):
name_lines = [d["name"][:-4], "성형외과"]
for ln in name_lines:
fit(ln, 10.2, 88.0, 1, "cover name")
name_h = 1.45 + 1.25 * (len(name_lines) - 1)
stack = 0.5 + 0.55 + 0.5 + 0.2 + name_h + 0.2 + 0.5
y = Y0 + (Y1 - Y0 - stack) / 2
v3.brand_pair(slide, lx, y, 0.5, dark=False)
y += 0.5 + 0.55
text(slide, lx, y, 10.0, 0.5, "AI ANSWER CHECK · 맞춤 진단 보고서", 22.0, bold=True, color=ACCENT, spc=200)
y += 0.7
text(slide, lx, y, 10.2, 1.45, d["name"], 88.0, 1, "cover name", bold=True, color=NAVY)
y += 1.65
text(slide, lx, y, 10.2, name_h, name_lines, 88.0, bold=True, color=NAVY, line_spacing=0.95)
y += name_h + 0.2
text(slide, lx, y, 10.2, 0.5, f"AI 답변 진단 보고서 · 측정 {d['measured']}", 26.0, 1, "cover meta", color=SLATE_700)
_rect(slide, split, Y0 + 0.9, 0.03, Y1 - Y0 - 1.8, fill=RULE, line=None, radius=0)
stats = [("10", "환자 질문 (한국어 5 · 영어 5)"), ("4", "AI 답변엔진"), ("×3", "질문마다 3회 측정")]
@@ -113,6 +120,10 @@ def summary(slide, d):
def questions(slide, rows):
gx, gy = 0.4, 0.35
cw, ch = (W - gx * 2) / 3, (Y1 - Y0 - gy) / 2
# 질문은 실측 원문이라 줄일 수 없다. 한 장에 3줄 질문이 있으면 그 장 카드 전부를 3줄 배치(엔진 줄 간격 축소)로 맞춘다.
# 렌더 실측: 한 줄 폭 대비 글자 폭 2.03배는 2줄, 2.22배는 3줄이라 2.1배를 기준으로 쓴다 (2026-11-03)
per_line = (cw - 0.7) * 72 / 24.0
tall = any(em_width(q["question"]) / per_line > 2.1 for q in rows[:5])
for k in range(6):
x, y = X0 + (k % 3) * (cw + gx), Y0 + (k // 3) * (ch + gy)
card(slide, x, y, cw, ch)
@@ -133,24 +144,27 @@ def questions(slide, rows):
icon(slide, ix, y + 0.3, f"Q{q['i']}")
text(slide, ix + 0.8, y + 0.3, 2.6, 0.62, q["kind"], 28.0, bold=True, color=INDIGO, anchor=MSO_ANCHOR.MIDDLE)
badge(slide, ix + iw, y + 0.36, f"{q['eng_hit']}/{q['eng_valid']} 엔진 언급", tone)
fit(q["question"], iw, 24.0, 2, f"question Q{q['i']}")
text(slide, ix, y + 1.0, iw, 0.85, q["question"], 24.0, 2, bold=True, color=NAVY, line_spacing=1.05)
_rect(slide, ix, y + 1.9, iw, 0.015, fill=RULE, line=None, radius=0)
ry = y + 1.98
# 질문은 실측 원문이라 줄일 수 없다. 3줄이면 줄 간격과 엔진 줄 높이를 좁혀 카드 안에 맞춘다 (haewon 2026-11-03)
fit(q["question"], iw, 24.0, 3, f"question Q{q['i']}")
qy, qh, ls, rule_y, ry, step = ((0.95, 1.15, 0.95, 2.12, 2.18, 0.4) if tall
else (1.0, 0.85, 1.05, 1.9, 1.98, 0.46))
text(slide, ix, y + qy, iw, qh, q["question"], 24.0, 3, bold=True, color=NAVY, line_spacing=ls)
_rect(slide, ix, y + rule_y, iw, 0.015, fill=RULE, line=None, radius=0)
ry = y + ry
for lab, rs in q["engines"]:
valid = [r for r in rs if r != "na"]
text(slide, ix, ry, 2.6, 0.46, lab, 24.0, color=SLATE_700, anchor=MSO_ANCHOR.MIDDLE)
text(slide, ix, ry, 2.6, step, lab, 24.0, color=SLATE_700, anchor=MSO_ANCHOR.MIDDLE)
if not valid:
text(slide, ix + 2.6, ry, iw - 2.6, 0.46, "확인 불가", 24.0, color=SLATE_500, align=PP_ALIGN.RIGHT,
text(slide, ix + 2.6, ry, iw - 2.6, step, "확인 불가", 24.0, color=SLATE_500, align=PP_ALIGN.RIGHT,
anchor=MSO_ANCHOR.MIDDLE)
else:
h = valid.count("hit")
t = TONE["good" if h == len(valid) else ("crit" if h == 0 else "warn")][1]
dots = "".join("●" if r == "hit" else ("○" if r == "miss" else "·") for r in rs)
text(slide, ix + 2.6, ry, 1.3, 0.46, dots, 24.0, bold=True, color=t, anchor=MSO_ANCHOR.MIDDLE, spc=150)
text(slide, ix + 3.9, ry, iw - 3.9, 0.46, f"{h}/{len(valid)}", 24.0, name=NUM, bold=True, color=t,
text(slide, ix + 2.6, ry, 1.3, step, dots, 24.0, bold=True, color=t, anchor=MSO_ANCHOR.MIDDLE, spc=150)
text(slide, ix + 3.9, ry, iw - 3.9, step, f"{h}/{len(valid)}", 24.0, name=NUM, bold=True, color=t,
align=PP_ALIGN.RIGHT, anchor=MSO_ANCHOR.MIDDLE)
ry += 0.46
ry += step
# ── 9·10 답변 원문 ──────────────────────────────────────────────────────────