--- type: "fhirpath-operator" title: "FHIRPath Operator: != (not-equals)" operator: "!=" category: "Equality" section: "6.1.3" source: "fhirpath/operations.json" --- # FHIRPath Operator: != (not-equals) The converse of the equals operator, returning `true` if equal returns `false`; `false` if equal returns `true`; and empty (`{ }`) if equal returns empty. In other words, `A != B`{:.fhirpath} is short-hand for `(A = B).not()`{:.fhirpath}. ## Summary - **Category**: Equality - **Section**: `6.1.3` - **Left Argument**: `Any` - **Right Argument**: `Any` - **Return Type**: `Boolean` - **Empty Input Result**: `empty` - **Errors on Multiple Input**: `false` ## Description The converse of the equals operator, returning `true` if equal returns `false`; `false` if equal returns `true`; and empty (`{ }`) if equal returns empty. Equivalent to `(A = B).not()`. ## Type Mapping - `String-String` - `Integer-Integer` - `Decimal-Decimal` - `Integer-Decimal` - `Decimal-Integer` - `Boolean-Boolean` - `Date-Date` - `DateTime-DateTime` - `Time-Time` - `Quantity-Quantity` - `Complex-Complex`