private static void PostProcessFilterConditions(QueryExpressionImp parsedQuery) { // fuzzy match condition modification if (parsedQuery.FuzzyMatch == true) { for (int i = 0; i < parsedQuery.FilterConditions.Count; i++) { QueryFilterCondition cond = parsedQuery.FilterConditions[i]; if (QueryLimit.IsValidFuzzyMatchingQueryTag(cond.QueryTag)) { var s = cond as StringSingleValueMatchCondition; parsedQuery.FilterConditions[i] = new PersonNameFuzzyMatchCondition(s.QueryTag, s.Value); } } } }
private static void PostProcessFilterConditions(QueryExpressionImp parsedQuery) { // fuzzy match condition modification if (parsedQuery.FuzzyMatch == true) { IEnumerable <QueryFilterCondition> potentialFuzzyConds = parsedQuery.FilterConditions .Where(c => QueryLimit.IsValidFuzzyMatchingQueryTag(c.DicomTag)).ToList(); foreach (QueryFilterCondition cond in potentialFuzzyConds) { var singleValueCondition = cond as StringSingleValueMatchCondition; // Remove existing stringvalue match and add fuzzymatch condition var personNameFuzzyMatchCondition = new PersonNameFuzzyMatchCondition(singleValueCondition.DicomTag, singleValueCondition.Value); parsedQuery.FilterConditions.Remove(singleValueCondition); parsedQuery.FilterConditions.Add(personNameFuzzyMatchCondition); } } }