Skip to main content

HS.FHIRPath.Runtime

class HS.FHIRPath.Runtime extends HS.FHIRPath.Engine

This class implements the interpreter runtime processing for built-in operator and functions. Dispatch is based on the name of the function or operator so it is possible to implement support for a new function by simply adding a method to this class. Because operators are typically special characters, the initializeOperatorToMethodMap method sets up a mapping from the operator name to a valid identifier. The final method name is prefixed by "IOP" or "IUOP" (for binary or unary) handlers. Handlers for built-in functions are prefixed by "IFN"

Internally, a collection is represented as a multi-dimensional array. In the method signatures, collections are named in ALL-UPPER-CASE for clarity.

Signature for a Built-in Function handler

Method IFN(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT) 
   CONTEXT      is the context collection for that the function is applied to.
   arg          is a list of Node object representing the arguments to the function.
                The handler can evaluate these arguments by calling processNode with
                an appropriate context collection (typically the single input).
   OUTPUT       is the result collection
   

During the evaluation of a function, the interpreter calls the handler once per value in the context collection for the function. The handler will accumulate the result into the OUTPUT collection.

Signature for a Binary Operator handler

Method IOP(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
   LEFT   is the left-side input operand collection
   RIGHT  is the right-side input operand collection
   OUTPUT is the result collection

Signature for a Binary Operator handler

Method IOP(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
   LEFT   is the left-side input operand collection
   RIGHT  is the right-side input operand collection
   OUTPUT is the result collection

Method Inventory

Parameters

parameter asAllowsMultipleValues = 1;

Methods

method IFNaggregate(CONTEXT, args As %ListOfObjects, Output OUTPUT)
extension() === extension.where(url is )
method IFNchildren(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNdescendants(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNempty(CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNendsWith(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNexists(CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNextension(CONTEXT, args As %ListOfObjects, Output OUTPUT)
extension() === extension.where(url is )
method IFNfirst(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT)
Apply subsetting function first(). https://hl7.org/fhirpath/#first-collection
method IFNhasExtension(CONTEXT, args As %ListOfObjects, Output OUTPUT)
extension() === extension.where(url is )
method IFNiif(CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNindexOf(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNlast(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT)
Apply subsetting function last(). https://hl7.org/fhirpath/#last-collection
method IFNnot(CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNofType(CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNresolve(CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNsingle(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT)
Apply subsetting function single(). https://hl7.org/fhirpath/#single-collection
method IFNskip(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT)
Apply subsetting function skip(). https://hl7.org/fhirpath/#skipnum-integer-collection
method IFNstartsWith(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNsubstring(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNtail(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT)
Apply subsetting function tail(). https://hl7.org/fhirpath/#tail-collection
method IFNtake(ByRef CONTEXT, args As %ListOfObjects, Output OUTPUT)
Apply subsetting function take(). https://hl7.org/fhirpath/#takenum-integer-collection
method IFNunion(CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IFNunitConversion(CONTEXT, args As %ListOfObjects, Output OUTPUT)
extension() === extension.where(url is )
method IFNwhere(CONTEXT, args As %ListOfObjects, Output OUTPUT)
method IOPand(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPas(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPconcat(ByRef LEFT, ByRef RIGHT, Output OUTPUT, name As %String)
method IOPdiv(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPequals(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPimplies(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPin(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPis(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPminus(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPmul(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPne(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPor(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPplus(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPunion(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method IOPxor(ByRef LEFT, ByRef RIGHT, Output OUTPUT)
method MathOperation(ByRef LEFT, ByRef RIGHT, Output OUTPUT, name As %String)
method checkStringFunction(fnName As %String, inputMin As %Integer, inputMax As %Integer, ByRef CONTEXT, args As %ListOfObjects) as %Boolean
method verifyType(ByRef ARG) as %String

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

FeedbackOpens in a new tab