TrungLC commited on
Commit
f943e31
·
verified ·
1 Parent(s): 371b626

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -139,8 +139,8 @@ def process_files(thuoc_file, xetnghiem_file, thuoc_plt_file, icd_plt_file):
139
  final_analysis.to_excel(file5, index=False)
140
 
141
  # Realtime report
142
- def export_realtime_reports(df_report, df_xn, today_str='2026-02-02', include_priority=True, include_recommendations=True):
143
- today = pd.to_datetime(today_str)
144
  status_df = df_xn[['Mã KCB', 'Ngày vào', 'Ngày ra']].drop_duplicates('Mã KCB')
145
  status_df['Mã KCB'] = status_df['Mã KCB'].astype(str).str.replace(r'\.0$', '', regex=True).str.strip()
146
  status_df['Ngày vào'] = pd.to_datetime(status_df['Ngày vào'], dayfirst=True, errors='coerce', format='mixed')
 
139
  final_analysis.to_excel(file5, index=False)
140
 
141
  # Realtime report
142
+ def export_realtime_reports(df_report, df_xn, include_priority=True, include_recommendations=True):
143
+ today = pd.Timestamp.now(tz='Asia/Ho_Chi_Minh').normalize() # Sử dụng ngày hiện tại động với múi giờ VN
144
  status_df = df_xn[['Mã KCB', 'Ngày vào', 'Ngày ra']].drop_duplicates('Mã KCB')
145
  status_df['Mã KCB'] = status_df['Mã KCB'].astype(str).str.replace(r'\.0$', '', regex=True).str.strip()
146
  status_df['Ngày vào'] = pd.to_datetime(status_df['Ngày vào'], dayfirst=True, errors='coerce', format='mixed')