type: fhirpath-operatoroperator: xorcategory: Boolean Logicsection: 6.5.4source: fhirpath/operations.json
FHIRPath Operator: xor (xor)
Returns true if exactly one of the operands evaluates to true, false if either both operands evaluate to true or both operands evaluate to false, and the empty collection ({ }) otherwise:
| xor | true | false | empty |
|---|---|---|---|
| true | false | true | empty ({ }) |
| false | true | false | empty ({ }) |
| empty | empty ({ }) | empty ({ }) | empty ({ }) |
| {:.grid} | |||
| ## Summary |
- Category: Boolean Logic
- Section:
6.5.4 - Left Argument:
Boolean - Right Argument:
Boolean - Return Type:
Boolean - Empty Input Result:
empty - Errors on Multiple Input:
false
Description
Returns true if exactly one of the operands evaluates to true, false if either both operands evaluate to true or both operands evaluate to false, and empty collection otherwise.
Type Mapping
Boolean-Boolean