diff --git a/packages/esm-patient-search-app/src/patient-search-page/advanced-patient-search.component.tsx b/packages/esm-patient-search-app/src/patient-search-page/advanced-patient-search.component.tsx index 35e9dc6ed..1e2d6f968 100644 --- a/packages/esm-patient-search-app/src/patient-search-page/advanced-patient-search.component.tsx +++ b/packages/esm-patient-search-app/src/patient-search-page/advanced-patient-search.component.tsx @@ -109,7 +109,7 @@ const AdvancedPatientSearchComponent: React.FC = ({ const patientAttributeValue = isValueObj ? (matchingAttribute.value as OpenmrsResource).uuid : matchingAttribute.value; - if (patientAttributeValue !== value) { + if ((patientAttributeValue as string).toLowerCase() !== value.toLowerCase()) { return false; } } diff --git a/packages/esm-patient-search-app/src/patient-search-page/refine-search/refine-search.component.tsx b/packages/esm-patient-search-app/src/patient-search-page/refine-search/refine-search.component.tsx index 1547b3e27..5a35f1328 100644 --- a/packages/esm-patient-search-app/src/patient-search-page/refine-search/refine-search.component.tsx +++ b/packages/esm-patient-search-app/src/patient-search-page/refine-search/refine-search.component.tsx @@ -52,7 +52,7 @@ const RefineSearch: React.FC = ({ setFilters, inTabletOrOverl (data: AdvancedPatientSearchState) => { const cleanedAttributes = Object.entries(data.attributes || {}).reduce( (acc, [key, value]) => { - if (value !== '') { + if (value) { acc[key] = value; } return acc; @@ -71,7 +71,7 @@ const RefineSearch: React.FC = ({ setFilters, inTabletOrOverl [setFilters], ); const handleResetFields = useCallback(() => { - reset(); + reset({ ...initialFilters, attributes: {} }); setFilters(initialFilters); setShowRefineSearchDialog(false); }, [reset, setFilters]);