Package com.ibm.fhir.path.function
Class ResolveFunction
- java.lang.Object
 - 
- com.ibm.fhir.path.function.FHIRPathAbstractFunction
 - 
- com.ibm.fhir.path.function.ResolveFunction
 
 
 
- 
- All Implemented Interfaces:
 FHIRPathFunction
public class ResolveFunction extends FHIRPathAbstractFunction
 
- 
- 
Constructor Summary
Constructors Constructor Description ResolveFunction() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<FHIRPathNode>apply(FHIRPathEvaluator.EvaluationContext evaluationContext, Collection<FHIRPathNode> context, List<Collection<FHIRPathNode>> arguments)For each item in the collection, if it is a string that is a uri (or canonical or url), locate the target of the reference, and add it to the resulting collection.intgetMaxArity()intgetMinArity()StringgetName()- 
Methods inherited from class com.ibm.fhir.path.function.FHIRPathAbstractFunction
equals, generateIssue, hashCode 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getName
public String getName()
- Specified by:
 getNamein interfaceFHIRPathFunction- Specified by:
 getNamein classFHIRPathAbstractFunction
 
- 
getMinArity
public int getMinArity()
- Specified by:
 getMinArityin interfaceFHIRPathFunction- Specified by:
 getMinArityin classFHIRPathAbstractFunction
 
- 
getMaxArity
public int getMaxArity()
- Specified by:
 getMaxArityin interfaceFHIRPathFunction- Specified by:
 getMaxArityin classFHIRPathAbstractFunction
 
- 
apply
public Collection<FHIRPathNode> apply(FHIRPathEvaluator.EvaluationContext evaluationContext, Collection<FHIRPathNode> context, List<Collection<FHIRPathNode>> arguments)
For each item in the collection, if it is a string that is a uri (or canonical or url), locate the target of the reference, and add it to the resulting collection. If the item does not resolve to a resource, the item is ignored and nothing is added to the output collection. The items in the collection may also represent a Reference, in which case the Reference.reference is resolved.This method creates a resource node that is a placeholder for the actual resource, thus allowing for the FHIRPath evaluator to perform type checking on the result of the resolve function. For example:
Observation.subject.where(resolve() is Patient)
If the resource type cannot be inferred from the reference URL or type, then
FHIR_UNKNOWN_RESOURCE_TYPEis used so that we index these references by default.- Specified by:
 applyin interfaceFHIRPathFunction- Overrides:
 applyin classFHIRPathAbstractFunction- Parameters:
 evaluationContext- the evaluation environmentcontext- the current evaluation contextarguments- the arguments for this function- Returns:
 - the result of the function applied to the context and arguments
 
 
 - 
 
 -