Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -74,6 +74,17 @@ def fn( text1, text2, num, slider1, slider2, single_checkbox,
|
|
74 |
searchTermSentence = text2
|
75 |
|
76 |
start_with_searchTermLOINC = datasetLOINC.filter(lambda example: example["Description"].startswith('Allergy')) #Allergy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
start_with_searchTermSNOMED = datasetSNOMED.filter(lambda example: example["Description"].startswith('Hospital')) #Hospital
|
78 |
start_with_searchTermCQM = dataseteCQM.filter(lambda example: example["Description"].startswith('Telephone')) #Telephone
|
79 |
|
|
|
74 |
searchTermSentence = text2
|
75 |
|
76 |
start_with_searchTermLOINC = datasetLOINC.filter(lambda example: example["Description"].startswith('Allergy')) #Allergy
|
77 |
+
columns = start_with_searchTermLOINC.column_names
|
78 |
+
columns_to_keep = ["Value Set Name", "Code", "Description", "Purpose: Clinical Focus", "Code System OID"]
|
79 |
+
columns_to_remove = set(columns_to_keep).symmetric_difference(columns)
|
80 |
+
start_with_searchTermLOINC = start_with_searchTermLOINC.remove_columns(columns_to_remove)
|
81 |
+
start_with_searchTermLOINC
|
82 |
+
start_with_searchTermLOINC.set_format("pandas")
|
83 |
+
df = start_with_searchTermLOINC[:]
|
84 |
+
df["Purpose: Clinical Focus"][0].tolist()
|
85 |
+
df4 = df.explode("Purpose: Clinical Focus", ignore_index=True)
|
86 |
+
df4.head(4)
|
87 |
+
|
88 |
start_with_searchTermSNOMED = datasetSNOMED.filter(lambda example: example["Description"].startswith('Hospital')) #Hospital
|
89 |
start_with_searchTermCQM = dataseteCQM.filter(lambda example: example["Description"].startswith('Telephone')) #Telephone
|
90 |
|