diabetic-utils

diabetic-utils


diabetic-utils / calculateTIR

Function: calculateTIR()

calculateTIR(readings, target): TIRResult

Defined in: tir.ts:13

Calculates clinical Time in Range (TIR) metrics for glucose readings. Returns the percentage of readings in, below, and above the specified clinical target range.

Parameters

readings

GlucoseReading[]

Array of glucose readings to analyze

target

Object specifying the target range ({ min, max })

max

number

min

number

Returns

TIRResult

Object with in-range, below-range, and above-range percentages

See

https://care.diabetesjournals.org/content/42/8/1593