type: fhirpath-functionfunction: toLongcategory: Conversionsection: 5.5.3.3source: fhirpath/functions.json
FHIRPath Function: toLong
No canonical section match found in index.md.
Summary
- Category: Conversion
- Section:
5.5.3.3 - Return Type:
Long - Empty Input Result:
empty - Errors on Multiple Input:
true
Description
If the input collection contains a single item, this function will return a single Long if the item is an Integer or Long, a String convertible to a 64 bit integer, or a Boolean.
Arguments
Type Mapping
Example
'123'.toLong() // returns 123L
true.toLong() // returns 1L