Skip to content

Commit 1100a9c

Browse files
authored
Update patients.py
for filter casesensitive remove
1 parent f746b29 commit 1100a9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/patients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ async def filter_patients(
9898
query = Patient.find(Patient.doctor_id == current_doctor)
9999

100100
if disease_name:
101-
query = query.find({"diagnoses_history.disease": disease_name})
101+
query = query.find({"diagnoses_history.disease": {"$regex": disease_name, "$options": "i"}})
102102

103103
if condition:
104104
query = query.find({"diagnoses_history.condition": condition})

0 commit comments

Comments
 (0)