Updated based on review

This commit is contained in:
Frank Tao 2020-11-19 20:22:13 -05:00
parent 878c22192e
commit e551f1837e
3 changed files with 9 additions and 3 deletions

View File

@ -82,6 +82,10 @@ public class StringUtil {
/**
* Check the input string has prefix token
*
* e.g. For a display text of Body height:
* searching on "Bo" or "he" should find it
* searching on "ei" or "dy" should not find it
*
* @param theInput the input string
* @param thePrefix the prefix string of a token
* @return Return true if a input string token separated by space start with the prefix

View File

@ -0,0 +1,5 @@
---
type: fix
pr: 2175
title: "When expanding a ValueSet using a filter, now evaluates the display with left-matching
by string token, case-insensitive."

View File

@ -211,9 +211,6 @@ public class FhirResourceDaoValueSetR4 extends BaseHapiFhirResourceDao<ValueSet>
for (int idx = 0; idx < theContains.size(); idx++) {
ValueSetExpansionContainsComponent next = theContains.get(idx);
// e.g. For a display text of Body height:
// searching on "Bo" or "he" should find it
// searching on "ei" or "dy" should not find it
if (isBlank(next.getDisplay()) || !StringUtil.isStartsWithIgnoreCase(next.getDisplay(), theFilter)) {
theContains.remove(idx);
idx--;