type: fhirpath-functionfunction: sumcategory: Aggregatessection: 7.2source: fhirpath/functions.json
FHIRPath Function: sum
No canonical section match found in index.md.
Summary
- Category: Aggregates
- Section:
7.2 - Return Type:
Integer | Long | Decimal | Quantity - Empty Input Result:
empty - Errors on Multiple Input:
false
Description
Returns the sum of all elements in the input collection (in the same type).
Arguments
Type Mapping
Example
(1.0 | 2.0 | 3.0).sum() // 6.0