Update app.py
Browse files
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,
|
| 143 |
-
today = pd.
|
| 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')
|