HS.FHIRPath.API
class HS.FHIRPath.API extends %Library.RegisteredObject
Method Inventory
- deserializeParseTree()
- enableCache()
- evaluate()
- evaluateArray()
- evaluateToJson()
- getInstance()
- getPathAndType()
- parse()
- serializeParseTree()
- setDecimalPrecision()
- setTraceLevel()
Methods
method enableCache(enable As %Boolean)
API
Clears and existing cached expressions and enables or disables an in-memory cache
of parsed FHIRPath expressions. Provides performance improvement for repetitive usage
of a limited set of expressions (e.g. search parameter expressions, etc).
@Input enable - If 1, enables caching, if 0, disables caching
@Input enable - If 1, enables caching, if 0, disables caching
method evaluate(resource As %DynamicObject, treeOrExpression, Output OUTPUT, env As HS.FHIRPath.Environment = "")
API
Evaluate a FHIRPath Node (from a previously parsed expression) and return the
value collection selected by that expression from the provided resource object.
Output is a multi-dimensional array of the following form
Output is a multi-dimensional array of the following form
Output the count of value nodes Output(n) the value information of the n-th element in the output collection Output(n,"t") the FHIR datatype of the n-th element in the output collection
method evaluateArray(ByRef array, treeOrExpression, Output OUTPUT, env As HS.FHIRPath.Environment = "")
API
Evaluate a FHIRPath Node (from a previously parsed expression) and return the
value collection selected by that expression from the array of objects.
Input and Output are multi-dimensional arrays of the following form
Input and Output are multi-dimensional arrays of the following form
Output the count of value nodes Output(n) the value information of the n-th element in the output collection Output(n,"t") the FHIR datatype of the n-th element in the output collection
method evaluateToJson(resource As %DynamicObject, treeOrExpression, env As HS.FHIRPath.Environment = "") as %DynamicArray
API
Evaluate a FHIRPath Node (from a previously parsed expression) and return the
%DynamicArray of the values selected by that expression from the provided resource object.
Note, if the FHIR datatype of the collection elements is needed, use the evaluate method
Note, if the FHIR datatype of the collection elements is needed, use the evaluate method
classmethod getInstance(mdSetKey As %String, traceLevel As %Integer = 0) as HS.FHIRPath.API
Obtain an instance of a FHIRPath processor for the specified schema.
method getPathAndType(resourceType As %String, withParseTree As Node, Output contextPath As %List, Output datatype)
Returns the contextPath and datatype of a FHIRPath expression. The contextPath
Output contextPath - is a %List of the field names used to navigate to the expression value.
Output datatype - A multi-dimensional result. The top-node is the resulting datatype of the expression. It may not be the datatype of the referenced data element if, say, a boolean function like 'exists' is applied to that data element. If the datatype is "Reference", then datatype("tl") will be a %List of allowable target ResourceType's datatype("ar") 1 if the referenced property is an array, 0 if a scalar datatype("mv") 1 if the expression can yield more than one value, 0 if a single value datatype("t") the FHIR datatype of expression datatype("tl") If the property contains a reference, a %List of allowable target ResourceType's, otherwise not present datatype("vt") If the datatype is "variant", the allowable variant datatype(s), otherwise not present
NOTE: This function is intended for single-path expressions and will fail otherwise.
Output contextPath - is a %List of the field names used to navigate to the expression value.
Output datatype - A multi-dimensional result. The top-node is the resulting datatype of the expression. It may not be the datatype of the referenced data element if, say, a boolean function like 'exists' is applied to that data element. If the datatype is "Reference", then datatype("tl") will be a %List of allowable target ResourceType's datatype("ar") 1 if the referenced property is an array, 0 if a scalar datatype("mv") 1 if the expression can yield more than one value, 0 if a single value datatype("t") the FHIR datatype of expression datatype("tl") If the property contains a reference, a %List of allowable target ResourceType's, otherwise not present datatype("vt") If the datatype is "variant", the allowable variant datatype(s), otherwise not present
NOTE: This function is intended for single-path expressions and will fail otherwise.
API
Parse a FHIRPath expression into a "parse tree" of HS.FHIRPath.Node objects.
returns the root Node of the tree.
returns the root Node of the tree.
method serializeParseTree(parseTree As Node)
method setDecimalPrecision(precision As %Boolean = 1)
method setTraceLevel(trace As %Integer)
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()