View raw Markdown
type: fhirpath-functionfunction: firstcategory: Subsettingsection: 5.3.3source: 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

Description

Returns a collection containing only the first item in the input collection. This function is equivalent to item[0].

Arguments

Type Mapping

Example

Patient.name.first() // returns the first name element