View raw Markdown
type: fhirpath-functionfunction: ceilingcategory: Mathsection: 5.8.2source: fhirpath/functions.json

FHIRPath Function: ceiling

{:.stu}

Returns the first integer greater than or equal to the input. {:.stu}

Accepts input types of Decimal or Quantity. {:.stu}

When used with a Decimal input type, the result is an Integer.<br/> When used with a Quantity, the result is a Quantity with the same units and the value (Decimal) set to the integer result calculated. {:.stu}

If the input collection is empty, the result is empty. {:.stu}

If the input collection contains multiple items, the evaluation of the expression will end and signal an error to the calling environment. {:.stu}

1.ceiling() // 1
1.1.ceiling() // 2
(-1.1).ceiling() // -1

{:.stu}

Note: We may consider a CeilingLong() function to handle Long output types. {: .stu-note }

Summary

Description

Returns the first integer greater than or equal to the input.

Arguments

Type Mapping

Example

1.ceiling() // 1
1.1.ceiling() // 2
(-1.1).ceiling() // -1