--- type: "fhirpath-functions" title: "FHIRPath Functions" source: "fhirpath/functions.json" --- # FHIRPath Functions - [Introduction](/fhirpath-intro) - [Operations](/fhirpath-operations) ## Existence - section: `5.1` - [empty()](/fhirpath-fn-empty) - `5.1.1` - [exists()](/fhirpath-fn-exists) - `5.1.2` - [all()](/fhirpath-fn-all) - `5.1.3` - [allTrue()](/fhirpath-fn-alltrue) - `5.1.4` - [anyTrue()](/fhirpath-fn-anytrue) - `5.1.5` - [allFalse()](/fhirpath-fn-allfalse) - `5.1.6` - [anyFalse()](/fhirpath-fn-anyfalse) - `5.1.7` - [subsetOf()](/fhirpath-fn-subsetof) - `5.1.8` - [supersetOf()](/fhirpath-fn-supersetof) - `5.1.9` - [count()](/fhirpath-fn-count) - `5.1.10` - [distinct()](/fhirpath-fn-distinct) - `5.1.11` - [isDistinct()](/fhirpath-fn-isdistinct) - `5.1.12` ## Filtering and projection - section: `5.2` - [where()](/fhirpath-fn-where) - `5.2.1` - [select()](/fhirpath-fn-select) - `5.2.2` - [sort()](/fhirpath-fn-sort) - `5.2.4` - [repeat()](/fhirpath-fn-repeat) - `5.2.5` - [repeatAll()](/fhirpath-fn-repeatall) - `5.2.6` - [ofType()](/fhirpath-fn-oftype) - `5.2.7` - [coalesce()](/fhirpath-fn-coalesce) - `5.2.8` ## Subsetting - section: `5.3` - [single()](/fhirpath-fn-single) - `5.3.2` - [first()](/fhirpath-fn-first) - `5.3.3` - [last()](/fhirpath-fn-last) - `5.3.4` - [tail()](/fhirpath-fn-tail) - `5.3.5` - [skip()](/fhirpath-fn-skip) - `5.3.6` - [take()](/fhirpath-fn-take) - `5.3.7` - [intersect()](/fhirpath-fn-intersect) - `5.3.8` - [exclude()](/fhirpath-fn-exclude) - `5.3.9` ## Combining - section: `5.4` - [union()](/fhirpath-fn-union) - `5.4.1` - [combine()](/fhirpath-fn-combine) - `5.4.2` ## Conversion - section: `5.5` - [iif()](/fhirpath-fn-iif) - `5.5.1` - [toBoolean()](/fhirpath-fn-toboolean) - `5.5.2.1` - [convertsToBoolean()](/fhirpath-fn-convertstoboolean) - `5.5.2.2` - [toInteger()](/fhirpath-fn-tointeger) - `5.5.3.1` - [convertsToInteger()](/fhirpath-fn-convertstointeger) - `5.5.3.2` - [toLong()](/fhirpath-fn-tolong) - `5.5.3.3` - [convertsToLong()](/fhirpath-fn-convertstolong) - `5.5.3.4` - [toDate()](/fhirpath-fn-todate) - `5.5.4.2` - [convertsToDate()](/fhirpath-fn-convertstodate) - `5.5.4.3` - [toDateTime()](/fhirpath-fn-todatetime) - `5.5.5.1` - [convertsToDateTime()](/fhirpath-fn-convertstodatetime) - `5.5.5.2` - [toDecimal()](/fhirpath-fn-todecimal) - `5.5.6.1` - [convertsToDecimal()](/fhirpath-fn-convertstodecimal) - `5.5.6.2` - [toQuantity()](/fhirpath-fn-toquantity) - `5.5.7.1` - [convertsToQuantity()](/fhirpath-fn-convertstoquantity) - `5.5.7.2` - [toString()](/fhirpath-fn-tostring) - `5.5.8.1` - [convertsToString()](/fhirpath-fn-convertstostring) - `5.5.8.2` - [toTime()](/fhirpath-fn-totime) - `5.5.9.1` - [convertsToTime()](/fhirpath-fn-convertstotime) - `5.5.9.2` ## String Manipulation - section: `5.6` - [indexOf()](/fhirpath-fn-indexof) - `5.6.1` - [lastIndexOf()](/fhirpath-fn-lastindexof) - `5.6.2` - [substring()](/fhirpath-fn-substring) - `5.6.3` - [startsWith()](/fhirpath-fn-startswith) - `5.6.4` - [endsWith()](/fhirpath-fn-endswith) - `5.6.5` - [contains()](/fhirpath-fn-contains) - `5.6.6` - [upper()](/fhirpath-fn-upper) - `5.6.7` - [lower()](/fhirpath-fn-lower) - `5.6.8` - [replace()](/fhirpath-fn-replace) - `5.6.9` - [matches()](/fhirpath-fn-matches) - `5.6.10` - [matchesFull()](/fhirpath-fn-matchesfull) - `5.6.11` - [replaceMatches()](/fhirpath-fn-replacematches) - `5.6.12` - [length()](/fhirpath-fn-length) - `5.6.13` - [toChars()](/fhirpath-fn-tochars) - `5.6.14` ## Additional String Functions - section: `5.7` - [encode()](/fhirpath-fn-encode) - `5.7.1` - [decode()](/fhirpath-fn-decode) - `5.7.2` - [escape()](/fhirpath-fn-escape) - `5.7.3` - [unescape()](/fhirpath-fn-unescape) - `5.7.4` - [trim()](/fhirpath-fn-trim) - `5.7.5` - [split()](/fhirpath-fn-split) - `5.7.6` - [join()](/fhirpath-fn-join) - `5.7.7` ## Math - section: `5.8` - [abs()](/fhirpath-fn-abs) - `5.8.1` - [ceiling()](/fhirpath-fn-ceiling) - `5.8.2` - [exp()](/fhirpath-fn-exp) - `5.8.3` - [floor()](/fhirpath-fn-floor) - `5.8.4` - [ln()](/fhirpath-fn-ln) - `5.8.5` - [log()](/fhirpath-fn-log) - `5.8.6` - [power()](/fhirpath-fn-power) - `5.8.7` - [round()](/fhirpath-fn-round) - `5.8.8` - [sqrt()](/fhirpath-fn-sqrt) - `5.8.9` - [truncate()](/fhirpath-fn-truncate) - `5.8.10` ## Tree navigation - section: `5.9` - [children()](/fhirpath-fn-children) - `5.9.1` - [descendants()](/fhirpath-fn-descendants) - `5.9.2` ## Utility functions - section: `5.10` - [trace()](/fhirpath-fn-trace) - `5.10.1` - [pathname()](/fhirpath-fn-pathname) - `5.10.2` - [now()](/fhirpath-fn-now) - `5.10.3.1` - [timeOfDay()](/fhirpath-fn-timeofday) - `5.10.3.2` - [today()](/fhirpath-fn-today) - `5.10.3.3` - [defineVariable()](/fhirpath-fn-definevariable) - `5.10.4` - [lowBoundary()](/fhirpath-fn-lowboundary) - `5.10.5` - [highBoundary()](/fhirpath-fn-highboundary) - `5.10.6` - [precision()](/fhirpath-fn-precision) - `5.10.7` - [yearOf()](/fhirpath-fn-yearof) - `5.10.8.1` - [monthOf()](/fhirpath-fn-monthof) - `5.10.8.2` - [dayOf()](/fhirpath-fn-dayof) - `5.10.8.3` - [hourOf()](/fhirpath-fn-hourof) - `5.10.8.4` - [minuteOf()](/fhirpath-fn-minuteof) - `5.10.8.5` - [secondOf()](/fhirpath-fn-secondof) - `5.10.8.6` - [millisecondOf()](/fhirpath-fn-millisecondof) - `5.10.8.7` - [timezoneOffsetOf()](/fhirpath-fn-timezoneoffsetof) - `5.10.8.8` - [dateOf()](/fhirpath-fn-dateof) - `5.10.8.9` - [timeOf()](/fhirpath-fn-timeof) - `5.10.8.10` ## Date and Time Interval Functions - section: `5.11` - [duration()](/fhirpath-fn-duration) - `5.11.1` - [difference()](/fhirpath-fn-difference) - `5.11.2` ## Comparison - section: `6.2` - [comparable()](/fhirpath-fn-comparable) - `6.2.5` ## Types - section: `6.3` - [is()](/fhirpath-fn-is) - `6.3.2` - [as()](/fhirpath-fn-as) - `6.3.4` ## Boolean Logic - section: `6.5` - [not()](/fhirpath-fn-not) - `6.5.3` ## Aggregates - section: `7` - [aggregate()](/fhirpath-fn-aggregate) - `7.1` - [sum()](/fhirpath-fn-sum) - `7.2` - [min()](/fhirpath-fn-min) - `7.3` - [max()](/fhirpath-fn-max) - `7.4` - [avg()](/fhirpath-fn-avg) - `7.5` ## Reflection - section: `10.2` - [type()](/fhirpath-fn-type) - `10.2.2`