Skip to content

Commit

Permalink
Merge pull request #80 from srdc/is-integer-bug-fix
Browse files Browse the repository at this point in the history
🐛 fix isInteger method to handle big integers
  • Loading branch information
tnamli authored Nov 15, 2024
2 parents c8e486f + 5545c54 commit 5cfcf20
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ case class FhirPathNumber(v:BigDecimal) extends FhirPathResult with Ordered[Fhir
case _ => false
}

def isInteger():Boolean = v - v.toInt == 0
def isInteger():Boolean = v - v.toLong == 0

def toJson:JValue = if(isInteger()) JLong(v.toLong) else JDecimal(v)
}
Expand Down

0 comments on commit 5cfcf20

Please sign in to comment.