type: fhirpath-operatoroperator: modcategory: Mathsection: 6.6.6source: fhirpath/operations.json
FHIRPath Operator: mod (mod)
Computes the remainder of the truncated division of its arguments (supported for Integer and Decimal).
5 mod 2 // 1
5.5 mod 0.7 // 0.6
5 mod 0 // empty ({ })
Summary
- Category: Math
- Section:
6.6.6 - Left Argument:
Integer | Decimal - Right Argument:
Integer | Decimal - Return Type:
Integer | Decimal - Empty Input Result:
empty - Errors on Multiple Input:
true
Description
Computes the remainder of the truncated division of its arguments. Supported for Integer and Decimal. Each operand must be a single element. Modulo by zero results in empty collection.
Type Mapping
Integer-IntegerDecimal-DecimalInteger-DecimalDecimal-Integer