type: fhirpath-functionfunction: avgcategory: Aggregatessection: 7.5source: fhirpath/functions.json
FHIRPath Function: avg
No canonical section match found in index.md.
Summary
- Category: Aggregates
- Section:
7.5 - Return Type:
Decimal | Quantity - Empty Input Result:
empty - Errors on Multiple Input:
false
Description
Returns the average of all elements in the input collection (in the same type).
Arguments
Type Mapping
Example
(5.5 | 4.7 | 4.8).avg() // 5.0