--- type: "fhirpath-function" title: "FHIRPath Function: distinct" function: "distinct" category: "Existence" section: "5.1.11" source: "fhirpath/functions.json" --- # FHIRPath Function: distinct Returns a collection containing only the unique items in the input collection. To determine whether two items are the same, the [equals](#equals) (`=`) operator is used, as defined below. If the input collection is empty (`{ }`), the result is empty. Note that the order of items in the input collection is not guaranteed to be preserved in the result. The following example returns the distinct list of tags on the given Patient: ``` fhirpath Patient.meta.tag.distinct() ``` ## Summary - **Category**: Existence - **Section**: `5.1.11` - **Return Type**: `collection` - **Empty Input Result**: `empty` - **Errors on Multiple Input**: `false` ## Description Returns a collection containing only the unique items in the input collection. To determine whether two items are the same, the equals (`=`) operator is used. ## Arguments - none ## Type Mapping - `Any-Any` ## Example ```fhirpath Patient.meta.tag.distinct() ```