--- type: "fhirpath-function" title: "FHIRPath Function: all" function: "all" category: "Existence" section: "5.1.3" source: "fhirpath/functions.json" --- # FHIRPath Function: all > This is a [scoped function](#scoped-functions): The `criteria` argument is evaluated for each item (setting `$this` and `$index` before each iteration); if all return `true` then the function returns `true`, otherwise `false`. An empty input collection returns `true`. Returns `true` if for every item in the input collection, `criteria` evaluates to `true`. Otherwise, the result is `false`. If the input collection is empty (`{ }`), the result is `true`. ``` fhirpath generalPractitioner.all($this.resolve() is Practitioner) ``` This example returns `true` if all of the `generalPractitioner` elements are of type `Practitioner`. ## Summary - **Category**: Existence - **Section**: `5.1.3` - **Return Type**: `Boolean` - **Empty Input Result**: `true` - **Errors on Multiple Input**: `false` ## Description Returns `true` if for every element in the input collection, `criteria` evaluates to `true`. Otherwise, the result is `false`. ## Arguments - `criteria`: `expression` - Expression to evaluate against each element ## Type Mapping - `Any-Boolean` ## Example ```fhirpath generalPractitioner.all($this.resolve() is Practitioner) ```