feat(admin): 기간별 사용약품 조회 페이지 완성
- /admin/drug-usage 페이지 + API 3개 구현 - GET /api/drug-usage: 기간별 약품 통계 (조제건수, 입고건수) - GET /api/drug-usage/<code>/imports: 약품별 입고 상세 - GET /api/drug-usage/<code>/prescriptions: 약품별 조제 상세 UX 개선: - 약품 클릭 시 입고/조제 상세 펼침 패널 - table-layout:fixed + colgroup으로 컬럼 너비 고정 - white-space:nowrap으로 날짜/숫자 줄바꿈 방지 - 금액/거래처 사이 border로 구분선 추가 - 발행기관 OrderName으로 수정 (InsName 오류 수정) QT_GUI 데이터와 100% 일치 검증 (살라겐정)
This commit is contained in:
21
backend/check_tiergard_pg.py
Normal file
21
backend/check_tiergard_pg.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from sqlalchemy import create_engine, text
|
||||
|
||||
engine = create_engine('postgresql://admin:trajet6640@192.168.0.87:5432/apdb_master')
|
||||
with engine.connect() as conn:
|
||||
result = conn.execute(text("""
|
||||
SELECT apc, product_name,
|
||||
llm_pharm->>'체중/부위' as dosage,
|
||||
llm_pharm->>'주성분' as ingredient
|
||||
FROM apc
|
||||
WHERE product_name ILIKE '%티어가드%'
|
||||
ORDER BY apc
|
||||
"""))
|
||||
|
||||
print('=== PostgreSQL 티어가드 전체 규격 ===')
|
||||
for row in result:
|
||||
print(f'APC: {row.apc}')
|
||||
print(f' 제품명: {row.product_name}')
|
||||
print(f' 용량: {row.dosage}')
|
||||
print(f' 성분: {row.ingredient}')
|
||||
print()
|
||||
Reference in New Issue
Block a user