feat: 비급여/100% 표시 - UnitCode 기반
- UnitCode 컬럼 추가 (같은 테이블, 쿼리 부담 없음) - UnitCode=2: 비) 비급여 (빨간색) - UnitCode=3: 100) 전액본인부담 (보라색) - 기존 대체조제 배지와 함께 표시 가능
This commit is contained in:
parent
771d247163
commit
d820d13af9
@ -201,6 +201,7 @@ def get_prescription_detail(prescription_id):
|
||||
s.PS_Type,
|
||||
s.INV_QUAN,
|
||||
s.SUB_SERIAL,
|
||||
s.UnitCode,
|
||||
g.GoodsName,
|
||||
g.SUNG_CODE,
|
||||
m.PRINT_TYPE,
|
||||
@ -236,6 +237,9 @@ def get_prescription_detail(prescription_id):
|
||||
is_substituted = row.PS_Type == '4' and (i + 1) in original_prescriptions
|
||||
original_drug = original_prescriptions.get(i + 1) if is_substituted else None
|
||||
|
||||
# UnitCode: 1=보험, 2=비보험, 3=100/100, 4~7=급여(본인부담률)
|
||||
unit_code = int(row.UnitCode) if row.UnitCode else 1
|
||||
|
||||
medications.append({
|
||||
'medication_code': row.DrugCode or '',
|
||||
'med_name': row.GoodsName or row.DrugCode or '',
|
||||
@ -247,6 +251,7 @@ def get_prescription_detail(prescription_id):
|
||||
'type': '급여' if row.PS_Type in ['0', '4'] else '비급여' if row.PS_Type == '1' else row.PS_Type,
|
||||
'sung_code': row.SUNG_CODE or '',
|
||||
'ps_type': row.PS_Type or '0',
|
||||
'unit_code': unit_code,
|
||||
'is_substituted': is_substituted,
|
||||
'original_drug': original_drug
|
||||
})
|
||||
|
||||
@ -966,6 +966,30 @@
|
||||
margin-right: 4px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
/* 비급여 표시 */
|
||||
.noncov-badge {
|
||||
display: inline-block;
|
||||
background: linear-gradient(135deg, #ef4444, #dc2626);
|
||||
color: white;
|
||||
padding: 1px 5px;
|
||||
border-radius: 4px;
|
||||
font-size: 0.65rem;
|
||||
font-weight: 700;
|
||||
margin-right: 4px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
/* 100/100 전액본인부담 표시 */
|
||||
.full-badge {
|
||||
display: inline-block;
|
||||
background: linear-gradient(135deg, #8b5cf6, #7c3aed);
|
||||
color: white;
|
||||
padding: 1px 5px;
|
||||
border-radius: 4px;
|
||||
font-size: 0.65rem;
|
||||
font-weight: 700;
|
||||
margin-right: 4px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.original-rx {
|
||||
margin-top: 4px;
|
||||
font-size: 0.75rem;
|
||||
@ -1419,7 +1443,7 @@
|
||||
<td><input type="checkbox" class="med-check" data-code="${m.medication_code}" ${m.is_auto_print ? 'checked' : ''}></td>
|
||||
<td>
|
||||
<div class="med-name">
|
||||
${m.ps_type === '1' ? '<span class="subst-badge" title="일반 대체조제">대)</span> ' : ''}${m.is_substituted ? '<span class="lowcost-badge" title="저가대체 인센티브">저)</span> ' : ''}${m.med_name || m.medication_code}
|
||||
${m.unit_code === 2 ? '<span class="noncov-badge" title="비급여">비)</span> ' : ''}${m.unit_code === 3 ? '<span class="full-badge" title="100/100 전액본인부담">100)</span> ' : ''}${m.ps_type === '1' ? '<span class="subst-badge" title="일반 대체조제">대)</span> ' : ''}${m.is_substituted ? '<span class="lowcost-badge" title="저가대체 인센티브">저)</span> ' : ''}${m.med_name || m.medication_code}
|
||||
</div>
|
||||
<div class="med-code">${m.medication_code}</div>
|
||||
${m.add_info ? `<div style="font-size:0.75rem;color:#6b7280;">${escapeHtml(m.add_info)}</div>` : ''}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user