Update app.py
Browse files
app.py
CHANGED
|
@@ -172,6 +172,9 @@ def process_files(thuoc_file, xetnghiem_file, thuoc_plt_file, icd_plt_file):
|
|
| 172 |
include_priority = True
|
| 173 |
include_recommendations = True
|
| 174 |
|
|
|
|
|
|
|
|
|
|
| 175 |
if not current_patients.empty:
|
| 176 |
current_patients['So_Ngay_Nam_Vien'] = ((today - current_patients['Ngày vào']).dt.days).fillna(0).astype(int)
|
| 177 |
|
|
@@ -205,8 +208,8 @@ def process_files(thuoc_file, xetnghiem_file, thuoc_plt_file, icd_plt_file):
|
|
| 205 |
f"Dược lâm sàng đề xuất làm thêm XN Công thức máu (PLT) trong ngày hôm nay.")
|
| 206 |
current_patients['Mau_Cau_Khuyen_Cao'] = current_patients.apply(compose_message, axis=1)
|
| 207 |
|
| 208 |
-
|
| 209 |
-
|
| 210 |
|
| 211 |
with pd.ExcelWriter(filerealtime) as writer:
|
| 212 |
sheet_written = False
|
|
|
|
| 172 |
include_priority = True
|
| 173 |
include_recommendations = True
|
| 174 |
|
| 175 |
+
num_need_plt = 0
|
| 176 |
+
num_can_thiep = 0
|
| 177 |
+
|
| 178 |
if not current_patients.empty:
|
| 179 |
current_patients['So_Ngay_Nam_Vien'] = ((today - current_patients['Ngày vào']).dt.days).fillna(0).astype(int)
|
| 180 |
|
|
|
|
| 208 |
f"Dược lâm sàng đề xuất làm thêm XN Công thức máu (PLT) trong ngày hôm nay.")
|
| 209 |
current_patients['Mau_Cau_Khuyen_Cao'] = current_patients.apply(compose_message, axis=1)
|
| 210 |
|
| 211 |
+
num_need_plt = len(set(current_patients[current_patients['Mau_Cau_Khuyen_Cao'].str.contains("làm thêm XN")]['makcb']))
|
| 212 |
+
num_can_thiep = len(set(current_patients[~current_patients['Mau_Cau_Khuyen_Cao'].str.contains("làm thêm XN")]['makcb']))
|
| 213 |
|
| 214 |
with pd.ExcelWriter(filerealtime) as writer:
|
| 215 |
sheet_written = False
|