feat(pmr): 환자 전화번호 표시/수정 기능 추가
- API: 처방 조회 시 CD_PERSON.PHONE 반환
- API: PUT /api/members/{code}/phone - 전화번호 저장
- UI: 나이/성별 옆에 전화번호 뱃지 표시
- UI: 전화번호 없으면 '전화번호 추가' 클릭 가능
- UI: 클릭 시 모달에서 전화번호 입력/저장
This commit is contained in:
@@ -431,20 +431,24 @@ def get_prescription_detail(prescription_id):
|
||||
'name_2': disease_name_2
|
||||
}
|
||||
|
||||
# 환자 특이사항(CUSETC) 조회 - CD_PERSON 테이블
|
||||
# 환자 특이사항(CUSETC) + 전화번호 조회 - CD_PERSON 테이블
|
||||
cusetc = ''
|
||||
phone = ''
|
||||
cus_code = rx_row.CusCode
|
||||
if cus_code:
|
||||
try:
|
||||
# PM_BASE.dbo.CD_PERSON에서 조회
|
||||
cursor.execute("""
|
||||
SELECT CUSETC FROM PM_BASE.dbo.CD_PERSON WHERE CUSCODE = ?
|
||||
SELECT CUSETC, PHONE, TEL_NO, PHONE2 FROM PM_BASE.dbo.CD_PERSON WHERE CUSCODE = ?
|
||||
""", (cus_code,))
|
||||
person_row = cursor.fetchone()
|
||||
if person_row and person_row.CUSETC:
|
||||
cusetc = person_row.CUSETC
|
||||
if person_row:
|
||||
if person_row.CUSETC:
|
||||
cusetc = person_row.CUSETC
|
||||
# 전화번호 (PHONE, TEL_NO, PHONE2 중 하나)
|
||||
phone = person_row.PHONE or person_row.TEL_NO or person_row.PHONE2 or ''
|
||||
except Exception as e:
|
||||
logging.warning(f"특이사항 조회 실패: {e}")
|
||||
logging.warning(f"환자정보 조회 실패: {e}")
|
||||
|
||||
conn.close()
|
||||
|
||||
@@ -467,7 +471,8 @@ def get_prescription_detail(prescription_id):
|
||||
'cus_code': rx_row.CusCode, # 호환성
|
||||
'age': age,
|
||||
'gender': gender,
|
||||
'cusetc': cusetc # 특이사항
|
||||
'cusetc': cusetc, # 특이사항
|
||||
'phone': phone # 전화번호
|
||||
},
|
||||
'disease_info': disease_info,
|
||||
'medications': medications,
|
||||
|
||||
Reference in New Issue
Block a user