--- type: "fhirpath-function" title: "FHIRPath Function: first" function: "first" category: "Subsetting" section: "5.3.3" source: "fhirpath/functions.json" --- # FHIRPath Function: first Returns a collection containing only the first item in the input collection. This function is equivalent to `item[0]`, so it will return an empty collection if the input collection has no items. ## Summary - **Category**: Subsetting - **Section**: `5.3.3` - **Return Type**: `collection` - **Empty Input Result**: `empty` - **Errors on Multiple Input**: `false` ## Description Returns a collection containing only the first item in the input collection. This function is equivalent to `item[0]`. ## Arguments - none ## Type Mapping - `Any-Any` ## Example ```fhirpath Patient.name.first() // returns the first name element ```