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