# IDF-DAR Fasting Risk Score (Hassanein 2021)

> IDF-DAR Fasting Risk Score (Hassanein 2021) 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-14).

Computes the IDF-DAR 2021 fasting risk score for diabetic patients considering Ramadan fasting, returning a numeric total and low/moderate/high risk tier.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/idf_dar
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/idf-dar-fasting-risk-score-hassanein-2021-c5b949c1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8NU2Qe2KGIJvom9A-J5Oo

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 idf-dar-fasting-risk-score-hassanein-2021-c5b949c1
```

Example prompt: Calculate the IDF-DAR 2021 Ramadan fasting risk score for a 58-year-old type 2 diabetic patient who has had diabetes for 12 years, is on basal-bolus insulin, has moderate hypoglycemia history (score 3.5), HbA1c in the fair band (1 point), does SMBG suboptimally, no acute complications, stable macrovascular disease, eGFR above 60, not pregnant, not frail, has home support, does non-physical labour, no prior negative Ramadan experience, and plans to fast under 16 hours.

## When to prefer this

Use this endpoint when you need a structured, rule-based computation of the IDF-DAR 2021 Hassanein fasting risk score for a diabetic patient and have already pre-classified all categorical inputs (eGFR band, treatment regimen, SMBG frequency, etc.). It is not a substitute for clinical judgement, does not compute eGFR or assay lab values, and does not issue fasting or insulin recommendations. Prefer this over manual table lookup when integrating risk stratification into an automated clinical or health workflow.

## Known failure modes

- Missing required query parameters return a 400 error
- Invalid enum values for categorical fields (e.g. unknown renal band) return a validation error
- Age outside 18–120 range may return an error or unexpected result
- No score is returned if required fields are absent
- Network or payment (x402) errors may prevent response delivery

## How this service works

Hassanein 2021 IDF-DAR fasting risk table: type 1 scores 1; duration ≥10 scores 1; hypoglycemia 0/1/3.5/5.5/6.5; HbA1c band 0/1/2; treatment 0/0.5/1/1.5/2/2.5/3; SMBG 0/1/2; DKA/HONC 0/1/2/3; MVD 0/2/6.5; eGFR band 0/2/4/6.5; pregnancy 0/3.5/6.5; frailty 0/3.5/6.5; labour 0/2/4; prior negative Ramadan 1; fasting ≥16 h 1. Low 0–3, moderate 3.5–6, high >6. Caller-assigned; not a fasting order or insulin dose.

## Output

Returns the numeric IDF-DAR total score and the corresponding risk tier (low: 0–3, moderate: 3.5–6, high: >6) based on the Hassanein 2021 scoring table. Component subscores for each domain (hypoglycemia, glycaemic control, treatment, SMBG, acute complications, macrovascular disease, renal, pregnancy, frailty, labour, prior Ramadan, fasting duration) may also be included. The endpoint does not issue clinical recommendations or fasting orders.

## 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",
      "type_1_diabetes",
      "duration_ge_10",
      "hypoglycemia",
      "glycaemic_control",
      "treatment",
      "smbg",
      "acute_complication",
      "mvd",
      "renal",
      "pregnancy",
      "impaired_cognition_or_frail",
      "home_support",
      "physical_labor",
      "previous_ramadan_negative",
      "fasting_hours_ge_16"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (integer 18-120). Hassanein 2021 frailty band: age >70 with no home support scores 3.5 unless impaired_cognition_or_frail is true (6.5). Age 70 does not enter that band. magent does not read a chart."
      },
      "mvd": {
       "enum": [
        "none",
        "stable",
        "unstable"
       ],
       "type": "string",
       "description": "Caller-assigned macrovascular disease (Hassanein 2021). none 0; stable 2; unstable 6.5."
      },
      "smbg": {
       "enum": [
        "as_indicated",
        "suboptimal",
        "not_conducted"
       ],
       "type": "string",
       "description": "Caller-assigned self-monitoring of blood glucose (Hassanein 2021). as_indicated 0; suboptimal 1; not_conducted 2. magent does not assay glucose."
      },
      "renal": {
       "enum": [
        "egfr_gt_60",
        "egfr_45_to_60",
        "egfr_30_to_45",
        "egfr_lt_30"
       ],
       "type": "string",
       "description": "Caller-assigned eGFR band in mL/min (Hassanein 2021). egfr_gt_60 (>60) 0; egfr_45_to_60 (45–60) 2; egfr_30_to_45 (30–45) 4; egfr_lt_30 (<30) 6.5. magent does not compute eGFR."
      },
      "pregnancy": {
       "enum": [
        "not_pregnant",
        "within_targets",
        "not_within_targets"
       ],
       "type": "string",
       "description": "Caller-assigned pregnancy band (Hassanein 2021). not_pregnant 0; within_targets 3.5; not_within_targets 6.5. magent does not advise fasting."

… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/idf-dar-fasting-risk-score-hassanein-2021-c5b949c1/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)
