diabetic-utils

diabetic-utils


diabetic-utils / calculateTimeInRange

Function: calculateTimeInRange()

calculateTimeInRange(readings, lower, upper): number

Defined in: tir.ts:77

Calculates the percentage of glucose readings within a specified numeric range. Used for clinical TIR analytics and custom range assessments.

Parameters

readings

number[]

Array of glucose values (numbers) to analyze

lower

number

Lower bound of the target range (inclusive)

upper

number

Upper bound of the target range (inclusive)

Returns

number

Percentage of readings within the specified range (0-100)