POST /statistics

This page documents an old version of the endpoint. The newest version, v2, is documented here.

 

Description

The /statistics endpoint enables retrieval of a user's summary statistics, including averages, quartiles, and measures of variance. Additionally, time in range based on customizable glycemic ranges and the hypoglycemia risk metric available to users through Dexcom CLARITY® are provided.

 

Resource

POST /v1/users/self/statistics

 

Authorization

OAuth 2.0 bearer token; see the Authentication section for details on this workflow.

 

Query Parameters

These query parameters specify the time window for the requested data; both are required. See the discussion of time in the Endpoint Overview section for more details on how they relate to device information.

Name

Type

Description

startDate

DateTime

Beginning of the time window

endDate

DateTime

End of the time window

Request Body Example

In order to calculate the statistics based on target ranges, one or more named time ranges and associated target EGV ranges are required. These are passed in the request body in JSON format. The time ranges must cover the entire 24-hour period and not overlap. If the request body is not included or violates these rules, a 400 (Bad Request) error will be returned.

{
  "targetRanges": [
    {
      "name": "day",
      "startTime": "06:00:00",
      "endTime": "22:00:00",
      "egvRange": {
        "min": 70,
        "max": 180
      }
    },
    {
      "name": "night",
      "startTime": "22:00:00",
      "endTime": "06:00:00",
      "egvRange": {
        "min": 80,
        "max": 150
      }
    }
  ]
}

 

Request Body Fields

Name

Type

Description

name

String

Reference name for the time window

startTime

Time

Beginning of the time window

endTime Time End of the time window
egvRange Array Array containing the minimum and maximum EGV defining the target range

The egvRange array fields are as follows

Name

Type

Description

min

Float

Minimum value for the EGV range (inclusive)

max

Float

Maximum value for the EGV range (inclusive)

 

Request Example

 

Response Example

{
  "hypoglycemiaRisk": "minimal",
  "min": 39,
  "max": 287,
  "mean": 131.20452051788453,
  "median": 121,
  "variance": 1836.660387728187,
  "stdDev": 42.85627594329898,
  "sum": 597899,
  "q1": 100,
  "q2": 121,
  "q3": 155,
  "utilizationPercent": 98.89322916666666,
  "meanDailyCalibrations": 2,
  "nDays": 16,
  "nValues": 4557,
  "nBelowRange": 185,
  "nWithinRange": 3605,
  "nAboveRange": 767,
  "percentBelowRange": 4.0596883914856265,
  "percentWithinRange": 79.10906298003071,
  "percentAboveRange": 16.831248628483653
}

 

Response Fields

Name

Type

Description

hypoglycemiaRisk

String

Risk for the patient to have future hypoglycemic events; see additional notes below

(nullable)

min Float Minimum of all EGV data for given date range
max Float Maximum of all EGV data for given date range
mean Float Mean of all EGV data for given date range
median Float Median of all EGV data for given date range
variance Float Statistical variance of glucose level for given date range
stdDev Float Standard deviation of all EGV data for given date range
sum Float Sum of all EGV data for given date range
q1 Float First quartile of all EGV data for given date range
q2 Float Second quartile of all EGV data for given date range
q3 Float Third quartile of all EGV data for given date range
utilizationPercent Float Percent CGM sensor was utilized for given date range
meanDailyCalibrations Float Mean number of calibrations per day for given date range
nDays Integer Number of calendar days contributing data to the statistics calculations; only days containing EGV data are included in this count
nValues Integer Total number of EGV observations for given date range
nBelowRange Integer Number of EGV observations below min value specified in egvRange array
nWithinRange Integer Number of EGV observations between min and max values specified in egvRange array (inclusive)
nAboveRange Integer Number of EGV observations above max value specified in egvRange array
percentBelowRange Float Percentage of EGV observations below min value specified in egvRange array
percentWithinRange Float Percentage of EGV observations between min and max values specified in egvRange array (inclusive)
percentAboveRange Float Percentage of EGV observations above max value specified in egvRange array

Additional notes for hypoglycemiaRisk:

This calculation estimates the risk for severe hypoglycemia. It is based on a combination of the number of times glucose was low, the magnitude of the low glucose and for how long there was low glucose.

Experiencing frequent lower measured glucose values for short durations has more impact than minimal hypoglycemia for longer periods but with less frequency. Having more frequent lows for longer durations and at lower glucose levels carries a high risk for severe hypoglycemia. The hypoglycemia risk complements the patient’s A1C measurements. Patients can have low or high A1C and still be at low, medium or high hypoglycemia risk. The impact of hypoglycemic risk on patients and diabetes management should be reviewed by a healthcare professional.

The hypoglycemia risk estimation is calculated from a minimum amount of days with a minimum duration of CGM wear time as follows:

  • When number of days in date range is less than 20 days, at least 12 days in date range with utilizationPercent greater than or equal to 66%.
  • When number of days in date range is greater than or equal to 20 days, at least 60% of total days in date range with utilizationPercent greater than or equal to 66%.

Clinical References:

Kovatchev, B, et al. Algorithmic Evaluation of Metabolic Control and Risk of Severe Hypoglycemia in Type 1 and Type 2 Diabetes Using Self-Monitoring Blood Glucose Data. Diabetes Technology and Therapeutics, 5(5): 817-828, 2003. PubMed Link

Clarke W, Kovatchev B. Statistical Tools to Analyze Continuous Glucose Monitor Data. Diabetes Technology & Therapeutics. 2009; 11(Suppl 1): S-45-S-54. doi:10.1089/dia.2008.0138. PubMed Link

Hypoglycemia Risk corresponds to the risk categories from these studies:

  • "minimal" corresponds to Minimal Risk in the studies
  • "low" corresponds to Low Risk in the studies
  • "moderate" corresponds to Moderate Risk in the studies
  • "high" corresponds to High Risk in the studies