--- type: "fhirpath-function" title: "FHIRPath Function: toBoolean" function: "toBoolean" category: "Conversion" section: "5.5.2.1" source: "fhirpath/functions.json" --- # FHIRPath Function: toBoolean _No canonical section match found in index.md._ ## Summary - **Category**: Conversion - **Section**: `5.5.2.1` - **Return Type**: `Boolean` - **Empty Input Result**: `empty` - **Errors on Multiple Input**: `true` ## Description If the input collection contains a single item, this function will return a single boolean if the item is a Boolean, an Integer/Decimal with boolean representation, or a String with boolean representation. ## Arguments - none ## Type Mapping - `Boolean-Boolean` - `Integer-Boolean` - `Decimal-Boolean` - `String-Boolean` ## Example ```fhirpath 'true'.toBoolean() // returns true ```