type: fhirpath-functionfunction: lastcategory: Subsettingsection: 5.3.4source: fhirpath/functions.json
FHIRPath Function: last
Returns a collection containing only the last item in the input collection. Will return an empty collection if the input collection has no items.
Summary
- Category: Subsetting
- Section:
5.3.4 - Return Type:
collection - Empty Input Result:
empty - Errors on Multiple Input:
false
Description
Returns a collection containing only the last item in the input collection.
Arguments
Type Mapping
Example
Patient.name.last() // returns the last name element