type: fhirpath-operatoroperator: +category: Unary Operatorssection: 6.8.1source: fhirpath/operations.json
FHIRPath Operator: + (plus)
For Integer, Decimal, and quantity, adds the operands. For strings, concatenates the right operand to the left operand.
When adding quantities, the dimensions of each quantity must be the same, but not necessarily the unit.
3 'm' + 3 'cm' // 303 'cm'
Summary
- Category: Unary Operators
- Section:
6.8.1 - Right Argument:
Integer | Long | Decimal | Quantity - Return Type:
Integer | Long | Decimal | Quantity - Empty Input Result:
empty - Errors on Multiple Input:
true
Description
Unary positive operator. Returns the value of its operand unchanged. Supported for Integer, Long, Decimal, and Quantity. Using with any incompatible type will signal an error.
Type Mapping
Integer-IntegerLong-LongDecimal-DecimalQuantity-Quantity