Add getDistalNames() to FHIRPath for SQL-on-FHIR support

This commit is contained in:
Grahame Grieve 2023-10-03 16:11:18 +03:00
parent ee819e3f08
commit 264e289bb3
1 changed files with 18 additions and 0 deletions

View File

@ -711,5 +711,23 @@ public class ExpressionNode {
public void setOpTypes(TypeDetails opTypes) {
this.opTypes = opTypes;
}
public List<String> getDistalNames() {
List<String> names = new ArrayList<String>();
if (operation != null) {
names.add(null);
} else if (inner != null) {
names.addAll(inner.getDistalNames());
} else if (group != null) {
names.addAll(group.getDistalNames());
} else if (function != null) {
names.addAll(null);
} else if (constant != null) {
names.addAll(null);
} else {
names.add(name);
}
return names;
}
}