# -*- coding: utf-8 -*-
"""몽타주 시각판정 결과: candidate 행 N 확정 + 하늘색 표시"""
import sys, io, openpyxl
from openpyxl.styles import PatternFill
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
P=r'3.한국의약품안전관리원/한국의약품안전관리원.xlsx'
# 확정 N (시각판정)
VERDICT={
 5:'어문', 13:'어문', 14:'어문', 35:'어문', 40:'어문', 42:'어문', 49:'어문', 82:'어문',
 11:'어문,이미지,영상', 57:'어문,이미지,영상', 63:'어문,이미지,영상',
 83:'어문,이미지', 84:'어문,이미지', 85:'어문,이미지', 88:'어문,이미지',
}
wb=openpyxl.load_workbook(P); ws=wb.active
blue=PatternFill(fill_type='solid', fgColor='FFBDD7EE', bgColor='FFBDD7EE')
for r,n in VERDICT.items():
    cur=ws.cell(r,14).value or ''
    if cur!=n:
        ws.cell(r,14).value=n
        ws.cell(r,14).fill=blue
        print(f'r{r}: {cur} -> {n} (marked)')
    else:
        print(f'r{r}: {n} (unchanged)')
wb.save(P)
