Skip to content

Commit

Permalink
Patients searched by National ID now appear as soon as a partial matc…
Browse files Browse the repository at this point in the history
…h is found, before they only appeared when the full National ID was provided.
  • Loading branch information
paolo7 committed Mar 8, 2024
1 parent 8d9f974 commit 3f60905
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tmh_registry/registry/api/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def filter_search_term(self, queryset, name, value):
Q(patient_hospital_id_str__contains=str(value)) & Q(hospital_id=selected_hospital_id_value)
).values_list("patient_id", flat=True)
queryset = queryset.filter(
Q(full_name__icontains=value) | Q(national_id__iexact=value) | Q(id__in=patient_ids)
Q(full_name__icontains=value) | Q(national_id__icontains=value) | Q(id__in=patient_ids)
)
return queryset
return queryset
Expand Down

0 comments on commit 3f60905

Please sign in to comment.