type: fhirpath-functionfunction: isDistinctcategory: Existencesection: 5.1.12source: 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 (=) 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:
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
Type Mapping
Example
Patient.identifier.isDistinct() // returns true if all identifiers are unique