AggregateParser class
Performs general-purpose aggregation by evaluating the aggregator expression for each element of the input collection. Within this expression, the standard iteration variables of $this and $index can be accessed, but also a $total aggregation variable. The value of the $total variable is set to init, or empty ({ }) if no init value is supplied, and is set to the result of the aggregator expression after every iteration. Using this function, sum can be expressed as: value.aggregate($this + $total, 0) Min can be expressed as: value.aggregate(iif($total.empty(), $this, iif($this < $total, $this, $total))) and average would be expressed as: value.aggregate($total + $this, 0) / value.count()
- Inheritance
-
- Object
- FhirPathParser
- ValueParser<
ParserList> - FunctionParser
- AggregateParser
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → ParserList
-
finalinherited
Methods
-
copyWith(
ParserList value) → AggregateParser -
execute(
List results, Map< String, dynamic> passed) → List -
The iterable, nested function that evaluates the entire FHIRPath
expression one object at a time
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prettyPrint(
[int indent = 2]) → String -
Uses a rough approximation of reverse polish notation to render the
parsed value of a FHIRPath in a more human readable way than
verbosePrint, while still demonstrating how the expression was parsed
and nested according to this package
override
-
toString(
) → String -
A string representation of this object.
inherited
-
verbosePrint(
int indent) → String -
To print the entire parsed FHIRPath expression, this includes ALL
of the Parsers that are used in this package by the names used in
this package. These are not always synonymous with the FHIRPath
specification (although they usually are), and include some parser
classes that were created for ease of evaluation but are not included
at all as objects in the official spec. I'm generally going to recommend
that you use prettyPrint instead
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited