Merge pull request #1253 from hapifhir/gg-202305-fhirpath

Fix FHIRPath split function
This commit is contained in:
Grahame Grieve 2023-05-06 11:18:28 -05:00 committed by GitHub
commit 974ecfb794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -16,6 +16,7 @@ import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang3.StringUtils;
import org.fhir.ucum.Decimal;
import org.fhir.ucum.Pair;
import org.fhir.ucum.UcumException;
@ -4224,7 +4225,8 @@ public class FHIRPathEngine {
List<Base> result = new ArrayList<Base>();
if (focus.size() == 1) {
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));
}
}

View File

@ -52,7 +52,7 @@ public class FhirSettings {
getInstance();
return instance.fhirSettings.getApiKeys() != null
? instance.fhirSettings.getApiKeys().get(key) != null
: null;
: false;
}
public static String getNpmPath() {