awacke1 commited on
Commit
97a3007
Β·
verified Β·
1 Parent(s): 111a55b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -16
app.py CHANGED
@@ -90,17 +90,17 @@ specialties = load_specialties()
90
  st.markdown("# πŸ©ΊπŸ” Care Team Finder ")
91
  st.markdown("#### Search for Care Providers by Specialty and Location")
92
 
93
- if st.expander('🩺 Understand Provider Specialties πŸ“', expanded=False):
94
  st.markdown('''
95
- ## Discover Care Providers by Specialty & Location: Quick Guide
96
- - **Code**: Unique ID identifies each specialty clearly. πŸ†”
97
- - **Grouping**: Broad category umbrella for general expertise area. 🏷️
98
- - **Classification**: Specifies type of practice within broader category. 🎯
99
- - **Specialization**: Details focus within classification for precise expertise. πŸ”
100
- - **Definition**: Concise overview of the specialty's scope. πŸ“–
101
- - **Notes**: Extra information or recent updates provided. πŸ—’οΈ
102
- - **Display Name**: Commonly recognized name of the specialty. 🏷️
103
- - **Section**: Healthcare segment the specialty belongs to. πŸ“š
104
  ''')
105
 
106
  # Allows users to select or search for a specialty
@@ -134,12 +134,14 @@ def process_files(specialty_codes, specific_state='MN'):
134
  #state_df = pd.read_csv(file, header=0) # Assuming no header for simplicity
135
 
136
  for code in specialty_codes:
137
- filtered_df = state_df[state_df[47].isin([code])] # Match against 48th column, adjust as needed
138
- if not filtered_df.empty:
139
- # Enhance the display to include 'Code', 'Grouping', and 'Classification' information
140
- display_info = specialties[specialties['Code'] == code][['Code', 'Grouping', 'Classification']].iloc[0].to_dict()
141
- results.append((os.path.basename(file).replace('.csv', ''), display_info, filtered_df))
142
-
 
 
143
  return results
144
 
145
  # Button to initiate the analysis
 
90
  st.markdown("# πŸ©ΊπŸ” Care Team Finder ")
91
  st.markdown("#### Search for Care Providers by Specialty and Location")
92
 
93
+ if st.expander(label='🩺 Understand Provider Specialties πŸ“', expanded=False):
94
  st.markdown('''
95
+ ## Discover Care Providers by Specialty & Location: Quick Guide
96
+ - **Code**: Unique ID identifies each specialty clearly. πŸ†”
97
+ - **Grouping**: Broad category umbrella for general expertise area. 🏷️
98
+ - **Classification**: Specifies type of practice within broader category. 🎯
99
+ - **Specialization**: Details focus within classification for precise expertise. πŸ”
100
+ - **Definition**: Concise overview of the specialty's scope. πŸ“–
101
+ - **Notes**: Extra information or recent updates provided. πŸ—’οΈ
102
+ - **Display Name**: Commonly recognized name of the specialty. 🏷️
103
+ - **Section**: Healthcare segment the specialty belongs to. πŸ“š
104
  ''')
105
 
106
  # Allows users to select or search for a specialty
 
134
  #state_df = pd.read_csv(file, header=0) # Assuming no header for simplicity
135
 
136
  for code in specialty_codes:
137
+ try:
138
+ filtered_df = state_df[state_df[47].isin([code])] # Match against 48th column, adjust as needed
139
+ if not filtered_df.empty:
140
+ # Enhance the display to include 'Code', 'Grouping', and 'Classification' information
141
+ display_info = specialties[specialties['Code'] == code][['Code', 'Grouping', 'Classification']].iloc[0].to_dict()
142
+ results.append((os.path.basename(file).replace('.csv', ''), display_info, filtered_df))
143
+ except:
144
+ st.write('.')
145
  return results
146
 
147
  # Button to initiate the analysis