Spaces:
Runtime error
Runtime error
Update endpoints.py
Browse files- endpoints.py +12 -1
endpoints.py
CHANGED
|
@@ -88,7 +88,18 @@ def create_router(agent, logger, patients_collection, analysis_collection, users
|
|
| 88 |
"factors": analysis.get("suicide_risk", {}).get("factors", [])
|
| 89 |
},
|
| 90 |
"summary": analysis.get("summary", ""),
|
| 91 |
-
"recommendations": analysis.get("recommendations", [])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
}
|
| 93 |
enriched_results.append(formatted_analysis)
|
| 94 |
|
|
|
|
| 88 |
"factors": analysis.get("suicide_risk", {}).get("factors", [])
|
| 89 |
},
|
| 90 |
"summary": analysis.get("summary", ""),
|
| 91 |
+
"recommendations": analysis.get("recommendations", []),
|
| 92 |
+
# Add patient demographic information for modal display
|
| 93 |
+
"date_of_birth": patient.get("date_of_birth"),
|
| 94 |
+
"gender": patient.get("gender"),
|
| 95 |
+
"city": patient.get("city"),
|
| 96 |
+
"state": patient.get("state"),
|
| 97 |
+
"phone": patient.get("phone"),
|
| 98 |
+
"email": patient.get("email"),
|
| 99 |
+
"address": patient.get("address"),
|
| 100 |
+
"zip_code": patient.get("zip_code"),
|
| 101 |
+
"insurance": patient.get("insurance"),
|
| 102 |
+
"emergency_contact": patient.get("emergency_contact")
|
| 103 |
}
|
| 104 |
enriched_results.append(formatted_analysis)
|
| 105 |
|