View raw Markdown
type: fhirpath-operatoroperator: divcategory: Mathsection: 6.6.5source: fhirpath/operations.json

FHIRPath Operator: div (div)

Performs truncated division of the left operand by the right operand (supported for Integer and Decimal). In other words, the division that ignores any remainder:

5 div 2 // 2
5.5 div 0.7 // 7
5 div 0 // empty ({ })

Summary

Description

Performs truncated division of the left operand by the right operand, ignoring any remainder. Supported for Integer and Decimal. Each operand must be a single element. Division by zero results in empty collection.

Type Mapping