type: fhirpath-operatoroperator: *category: Mathsection: 6.6.1source: fhirpath/operations.json
FHIRPath Operator: * (multiply)
Multiplies both arguments (supported for Integer, Decimal, and Quantity). For multiplication involving quantities, the resulting quantity will have an appropriate unit as determined by application of the UCUM specification:
12 'cm' * 3 'cm' // 36 'cm2'
3 'cm' * 12 'cm2' // 36 'cm3'
Summary
- Category: Math
- Section:
6.6.1 - Left Argument:
Integer | Decimal | Quantity - Right Argument:
Integer | Decimal | Quantity - Return Type:
Integer | Decimal | Quantity - Empty Input Result:
empty - Errors on Multiple Input:
true
Description
Multiplies both arguments. Each operand must be a single element. Both operands must be of the same type or compatible types. For quantities, the resulting quantity will have an appropriate unit as determined by UCUM specification.
Type Mapping
Integer-IntegerDecimal-DecimalInteger-DecimalDecimal-IntegerQuantity-Quantity