View raw Markdown
type: fhirpath-operatoroperator: >=category: Comparisonsection: 6.2.4source: fhirpath/operations.json

FHIRPath Operator: >= (greater-or-equal)

The greater or equal operator (>=) returns true if the first operand is greater than or equal to the second. The operands must be of the same type, or convertible to the same type using implicit conversion.

10 >= 5 // true
10 >= 5.0 // true - note the 10 is converted to a decimal to perform the comparison
'abc' >= 'ABC' // true
4 'm' >= 4 'cm' // true (or { } if the implementation does not support unit conversion)

@2018-03-01 >= @2018-01-01 // true
@2018-01-01 >= @2018-01-01 // true - equal with same precision
@2018-03 >= @2018-03-01 // empty ({ }) - different precisions
@2018-03-01T10:30:00 >= @2018-03-01T10:00:00 // true
@2018-03-01T10 >= @2018-03-01T10:30 // empty ({ }) - different precisions
@2018-03-01T10:30:00 >= @2018-03-01T10:30:00.0 // true - values are equal to seconds, trailing zeroes after the decimal are ignored

@T10:30:00 >= @T10:00:00 // true
@T10 >= @T10:30 // empty ({ }) - different precisions
@T10:30:00 >= @T10:30:00.0 // true - values are equal to seconds, trailing zeroes after the decimal are ignored

<a name="fn-comparable"></a>

Summary

Description

Returns true if the first operand is greater than or equal to the second. The operands must be of the same type, or convertible to the same type using implicit conversion. Both arguments must be collections with single values. String ordering is strictly lexical based on Unicode values.

Type Mapping