Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ df3 = pd.read_csv('cohort_past_history_12072022.csv')
|
|
57 |
df3.sort_values(by='CHARTDATE',ascending = False, inplace=True)
|
58 |
|
59 |
# Loading in Daily Narrative
|
60 |
-
df4 = pd.read_csv('
|
61 |
df4.sort_values(by=['SUBJECT_ID','HADM_ID','STORETIME'],ascending = True, inplace=True)
|
62 |
|
63 |
|
@@ -91,7 +91,8 @@ df3.rename(columns={'SUBJECT_ID':'Patient_ID',
|
|
91 |
'INDEX_HADM_ID':'Admission_ID'}, inplace = True)
|
92 |
|
93 |
df4.rename(columns={'SUBJECT_ID':'Patient_ID',
|
94 |
-
'HADM_ID':'Admission_ID'
|
|
|
95 |
|
96 |
|
97 |
#Filter selection
|
@@ -131,8 +132,8 @@ dailyNoteChange =df4[['STORETIME','_24_Hour_Events']].loc[(df4['Patient_ID'] ==
|
|
131 |
|
132 |
dailyNoteChange.rename(columns={'STORETIME':'Time of Record',
|
133 |
'_24_Hour_Events':'Note Changes'}, inplace = True)
|
134 |
-
|
135 |
-
|
136 |
|
137 |
##========= Buttons to the 5 tabs ======== Temp disabled Discharge Plan and Social Notes
|
138 |
##col1, col2, col3, col4, col5 = st.columns([1,1,1,1,1]) -- to uncomment and comment below line to include discharge plan and social notes
|
@@ -361,7 +362,7 @@ if not(btnPastHistory) and not(btnDailyNarrative):
|
|
361 |
if btnDailyNarrative:
|
362 |
with st.container():
|
363 |
st.markdown('Daily Progress Note (24 hour event only):')
|
364 |
-
st.
|
365 |
|
366 |
|
367 |
with st.container():
|
|
|
57 |
df3.sort_values(by='CHARTDATE',ascending = False, inplace=True)
|
58 |
|
59 |
# Loading in Daily Narrative
|
60 |
+
df4 = pd.read_csv('24houreventsFulltextwdifference.csv')
|
61 |
df4.sort_values(by=['SUBJECT_ID','HADM_ID','STORETIME'],ascending = True, inplace=True)
|
62 |
|
63 |
|
|
|
91 |
'INDEX_HADM_ID':'Admission_ID'}, inplace = True)
|
92 |
|
93 |
df4.rename(columns={'SUBJECT_ID':'Patient_ID',
|
94 |
+
'HADM_ID':'Admission_ID',
|
95 |
+
'Full_24_Hour_Events':'Full Text'}, inplace = True)
|
96 |
|
97 |
|
98 |
#Filter selection
|
|
|
132 |
|
133 |
dailyNoteChange.rename(columns={'STORETIME':'Time of Record',
|
134 |
'_24_Hour_Events':'Note Changes'}, inplace = True)
|
135 |
+
dailyNote = df4['Full Text'].loc[(df4['Patient_ID'] == patient) & (df4['Admission_ID']==HospitalAdmission)]
|
136 |
+
dailyNote = dailyNote.unique()
|
137 |
|
138 |
##========= Buttons to the 5 tabs ======== Temp disabled Discharge Plan and Social Notes
|
139 |
##col1, col2, col3, col4, col5 = st.columns([1,1,1,1,1]) -- to uncomment and comment below line to include discharge plan and social notes
|
|
|
362 |
if btnDailyNarrative:
|
363 |
with st.container():
|
364 |
st.markdown('Daily Progress Note (24 hour event only):')
|
365 |
+
st.markdown(str(dailyNote)[1:-1])
|
366 |
|
367 |
|
368 |
with st.container():
|