Skip to content

Commit

Permalink
added sample type filter to sample management (#629)
Browse files Browse the repository at this point in the history
  • Loading branch information
Apurva-Nagar authored Oct 11, 2021
1 parent 742da3a commit bf86da4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions care/facility/api/viewsets/patient_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
User
)
from care.facility.models.patient_icmr import PatientSampleICMR
from care.facility.models.patient_sample import SAMPLE_TYPE_CHOICES


class PatientSampleFilterBackend(DRYPermissionFiltersBase):
Expand All @@ -46,6 +47,7 @@ class PatientSampleFilterSet(filters.FilterSet):
result = filters.ChoiceFilter(choices=PatientSample.SAMPLE_TEST_RESULT_CHOICES)
patient_name = filters.CharFilter(field_name="patient__name", lookup_expr="icontains")
facility = filters.UUIDFilter(field_name="consultation__facility__external_id")
sample_type = filters.ChoiceFilter(choices=SAMPLE_TYPE_CHOICES)


class PatientSampleViewSet(
Expand Down

0 comments on commit bf86da4

Please sign in to comment.