We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ea09d6 commit db38b17Copy full SHA for db38b17
routers/patients.py
@@ -46,7 +46,7 @@ async def group_patients_by_disease(current_doctor: str = Depends(get_current_do
46
{"$group": {
47
"_id": "$diagnoses_history.disease", # Group by disease name
48
"patients": {"$push": {
49
- "id": "$id",
+ "id": "$_id",
50
"name": "$name",
51
"city": "$city",
52
"age": "$age",
@@ -71,7 +71,7 @@ async def group_patients_by_condition(current_doctor: str = Depends(get_current_
71
72
"_id": "$diagnoses_history.condition", # Group by condition
73
74
75
76
77
0 commit comments