parser/parser library

Classes

AbsParser
AggregateParser
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()
AllFalseParser
Takes a collection of Boolean values and returns true if all the items are false. If any items are true, the result is false. If the input is empty ({ }), the result is true.
AllParser
AllTrueParser
Takes a collection of Boolean values and returns true if all the items are true. If any items are false, the result is false. If the input is empty ({ }), the result is true.
AndStringParser
AnswersParser
AnyFalseParser
Takes a collection of Boolean values and returns true if any of the items are false. If all the items are true, or if the input is empty ({ }), the result is false.
AnyTrueParser
Takes a collection of Boolean values and returns true if any of the items are true. If all the items are false, or if the input is empty ({ }), the result is false.
AsFunctionParser
DEPRECATED The as() function is defined for backwards compatibility with previous implementations of FHIRPath. However, we have chosen not to support it. DEPRECATED
AsParser
AvgParser
BaseDateTimeParser<T>
BaseDateTimeParser: either a DateParser or DateTimeParser
BooleanParser
Boolean Parser, it returns a FHIR Boolean value
BracketsIndexParser
CeilingParser
ChildrenParser
CombineParser
Merge the input and other collections into a single collection without eliminating duplicate values. Combining an empty collection with a non-empty collection will return the non-empty collection. There is no expectation of order in the resulting collection.
CommaParser
ContainsFunctionParser
ContainsOperatorParser
ConvertsToBooleanParser
http://hl7.org/fhirpath/#convertstoboolean-boolean If the input collection contains a single item, this function will return true if: the item is a Boolean the item is an Integer that is equal to one of the possible integer representations of Boolean values the item is a Decimal that is equal to one of the possible decimal representations of Boolean values the item is a String that is equal to one of the possible string representations of Boolean values
ConvertsToDateParser
Checks if input can be converted to a Date
ConvertsToDateTimeParser
Checks if input can be converted to a FhirDateTime
ConvertsToDecimalParser
Checks if input can be converted into a Decimal
ConvertsToIntegerParser
Checks if input can be converted to an Integer
ConvertsToQuantityParser
Checks if input can be converted to a ValidatedQuantity
ConvertsToStringParser
Checks if input can be converted to a String
ConvertsToTimeParser
Checks if input can be converted to a Time
CountParser
DateParser
The Date type represents date and partial date values in the range @0001-01-01 to @9999-12-31 with a 1 day step size.
DateTimeParser
The DateTime type represents date/time and partial date/time values in the range @0001-01-01T00:00:00.000 to @9999-12-31T23:59:59.999 with a 1 millisecond step size. This range is defined based on a survey of datetime implementations and is based on the most useful lowest common denominator. Implementations can provide support for larger ranges and higher precision, but must provide at least the range and precision defined here.
DecimalParser
The Decimal type represents real values in the range (-10^28+1)/10^8 to (10^28-1)/10^8 with a step size of 10^-8. Again, this is FHIRPath's official definition, we use Dart's double, which I believe is the same range as int but with 15 decimal points. FHIRPath's range is defined based on a survey of decimal-value implementations and is based on the most useful lowest common denominator. Implementations can provide support for larger decimals and higher precision, but must provide at least the range and precision defined here. In addition, implementations should use fixed-precision decimal formats to ensure that decimal values are accurately represented
DelimitedIdentifierParser
Identifiers are used as labels to allow expressions to reference elements such as model types and properties. FHIRPath supports two types of identifiers, simple and delimited. A delimited identifier is any sequence of characters enclosed in backticks ( ` ): The use of backticks allows identifiers to contains spaces, commas, and other characters that would not be allowed within simple identifiers. This allows identifiers to be more descriptive, and also enables expressions to reference models that have property or type names that are not valid simple identifiers.
DescendantsParser
DistinctParser
DivSignParser
Divides the left operand by the right operand (supported for Integer, Decimal, and Quantity). The result of a division is always Decimal, even if the inputs are both Integer. For integer division, use the div operator. If an attempt is made to divide by zero, the result is empty.
DivStringParser
DotParser
EmptyParser
Returns true if the input collection is empty ({ }) and false otherwise.
EmptySetParser
There is no literal representation for null in FHIRPath. This means that when, in an underlying data object (i.e. they physical data on which the implementation is operating) a member is null or missing, there will simply be no corresponding node for that member in the tree, e.g. Patient.name will return an empty collection (not null) if there are no name elements in the instance. In expressions, the empty collection is represented as { }.
EndsWithParser
EnvVariableParser
This allows the passing of a variable from the environment into the evaluation.
EqualsParser
EquivalentParser
ExcludeParser
ExistsParser
Returns true if the collection has any elements, and false otherwise. This is the opposite of empty(), and as such is a shorthand for empty().not(). If the input collection is empty ({ }), the result is false. The function can also take an optional criteria to be applied to the collection prior to the determination of the exists. In this case, the function is shorthand for where(criteria).exists(). Note that a common term for this function is any.
ExpParser
ExtensionParser
FhirPathParser
FhirPathParser: base parser
FirstParser
FloorParser
FpMatchesParser
FpNotParser
FpSkipParser
FpWhereParser
FunctionParser
FunctionParser: functions
GreaterEqualParser
GreaterParser
HasValueParser
IdentifierParser
Identifiers are used as labels to allow expressions to reference elements such as model types and properties. FHIRPath supports two types of identifiers, simple and delimited. A simple identifier is any alphabetical character or an underscore, followed by any number of alpha-numeric characters or underscores
IifParser
http://hl7.org/fhirpath/#iifcriterion-expression-true-result-collection-otherwise-result-collection-collection The iif function in FHIRPath is an immediate if, also known as a conditional operator (such as C’s ? : operator). The criterion expression is expected to evaluate to a Boolean. See: http://hl7.org/fhirpath/#singleton-evaluation-of-collections for rules of Boolean evaluation. Any collection with a single non-boolean item is true.
ImpliesParser
IndexOfParser
IndexParser
If the function takes an expression as a parameter, the function will evaluate the expression passed for the parameter with respect to each of the items in the input collection. These expressions may refer to the special $this and $index elements, which represent the item from the input collection currently under evaluation, and its index in the collection, respectively. For example, in name.given.where($this > 'ba' and $this < 'bc') the where() function will iterate over each item in the input collection (elements named given) and $this will be set to each item when the expression passed to where() is evaluated.
InParser
http://hl7.org/fhirpath/N1/#in-membership
IntegerParser
The Integer type represents whole numbers in the range -2^31 to 2^31-1 in the FHIRPath spec, although we follow Dart's int which is +/- 2^53
IntersectParser
IsDistinctParser
IsFunctionParser
DEPRECATED The as() function is defined for backwards compatibility with previous implementations of FHIRPath. However, we have chosen not to support it. DEPRECATED
IsParser
IterationContext
LastParser
LengthParser
LessEqualParser
LessParser
LnParser
LogParser
LowerParser
MaxParser
MinParser
MinusParser
ModParser
NotEqualsParser
https://hl7.org/fhirpath/#not-equals
NotEquivalentParser
NowParser
OfTypeParser
OperatorParser
OperatorParser: operators
OrdinalParser
OrStringParser
ParenthesesParser
ParenthesesParser: ()
ParserList
ParserList: anything that is a List of FhirPathParsers
PlusParser
PowerParser
QuantityParser
The Quantity type represents quantities with a specified unit, where the value component is defined as a Decimal, and the unit element is represented as a String that is required to be either a valid Unified Code for Units of Measure (UCUM) unit or one of the calendar duration keywords, singular or plural.
RepeatParser
ReplaceMatchesParser
ReplaceParser
RoundParser
SelectParser
SingleParser
SqrtParser
StarParser
StartsWithParser
StringConcatenationParser
StringParser
The String type represents string values up to 2^31-1 characters in length. String literals are surrounded by single-quotes and may use -escapes to escape quotes and represent Unicode characters.
SubsetOfParser
SubstringParser
SumParser
SupersetOfParser
TailParser
TakeParser
ThisParser
If the function takes an expression as a parameter, the function will evaluate the expression passed for the parameter with respect to each of the items in the input collection. These expressions may refer to the special $this and $index elements, which represent the item from the input collection currently under evaluation, and its index in the collection, respectively. For example, in name.given.where($this > 'ba' and $this < 'bc') the where() function will iterate over each item in the input collection (elements named given) and $this will be set to each item when the expression passed to where() is evaluated.
TimeOfDayParser
TimeParser
The Time type represents time-of-day and partial time-of-day values in the range @T00:00:00.000 to @T23:59:59.999 with a step size of 1 millisecond. This range is defined based on a survey of time implementations and is based on the most useful lowest common denominator. Implementations can provide support for higher precision, but must provide at least the range and precision defined here. Time values in FHIRPath do not have a timezone or timezone offset.
ToBooleanParser
http://hl7.org/fhirpath/#toboolean-boolean If the input collection contains a single item, this function will return a single boolean if: the item is a Boolean the item is an Integer and is equal to one of the possible integer representations of Boolean values the item is a Decimal that is equal to one of the possible decimal representations of Boolean values the item is a String that is equal to one of the possible string representations of Boolean values If the item is not one the above types, or the item is a String, Integer, or Decimal, but is not equal to one of the possible values convertible to a Boolean, the result is empty.
ToCharsParser
ToDateParser
Converts input to an Date if possible
ToDateTimeParser
Converts input to FhirDateTime if possible
TodayParser
ToDecimalParser
Converts input to a Decimal if possible
ToIntegerParser
Converts input to an Integer if possible
ToQuantityParser
Converts input to a ValidatedQuantity if possible
ToStringParser
Converts input to a String if possible
TotalParser
ToTimeParser
Converts input to a Time if possible
TraceParser
TruncateParser
UnaryNegateParser
UnaryPlusParser
UnionFunctionParser
Merge the two collections into a single collection, eliminating any duplicate values (using = (Equals) (=) to determine equality). There is no expectation of order in the resulting collection.
UnionOperatorParser
UpperParser
ValueParser<T>
ValueParser: basic parser that holds a value
WhiteSpaceParser
This includes all input that should be ignored, this includes pure white space, along with comments, it simply returns whatever has been passed to it
XorParser

Enums

Comparator

Functions

addToFhirTime(FhirTime fhirTime, ValidatedQuantity validatedQuantity) → FhirTime
executeComparisons(List results, ParserList before, ParserList after, Map<String, dynamic> passed, Comparator comparator, {bool where = false}) List
extendedDurationFromValidatedQuantity(ValidatedQuantity validatedQuantity) → ExtendedDuration
subtractFromFhirTime(FhirTime fhirTime, ValidatedQuantity validatedQuantity) → FhirTime