fix: KIMS 심각도 매핑 수정 (SeverityDesc 사용) + 상호작용 약품 pill 색상 강조

This commit is contained in:
thug0bin
2026-02-28 13:29:53 +09:00
parent 67e576736d
commit 8c20c8b8db
2 changed files with 29 additions and 9 deletions

View File

@@ -1193,10 +1193,15 @@
const interactions = data.interactions || [];
const drugsChecked = data.drugs_checked || [];
// 약품 목록
const drugsHtml = drugsChecked.map(d =>
`<span style="display:inline-block;background:#f1f5f9;padding:4px 8px;border-radius:4px;margin:2px;font-size:12px;">${escapeHtml(d.name.slice(0,20))}</span>`
).join('');
// 약품 목록 (상호작용 있는 약품은 빨간색/주황색 배경)
const drugsHtml = drugsChecked.map(d => {
const hasInteraction = d.has_interaction;
const bgColor = hasInteraction ? '#fef2f2' : '#f1f5f9'; // 연한 빨강 vs 회색
const borderColor = hasInteraction ? '#fca5a5' : '#e2e8f0';
const textColor = hasInteraction ? '#dc2626' : '#334155';
const icon = hasInteraction ? '⚠️ ' : '';
return `<span style="display:inline-block;background:${bgColor};border:1px solid ${borderColor};color:${textColor};padding:4px 8px;border-radius:4px;margin:2px;font-size:12px;">${icon}${escapeHtml(d.name.slice(0,20))}</span>`;
}).join('');
// 상호작용 목록
let interactionsHtml = '';