Fix bug with Period bounds not counting as first value
This commit is contained in:
parent
f56e38148b
commit
a1b6e37395
|
@ -102,9 +102,11 @@ public class ResourceIndexedSearchParamDate extends BaseResourceIndexedSearchPar
|
||||||
this.myValueHighDateOrdinal = generateOrdinalDateInteger(theHigh);
|
this.myValueHighDateOrdinal = generateOrdinalDateInteger(theHigh);
|
||||||
}
|
}
|
||||||
private int generateOrdinalDateInteger(String theDateString){
|
private int generateOrdinalDateInteger(String theDateString){
|
||||||
String t = theDateString.substring(0, theDateString.indexOf("T"));
|
if (theDateString.contains("T")) {
|
||||||
t = t.replace("-", "");
|
theDateString = theDateString.substring(0, theDateString.indexOf("T"));
|
||||||
return Integer.valueOf(t);
|
}
|
||||||
|
theDateString = theDateString.replace("-", "");
|
||||||
|
return Integer.valueOf(theDateString);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void computeValueLowDateOrdinal(String theLow) {
|
private void computeValueLowDateOrdinal(String theLow) {
|
||||||
|
|
|
@ -642,6 +642,10 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor
|
||||||
String endString = extractValueAsString(myPeriodEndValueChild, bounds.get());
|
String endString = extractValueAsString(myPeriodEndValueChild, bounds.get());
|
||||||
dates.add(start);
|
dates.add(start);
|
||||||
dates.add(end);
|
dates.add(end);
|
||||||
|
//TODO Check if this logic is valid. Does the start of the first period indicate a lower bound??
|
||||||
|
if (firstValue == null) {
|
||||||
|
firstValue = extractValueAsString(myPeriodStartValueChild, bounds.get());
|
||||||
|
}
|
||||||
finalValue = endString;
|
finalValue = endString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue