--- type: "fhirpath-operator" title: "FHIRPath Operator: - (minus)" operator: "-" category: "Unary Operators" section: "6.8.2" source: "fhirpath/operations.json" --- # FHIRPath Operator: - (minus) Subtracts the right operand from the left operand (supported for Integer, Decimal, and Quantity). When subtracting quantities, the dimensions of each quantity must be the same, but not necessarily the unit. ``` fhirpath 3 'm' - 3 'cm' // 297 'cm' ``` ## Summary - **Category**: Unary Operators - **Section**: `6.8.2` - **Right Argument**: `Integer | Long | Decimal | Quantity` - **Return Type**: `Integer | Long | Decimal | Quantity` - **Empty Input Result**: `empty` - **Errors on Multiple Input**: `true` ## Description Unary negation operator. Negates the numeric value. If the value is a Quantity, the unit remains unchanged. If the result of negating cannot be represented, the result is empty. Supported for Integer, Long, Decimal, and Quantity. Using with any incompatible type will signal an error. ## Type Mapping - `Integer-Integer` - `Long-Long` - `Decimal-Decimal` - `Quantity-Quantity`