awacke1 commited on
Commit
3cc1099
โ€ข
1 Parent(s): 73cd229

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +139 -0
app.py ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import streamlit as st
3
+ import pandas as pd
4
+ import os
5
+
6
+ # Define a mapping of state abbreviations to emojis
7
+ state_emojis = {
8
+ 'MN': '๐ŸŒฒ', # Example for Minnesota, add more as needed
9
+ # Add additional state emojis here
10
+ }
11
+
12
+ # Function to load CSV files from a directory
13
+ def load_csv_files(directory):
14
+ return [f for f in os.listdir(directory) if f.endswith('.csv')]
15
+
16
+ # Load CSV files from the directory
17
+ directory = '.' # Set the directory where your CSV files are located
18
+ csv_files = load_csv_files(directory)
19
+
20
+ # Sort files alphabetically
21
+ csv_files.sort()
22
+
23
+ # Create a sidebar with buttons for each state file
24
+ st.sidebar.title('State Files')
25
+ for file in csv_files:
26
+ state_abbr = file.split('.')[0]
27
+ state_name = state_abbr # Replace this with actual state name mapping if available
28
+ emoji = state_emojis.get(state_abbr, '๐Ÿ“„') # Default emoji if state not in dictionary
29
+ if st.sidebar.button(f'{emoji} {state_name} ({state_abbr})'):
30
+ # Load the selected CSV file into a DataFrame
31
+ df = pd.read_csv(os.path.join(directory, file))
32
+ # Display the DataFrame
33
+ st.write(f'Data for {state_name} ({state_abbr}):')
34
+ st.dataframe(df, 2000, 500) # Adjust width and height as needed
35
+
36
+ # Optionally, load MN.csv by default if present
37
+ if 'MN.csv' in csv_files:
38
+ df_default = pd.read_csv(os.path.join(directory, 'MN.csv'))
39
+ st.write('Default Data for Minnesota (MN):')
40
+ st.dataframe(df_default, 2000, 500) # Adjust width and height as needed
41
+
42
+
43
+ st.markdown('''
44
+
45
+ ## NPI and Identification
46
+
47
+ - ๐Ÿ†” **NPI**: National Provider Identifier, a unique identification number for covered health care providers.
48
+ - ๐Ÿง‘ **EntityTypeCode**: Indicates whether the provider is an individual (1) or an organization (2).
49
+ - ๐Ÿ” **ReplacementNPI**: NPI that replaces a previous NPI, if applicable.
50
+ - ๐Ÿ’ผ **EmployerIdentificationNumberEIN**: Tax identification number for the provider, if they are an organization.
51
+
52
+ ## Provider Names and Credentials
53
+
54
+ - ๐Ÿข **ProviderOrganizationNameLegalBusinessName**: Legal business name of the provider, if an organization.
55
+ - ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง **ProviderLastNameLegalName**: Last (family) name of the provider, if an individual.
56
+ - ๐Ÿ“› **ProviderFirstName**: First (given) name of the provider, if an individual.
57
+ - ๐ŸŒŸ **ProviderMiddleName**: Middle name of the provider, if applicable.
58
+ - ๐Ÿ“Œ **ProviderNamePrefixText**: Prefix to the provider's name (e.g., Dr., Mr., Ms.).
59
+ - ๐Ÿท๏ธ **ProviderNameSuffixText**: Suffix to the provider's name (e.g., Jr., Sr., III).
60
+ - ๐ŸŽ“ **ProviderCredentialText**: Credentials of the provider (e.g., MD, DDS, RN).
61
+
62
+ ## Other Provider Information
63
+
64
+ - ๐Ÿฅ **ProviderOtherOrganizationName**: Other organization name used by the provider.
65
+ - ๐Ÿ”  **ProviderOtherOrganizationNameTypeCode**: Type code for the other organization name.
66
+ - ๐Ÿ”„ **ProviderOtherLastName**: Other last name used by the provider.
67
+ - โžก๏ธ **ProviderOtherFirstName**: Other first name used by the provider.
68
+ - ๐Ÿ†— **ProviderOtherMiddleName**: Other middle name used by the provider.
69
+ - ๐Ÿ”ผ **ProviderOtherNamePrefixText**: Other prefix to the provider's name.
70
+ - ๐Ÿ”ฝ **ProviderOtherNameSuffixText**: Other suffix to the provider's name.
71
+ - ๐Ÿ“œ **ProviderOtherCredentialText**: Other credentials used by the provider.
72
+ - ๐Ÿˆฏ **ProviderOtherLastNameTypeCode**: Type code for the other last name used.
73
+
74
+ ## Business Mailing Address
75
+
76
+ - ๐Ÿ“ซ **ProviderFirstLineBusinessMailingAddress**: First line of the provider's business mailing address.
77
+ - ๐Ÿ“ฌ **ProviderSecondLineBusinessMailingAddress**: Second line of the provider's business mailing address.
78
+ - ๐Ÿ™๏ธ **ProviderBusinessMailingAddressCityName**: City name of the provider's business mailing address.
79
+ - ๐Ÿ“ **ProviderBusinessMailingAddressStateName**: State name of the provider's business mailing address.
80
+ - ๐Ÿ“ฎ **ProviderBusinessMailingAddressPostalCode**: Postal code of the provider's business mailing address.
81
+ - ๐ŸŒ **ProviderBusinessMailingAddressCountryCodeIfoutsideUS**: Country code if outside the U.S.
82
+ - ๐Ÿ“ž **ProviderBusinessMailingAddressTelephoneNumber**: Telephone number for the business mailing address.
83
+ - ๐Ÿ“  **ProviderBusinessMailingAddressFaxNumber**: Fax number for the business mailing address.
84
+
85
+ ## Business Practice Location Address
86
+
87
+ - ๐Ÿ  **ProviderFirstLineBusinessPracticeLocationAddress**: First line of the provider's business practice location address.
88
+ - ๐Ÿก **ProviderSecondLineBusinessPracticeLocationAddress**: Second line of the provider's business practice location address.
89
+ - ๐ŸŒ† **ProviderBusinessPracticeLocationAddressCityName**: City name of the provider's practice location.
90
+ - ๐Ÿ—บ๏ธ **ProviderBusinessPracticeLocationAddressStateName**: State name of the provider's practice location.
91
+ - ๐Ÿ›‚ **ProviderBusinessPracticeLocationAddressPostalCode**: Postal code of the provider's practice location.
92
+ - ๐ŸŒ **ProviderBusinessPracticeLocationAddressCountryCodeIfoutsideUS**: Country code if the practice location is outside the U.S.
93
+ - ๐Ÿ“ฒ **ProviderBusinessPracticeLocationAddressTelephoneNumber**: Telephone number for the practice location.
94
+ - ๐Ÿ–จ๏ธ **ProviderBusinessPracticeLocationAddressFaxNumber**: Fax number for the practice location.
95
+
96
+ ## Dates and Status
97
+
98
+ - ๐Ÿ“… **ProviderEnumerationDate**: The date the provider was first added to the NPI registry.
99
+ - ๐Ÿ”„ **LastUpdateDate**: The date of the last update to the provider's information.
100
+ - โŒ **NPIDeactivationReasonCode**: Reason code for NPI deactivation, if applicable.
101
+ - ๐Ÿ”š **NPIDeactivationDate**: Date of NPI deactivation, if applicable.
102
+ - ๐Ÿ”™ **NPIReactivationDate**: Date of NPI reactivation, if applicable.
103
+
104
+ ## Provider Details
105
+
106
+ - ๐Ÿšน๐Ÿšบ **ProviderGenderCode**: Gender code of the provider (if an individual).
107
+ - ๐Ÿ‘ค **AuthorizedOfficialLastName**: Last name of the authorized official.
108
+ - ๐Ÿ‘ค **AuthorizedOfficialFirstName**: First name of the authorized official.
109
+ - ๐Ÿ‘ค **AuthorizedOfficialMiddleName**: Middle name of the authorized official.
110
+ - ๐Ÿ“ **AuthorizedOfficialTitleorPosition**: Title or position of the authorized official.
111
+ - ๐Ÿ“ž **AuthorizedOfficialTelephoneNumber**: Telephone number of the authorized official.
112
+
113
+ ## Licensing and Taxonomy
114
+
115
+ - ๐Ÿงฌ **HealthcareProviderTaxonomyCode**: Code indicating the provider's specific type or classification of health care supply.
116
+ - ๐Ÿ”‘ **ProviderLicenseNumber**: License number assigned to the provider.
117
+ - ๐Ÿ—บ๏ธ **ProviderLicenseNumberStateCode**: State code where the provider is licensed.
118
+ - ๐Ÿ”€ **HealthcareProviderPrimaryTaxonomySwitch**: Indicates if the taxonomy code is the provider's primary code.
119
+
120
+ ## Other Identifiers
121
+
122
+ - ๐Ÿ”– **OtherProviderIdentifier**: Other identifiers used to identify the provider.
123
+ - ๐Ÿ†” **OtherProviderIdentifierTypeCode**: Type code of the other identifier.
124
+ - ๐Ÿ—บ๏ธ **OtherProviderIdentifierState**: State code related to the other identifier.
125
+ - ๐Ÿข **OtherProviderIdentifierIssuer**: Issuer of the other identifier.
126
+
127
+ ## Organizational Details and Certification
128
+
129
+ - โ“ **IsSoleProprietor**: Indicates if the provider is a sole proprietor.
130
+ - ๐Ÿข **IsOrganizationSubpart**: Indicates if the provider is a subpart of an organization.
131
+ - ๐Ÿข **ParentOrganizationLBN**: Legal business name of the parent organization.
132
+ - ๐Ÿ’ผ **ParentOrganizationTIN**: Tax Identification Number of the parent organization.
133
+ - ๐Ÿ“› **AuthorizedOfficialNamePrefixText**: Prefix of the authorized official's name.
134
+ - ๐Ÿท๏ธ **AuthorizedOfficialNameSuffixText**: Suffix of the authorized official's name.
135
+ - ๐ŸŽ“ **AuthorizedOfficialCredentialText**: Credentials of the authorized official.
136
+ - ๐Ÿงฉ **HealthcareProviderTaxonomyGroup**: Group taxonomy codes indicating shared characteristics.
137
+
138
+
139
+ ''')