Spaces:
Runtime error
Runtime error
Update endpoints.py
Browse files- endpoints.py +13 -11
endpoints.py
CHANGED
|
@@ -89,17 +89,19 @@ def create_router(agent, logger, patients_collection, analysis_collection, users
|
|
| 89 |
},
|
| 90 |
"summary": analysis.get("summary", ""),
|
| 91 |
"recommendations": analysis.get("recommendations", []),
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
|
|
|
|
|
|
| 103 |
}
|
| 104 |
enriched_results.append(formatted_analysis)
|
| 105 |
|
|
|
|
| 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("contact", {}).get("phone") if patient.get("contact") else None,
|
| 98 |
+
"email": patient.get("contact", {}).get("email") if patient.get("contact") else None,
|
| 99 |
+
"address": patient.get("address"),
|
| 100 |
+
"zip_code": patient.get("zip_code"),
|
| 101 |
+
"insurance_provider": patient.get("insurance_provider"),
|
| 102 |
+
"insurance_policy_number": patient.get("insurance_policy_number"),
|
| 103 |
+
"emergency_contact_name": patient.get("emergency_contact_name"),
|
| 104 |
+
"emergency_contact_phone": patient.get("emergency_contact_phone")
|
| 105 |
}
|
| 106 |
enriched_results.append(formatted_analysis)
|
| 107 |
|