Jonas
commited on
Commit
·
f4b6beb
1
Parent(s):
61fb024
Fix default values for patient sex and age parameters in top_adverse_events_tool
Browse files
app.py
CHANGED
|
@@ -88,6 +88,13 @@ def top_adverse_events_tool(drug_name: str, patient_sex: str = "all", min_age: i
|
|
| 88 |
Returns:
|
| 89 |
tuple: A Plotly figure and a formatted string with the top adverse events.
|
| 90 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
sex_code = None
|
| 92 |
if patient_sex == "Male":
|
| 93 |
sex_code = "1"
|
|
|
|
| 88 |
Returns:
|
| 89 |
tuple: A Plotly figure and a formatted string with the top adverse events.
|
| 90 |
"""
|
| 91 |
+
if patient_sex is None:
|
| 92 |
+
patient_sex = "all"
|
| 93 |
+
if min_age is None:
|
| 94 |
+
min_age = 0
|
| 95 |
+
if max_age is None:
|
| 96 |
+
max_age = 120
|
| 97 |
+
|
| 98 |
sex_code = None
|
| 99 |
if patient_sex == "Male":
|
| 100 |
sex_code = "1"
|