From fcce569226f3583f6a4fc6c76a2dc67435c2d2ce Mon Sep 17 00:00:00 2001 From: Priyanka-eGov Date: Mon, 27 Jan 2025 18:20:24 +0530 Subject: [PATCH] HCMPRE-2212 making facilityId in plan search a set for multiple drop down search, changes filterMap signature. --- .../java/digit/service/enrichment/PlanFacilityEnricher.java | 6 +++--- .../java/digit/web/models/PlanFacilitySearchCriteria.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/health-services/plan-service/src/main/java/digit/service/enrichment/PlanFacilityEnricher.java b/health-services/plan-service/src/main/java/digit/service/enrichment/PlanFacilityEnricher.java index fccb2de96d..c204f54c69 100644 --- a/health-services/plan-service/src/main/java/digit/service/enrichment/PlanFacilityEnricher.java +++ b/health-services/plan-service/src/main/java/digit/service/enrichment/PlanFacilityEnricher.java @@ -192,16 +192,16 @@ public void enrichSearchRequest(PlanFacilitySearchRequest planFacilitySearchRequ PlanFacilitySearchCriteria planFacilitySearchCriteria = planFacilitySearchRequest.getPlanFacilitySearchCriteria(); // Filter map for filtering facility meta data present in additional details - Map filtersMap = new LinkedHashMap<>(); + Map> filtersMap = new LinkedHashMap<>(); // Add facility status as a filter if present in search criteria if(!ObjectUtils.isEmpty(planFacilitySearchCriteria.getFacilityStatus())) { - filtersMap.put(FACILITY_STATUS_SEARCH_PARAMETER_KEY, planFacilitySearchCriteria.getFacilityStatus()); + filtersMap.put(FACILITY_STATUS_SEARCH_PARAMETER_KEY, Collections.singleton(planFacilitySearchCriteria.getFacilityStatus())); } // Add facility type as a filter if present in search criteria if(!ObjectUtils.isEmpty(planFacilitySearchCriteria.getFacilityType())) { - filtersMap.put(FACILITY_TYPE_SEARCH_PARAMETER_KEY, planFacilitySearchCriteria.getFacilityType()); + filtersMap.put(FACILITY_TYPE_SEARCH_PARAMETER_KEY, Collections.singleton(planFacilitySearchCriteria.getFacilityType())); } if(!CollectionUtils.isEmpty(filtersMap)) diff --git a/health-services/plan-service/src/main/java/digit/web/models/PlanFacilitySearchCriteria.java b/health-services/plan-service/src/main/java/digit/web/models/PlanFacilitySearchCriteria.java index a5a4e49c42..bab8d1555f 100644 --- a/health-services/plan-service/src/main/java/digit/web/models/PlanFacilitySearchCriteria.java +++ b/health-services/plan-service/src/main/java/digit/web/models/PlanFacilitySearchCriteria.java @@ -59,6 +59,6 @@ public class PlanFacilitySearchCriteria { private Integer limit = null; @JsonIgnore - private Map filtersMap = null; + private Map> filtersMap = null; }