# ADA Diabetes Risk Score (Bang 2009 Table 2)

> ADA Diabetes Risk Score (Bang 2009 Table 2) is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Computes the Bang 2009 Table 2 undiagnosed diabetes screening score from age, sex, BMI, family history, hypertension, and physical activity, returning the total score and a high-risk flag (score ≥ 5).

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/ada_diabetes
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ada-diabetes-risk-score-bang-2009-table-2-a2bb60d8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Sb1gKxvizfw8q2-1c3qX4

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ada-diabetes-risk-score-bang-2009-table-2-a2bb60d8
```

Example prompt: Can you run the Bang 2009 ADA diabetes screening score for a 54-year-old male with a BMI of 31.2, a family history of diabetes, hypertension, and who is not physically active?

## When to prefer this

Choose this endpoint when you need a validated, well-documented implementation of the Bang 2009 Table 2 diabetes screening score specifically using BMI (not waist circumference) as the obesity criterion. It is the right choice for clinical decision-support tools, pre-visit risk triage, or population-level screening pipelines that need a reproducible score with a clear high-risk threshold. Prefer alternatives if you need waist-based obesity criteria (ARIC/CHS appendix methodology), an HbA1c-based risk tool, or actual diabetes diagnosis logic.

## Known failure modes

- Missing required query parameters (age, sex, bmi_kg_m2, family_history_diabetes, hypertension, physically_active) returns a 400 validation error
- Age outside valid range 20–120 or BMI outside 10–80 rejected with validation error
- Invalid enum value for sex (not 'male' or 'female') returns error
- Payment not included or insufficient USDC balance returns 402 Payment Required
- Network timeout or server error returns 5xx; retry with same parameters is safe since endpoint is idempotent

## How this service works

Bang 2009 Table 2 development screening score for undiagnosed diabetes. Age (<40 → 0, 40–49 → 1, 50–59 → 2, ≥60 → 3); male 1; family history of diabetes 1; hypertension 1; BMI (≥40 extremely obese 3; 30–<40 obese 2; 25–<30 overweight 1; else 0); physically active −1. Returns score and high_risk (true iff score ≥ 5). BMI-only, no waist. Not Appendix ARIC/CHS, not a diagnosis.

## Output

Returns a numeric total screening score (which can range from −1 to 10) calculated by summing age-band points (0–3), sex points (male = 1), family history points (1 if true), hypertension points (1 if true), BMI-band points (0–3), and physical activity deduction (−1 if active). Also returns a boolean field high_risk that is true when the total score is 5 or higher, indicating elevated risk for undiagnosed diabetes per Bang 2009 Table 2.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "age",
      "sex",
      "bmi_kg_m2",
      "family_history_diabetes",
      "hypertension",
      "physically_active"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (20-120). Bang 2009 Table 2: <40 scores 0; 40-49 scores 1; 50-59 scores 2; ≥60 scores 3. Age 40 and 49 score 1; 50 and 59 score 2; 60 scores 3."
      },
      "sex": {
       "enum": [
        "female",
        "male"
       ],
       "type": "string",
       "description": "female or male. Bang 2009 Table 2: female scores 0; male scores 1."
      },
      "bmi_kg_m2": {
       "type": "number",
       "description": "Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Bang 2009 Table 2 obesity from BMI only (no waist): ≥40 extremely obese scores 3; 30 ≤ BMI < 40 obese scores 2; 25 ≤ BMI < 30 overweight scores 1; else 0. 25.0 scores 1; 30.0 scores 2; 40.0 scores 3."
      },
      "hypertension": {
       "type": "boolean",
       "description": "History of hypertension (Bang 2009 Table 2). true scores 1; false scores 0. magent does not read a medication list or measure blood pressure."
      },
      "physically_active": {
       "type": "boolean",
       "description": "Physically active (Bang 2009 Table 2). true scores −1; false scores 0. The total may be −1."
      },
      "family_history_diabetes": {
       "type": "boolean",
       "description": "Family history of diabetes (Bang 2009 Table 2). true scores 1; false scores 0."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ada-diabetes-risk-score-bang-2009-table-2-a2bb60d8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
