feat: 비급여/100% 표시 - UnitCode 기반
- UnitCode 컬럼 추가 (같은 테이블, 쿼리 부담 없음) - UnitCode=2: 비) 비급여 (빨간색) - UnitCode=3: 100) 전액본인부담 (보라색) - 기존 대체조제 배지와 함께 표시 가능
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user