--- type: "fhirpath-function" title: "FHIRPath Function: isDistinct" function: "isDistinct" category: "Existence" section: "5.1.12" source: "fhirpath/functions.json" --- # FHIRPath Function: isDistinct Returns `true` if all the items in the input collection are distinct. To determine whether two items are distinct, the [equals](#equals) (`=`) operator is used, as defined below. Conceptually, this function is shorthand for a comparison of the `count()` of the input collection against the `count()` of the `distinct()` of the input collection: ``` fhirpath X.count() = X.distinct().count() ``` This means that if the input collection is empty (`{ }`), the result is `true`. ## Summary - **Category**: Existence - **Section**: `5.1.12` - **Return Type**: `Boolean` - **Empty Input Result**: `true` - **Errors on Multiple Input**: `false` ## Description Returns `true` if all the items in the input collection are distinct. To determine whether two items are distinct, the equals (`=`) operator is used. ## Arguments - none ## Type Mapping - `Any-Boolean` ## Example ```fhirpath Patient.identifier.isDistinct() // returns true if all identifiers are unique ```