Merge pull request #1253 from hapifhir/gg-202305-fhirpath
Fix FHIRPath split function
This commit is contained in:
commit
974ecfb794
|
@ -16,6 +16,7 @@ import java.util.Set;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.fhir.ucum.Decimal;
|
import org.fhir.ucum.Decimal;
|
||||||
import org.fhir.ucum.Pair;
|
import org.fhir.ucum.Pair;
|
||||||
import org.fhir.ucum.UcumException;
|
import org.fhir.ucum.UcumException;
|
||||||
|
@ -4224,7 +4225,8 @@ public class FHIRPathEngine {
|
||||||
List<Base> result = new ArrayList<Base>();
|
List<Base> result = new ArrayList<Base>();
|
||||||
if (focus.size() == 1) {
|
if (focus.size() == 1) {
|
||||||
String cnt = focus.get(0).primitiveValue();
|
String cnt = focus.get(0).primitiveValue();
|
||||||
for (String s : cnt.split(param)) {
|
String[] sl = Pattern.compile(param, Pattern.LITERAL).split(cnt);
|
||||||
|
for (String s : sl) {
|
||||||
result.add(new StringType(s));
|
result.add(new StringType(s));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class FhirSettings {
|
||||||
getInstance();
|
getInstance();
|
||||||
return instance.fhirSettings.getApiKeys() != null
|
return instance.fhirSettings.getApiKeys() != null
|
||||||
? instance.fhirSettings.getApiKeys().get(key) != null
|
? instance.fhirSettings.getApiKeys().get(key) != null
|
||||||
: null;
|
: false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getNpmPath() {
|
public static String getNpmPath() {
|
||||||
|
|
Loading…
Reference in New Issue