View raw Markdown
type: fhirpath-functionfunction: takecategory: Subsettingsection: 5.3.7source: fhirpath/functions.json

FHIRPath Function: take

Returns a collection containing the first num items in the input collection, or less if there are less than num items. If num is less than or equal to 0, or if the input collection is empty ({ }), take returns an empty collection.

Summary

Description

Returns a collection containing the first num items in the input collection, or less if there are less than num items. If num is less than or equal to 0, take returns an empty collection.

Arguments

Type Mapping

Example

Patient.name.take(2) // takes the first 2 name elements