diff --git a/fhirpath/src/main/java/au/csiro/pathling/fhirpath/function/StandardFunctions.java b/fhirpath/src/main/java/au/csiro/pathling/fhirpath/function/StandardFunctions.java index e35c232c15..f1301dca6f 100644 --- a/fhirpath/src/main/java/au/csiro/pathling/fhirpath/function/StandardFunctions.java +++ b/fhirpath/src/main/java/au/csiro/pathling/fhirpath/function/StandardFunctions.java @@ -29,10 +29,6 @@ @SuppressWarnings("unused") public class StandardFunctions { - public static boolean isTypeSpecifierFunction(@Nonnull final String functionName) { - return "ofType".equals(functionName) || "getReferenceKey".equals(functionName); - } - // TODO: This should be a string collection with a StringCoercible argument @FhirPathFunction public static Collection toString(@Nonnull final Collection input) { diff --git a/fhirpath/src/main/java/au/csiro/pathling/fhirpath/parser/InvocationVisitor.java b/fhirpath/src/main/java/au/csiro/pathling/fhirpath/parser/InvocationVisitor.java index 4c919addd8..8cfcaa7a60 100644 --- a/fhirpath/src/main/java/au/csiro/pathling/fhirpath/parser/InvocationVisitor.java +++ b/fhirpath/src/main/java/au/csiro/pathling/fhirpath/parser/InvocationVisitor.java @@ -17,7 +17,6 @@ package au.csiro.pathling.fhirpath.parser; -import static au.csiro.pathling.fhirpath.function.StandardFunctions.isTypeSpecifierFunction; import static java.util.Objects.requireNonNull; import static java.util.function.Predicate.not; import static java.util.stream.Collectors.toList; @@ -32,6 +31,10 @@ import au.csiro.pathling.fhirpath.parser.generated.FhirPathParser.ThisInvocationContext; import au.csiro.pathling.fhirpath.parser.generated.FhirPathParser.TotalInvocationContext; import au.csiro.pathling.fhirpath.parser.generated.FhirPathVisitor; +import au.csiro.pathling.fhirpath.path.Paths.EvalFunction; +import au.csiro.pathling.fhirpath.path.Paths.Resource; +import au.csiro.pathling.fhirpath.path.Paths.This; +import au.csiro.pathling.fhirpath.path.Paths.Traversal; import java.util.Collections; import java.util.List; import java.util.Optional; @@ -40,10 +43,6 @@ import java.util.stream.Stream; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import au.csiro.pathling.fhirpath.path.Paths.EvalFunction; -import au.csiro.pathling.fhirpath.path.Paths.Resource; -import au.csiro.pathling.fhirpath.path.Paths.This; -import au.csiro.pathling.fhirpath.path.Paths.Traversal; import org.hl7.fhir.r4.model.Enumerations.ResourceType; /** @@ -71,6 +70,10 @@ public InvocationVisitor() { this(false); } + private static boolean isTypeSpecifierFunction(@Nonnull final String functionName) { + return "ofType".equals(functionName) || "getReferenceKey".equals(functionName); + } + /** * This method gets called when an element is on the right-hand side of the invocation expression, * or when an identifier is referred to as a term (e.g. "Encounter" or "type").