{
  "x402Version": 2,
  "id": 39155,
  "slug": "39155",
  "resource": "https://api.magentlab.com/api/calc/hypoglycemia_risk_score",
  "description": "Karter 2017 Figure 2 T2D 12-month hypoglycemia-related ED/hospital-use risk from prior_hypo_ed_hospital_count (0-20), ed_visits_12mo (0-50), insulin, sulfonylurea, severe_or_esrd (dialysis or CKD 4-5, eGFR <=29), and age_lt_77. First-match 6 options: >=3 prior or 1-2 plus insulin = high (>5%); remaining rows intermediate (1-5%) or low (<1%). Not a points sum. magent does not assay glucose. Not a diagnosis. Not an insulin dose.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "items": [
              {
                "age_lt_77": true,
                "ed_visits_12mo": 0,
                "insulin": false,
                "prior_hypo_ed_hospital_count": 3,
                "severe_or_esrd": false,
                "sulfonylurea": false
              },
              {
                "age_lt_77": true,
                "ed_visits_12mo": 0,
                "insulin": false,
                "prior_hypo_ed_hospital_count": 3,
                "severe_or_esrd": false,
                "sulfonylurea": false
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "age_lt_77": true,
                "citation": {
                  "authors": "Karter AJ, Warton EM, Lipska KJ, Ralston JD, Moffet HH, Jackson GG, Huang ES, Miller DR",
                  "doi": "10.1001/jamainternmed.2017.3844",
                  "id": "karter-2017",
                  "pmid": "28828479",
                  "source": "JAMA Intern Med. 2017;177(10):1461-1470",
                  "title": "Development and Validation of a Tool to Identify Patients With Type 2 Diabetes at High Risk of Hypoglycemia-Related Emergency Department or Hospital Use"
                },
                "criteria": [
                  {
                    "factor": "prior_hypo_ge_3",
                    "met": true,
                    "value": 3
                  },
                  {
                    "factor": "prior_hypo_1_or_2",
                    "met": false,
                    "value": 3
                  },
                  {
                    "factor": "insulin",
                    "met": false
                  },
                  {
                    "factor": "sulfonylurea",
                    "met": false
                  },
                  {
                    "factor": "ed_visits_ge_2",
                    "met": false,
                    "value": 0
                  },
                  {
                    "factor": "severe_or_esrd",
                    "met": false
                  },
                  {
                    "factor": "age_lt_77",
                    "met": true
                  }
                ],
                "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
                "ed_visits_12mo": 0,
                "ed_visits_band": "lt_2",
                "figure2_option": 1,
                "formula": "hypoglycemia_risk_score",
                "formula_expression": "hypoglycemia_risk_score first-match Karter 2017 Figure 2 (6 mutually exclusive options; eTable 2 source): (1) prior_hypo_ed_hospital_count >= 3 -> high; (2) prior 1-2 and insulin -> high; (3) prior 1-2 and not insulin -> intermediate; (4) prior 0 and insulin and (ed_visits_12mo >= 2 or severe_or_esrd or not age_lt_77) -> intermediate; (5) prior 0 and not insulin and sulfonylurea and (ed_visits_12mo >= 2 or severe_or_esrd) -> intermediate; (6) else -> low. high >5%, intermediate 1-5%, low <1% 12-month hypoglycemia-related ED/hospital use. T2D only. Not a points sum. magent does not assay glucose. Not a diagnosis. Not an insulin dose",
                "insulin": false,
                "prior_hypo_band": "ge_3",
                "prior_hypo_ed_hospital_count": 3,
                "rate_band": ">5%",
                "risk": "high",
                "severe_or_esrd": false,
                "sulfonylurea": false
              },
              {
                "age_lt_77": true,
                "citation": {
                  "authors": "Karter AJ, Warton EM, Lipska KJ, Ralston JD, Moffet HH, Jackson GG, Huang ES, Miller DR",
                  "doi": "10.1001/jamainternmed.2017.3844",
                  "id": "karter-2017",
                  "pmid": "28828479",
                  "source": "JAMA Intern Med. 2017;177(10):1461-1470",
                  "title": "Development and Validation of a Tool to Identify Patients With Type 2 Diabetes at High Risk of Hypoglycemia-Related Emergency Department or Hospital Use"
                },
                "criteria": [
                  {
                    "factor": "prior_hypo_ge_3",
                    "met": true,
                    "value": 3
                  },
                  {
                    "factor": "prior_hypo_1_or_2",
                    "met": false,
                    "value": 3
                  },
                  {
                    "factor": "insulin",
                    "met": false
                  },
                  {
                    "factor": "sulfonylurea",
                    "met": false
                  },
                  {
                    "factor": "ed_visits_ge_2",
                    "met": false,
                    "value": 0
                  },
                  {
                    "factor": "severe_or_esrd",
                    "met": false
                  },
                  {
                    "factor": "age_lt_77",
                    "met": true
                  }
                ],
                "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
                "ed_visits_12mo": 0,
                "ed_visits_band": "lt_2",
                "figure2_option": 1,
                "formula": "hypoglycemia_risk_score",
                "formula_expression": "hypoglycemia_risk_score first-match Karter 2017 Figure 2 (6 mutually exclusive options; eTable 2 source): (1) prior_hypo_ed_hospital_count >= 3 -> high; (2) prior 1-2 and insulin -> high; (3) prior 1-2 and not insulin -> intermediate; (4) prior 0 and insulin and (ed_visits_12mo >= 2 or severe_or_esrd or not age_lt_77) -> intermediate; (5) prior 0 and not insulin and sulfonylurea and (ed_visits_12mo >= 2 or severe_or_esrd) -> intermediate; (6) else -> low. high >5%, intermediate 1-5%, low <1% 12-month hypoglycemia-related ED/hospital use. T2D only. Not a points sum. magent does not assay glucose. Not a diagnosis. Not an insulin dose",
                "insulin": false,
                "prior_hypo_band": "ge_3",
                "prior_hypo_ed_hospital_count": 3,
                "rate_band": ">5%",
                "risk": "high",
                "severe_or_esrd": false,
                "sulfonylurea": false
              }
            ],
            "path": "/api/calc/hypoglycemia_risk_score"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "age_lt_77": {
                          "description": "Age younger than 77 years as assigned by the caller (Karter 2017 Figure 2). true or false. When prior episodes are 0 and insulin is true, age not <77 (with ED visits <2 and severe_or_esrd false) is intermediate. magent does not compute age.",
                          "type": "boolean"
                        },
                        "ed_visits_12mo": {
                          "description": "ED encounters for any reason in the prior 12 months (integer 0-50). Karter 2017 Figure 2 bands: <2 vs >=2. magent does not count visits.",
                          "type": "integer"
                        },
                        "insulin": {
                          "description": "Current insulin use as assigned by the caller (Karter 2017 Figure 2). true or false. With 1-2 prior hypoglycemia-related ED or hospital episodes, insulin is high; with 0 prior episodes, insulin plus ED visits >=2, severe_or_esrd, or age not <77 is intermediate. Not an insulin dose.",
                          "type": "boolean"
                        },
                        "prior_hypo_ed_hospital_count": {
                          "description": "Count of prior hypoglycemia-related ED visits or hospitalizations (integer 0-20). Karter 2017 Figure 2 bands: 0, 1-2, or >=3. >=3 is high regardless of other inputs. magent does not read claims.",
                          "type": "integer"
                        },
                        "severe_or_esrd": {
                          "description": "Severe or end-stage kidney disease as assigned by the caller (Karter 2017: dialysis or CKD stage 4-5, eGFR <=29 mL/min/1.73 m2). true or false. magent does not compute eGFR.",
                          "type": "boolean"
                        },
                        "sulfonylurea": {
                          "description": "Current sulfonylurea use as assigned by the caller (Karter 2017 Figure 2). true or false. With 0 prior episodes and no insulin, sulfonylurea plus ED visits >=2 or severe_or_esrd is intermediate. magent does not dispense medication.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "prior_hypo_ed_hospital_count",
                        "ed_visits_12mo",
                        "insulin",
                        "sulfonylurea",
                        "severe_or_esrd",
                        "age_lt_77"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "hypoglycemia",
    "karter",
    "diabetes",
    "t2d",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T04:37:21.502Z",
  "quality": {
    "calls30d": 5,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-13T04:37:21.357Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "age_lt_77": true,
                  "ed_visits_12mo": 0,
                  "insulin": false,
                  "prior_hypo_ed_hospital_count": 3,
                  "severe_or_esrd": false,
                  "sulfonylurea": false
                },
                {
                  "age_lt_77": true,
                  "ed_visits_12mo": 0,
                  "insulin": false,
                  "prior_hypo_ed_hospital_count": 3,
                  "severe_or_esrd": false,
                  "sulfonylurea": false
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "age_lt_77": true,
                  "citation": {
                    "authors": "Karter AJ, Warton EM, Lipska KJ, Ralston JD, Moffet HH, Jackson GG, Huang ES, Miller DR",
                    "doi": "10.1001/jamainternmed.2017.3844",
                    "id": "karter-2017",
                    "pmid": "28828479",
                    "source": "JAMA Intern Med. 2017;177(10):1461-1470",
                    "title": "Development and Validation of a Tool to Identify Patients With Type 2 Diabetes at High Risk of Hypoglycemia-Related Emergency Department or Hospital Use"
                  },
                  "criteria": [
                    {
                      "factor": "prior_hypo_ge_3",
                      "met": true,
                      "value": 3
                    },
                    {
                      "factor": "prior_hypo_1_or_2",
                      "met": false,
                      "value": 3
                    },
                    {
                      "factor": "insulin",
                      "met": false
                    },
                    {
                      "factor": "sulfonylurea",
                      "met": false
                    },
                    {
                      "factor": "ed_visits_ge_2",
                      "met": false,
                      "value": 0
                    },
                    {
                      "factor": "severe_or_esrd",
                      "met": false
                    },
                    {
                      "factor": "age_lt_77",
                      "met": true
                    }
                  ],
                  "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
                  "ed_visits_12mo": 0,
                  "ed_visits_band": "lt_2",
                  "figure2_option": 1,
                  "formula": "hypoglycemia_risk_score",
                  "formula_expression": "hypoglycemia_risk_score first-match Karter 2017 Figure 2 (6 mutually exclusive options; eTable 2 source): (1) prior_hypo_ed_hospital_count >= 3 -> high; (2) prior 1-2 and insulin -> high; (3) prior 1-2 and not insulin -> intermediate; (4) prior 0 and insulin and (ed_visits_12mo >= 2 or severe_or_esrd or not age_lt_77) -> intermediate; (5) prior 0 and not insulin and sulfonylurea and (ed_visits_12mo >= 2 or severe_or_esrd) -> intermediate; (6) else -> low. high >5%, intermediate 1-5%, low <1% 12-month hypoglycemia-related ED/hospital use. T2D only. Not a points sum. magent does not assay glucose. Not a diagnosis. Not an insulin dose",
                  "insulin": false,
                  "prior_hypo_band": "ge_3",
                  "prior_hypo_ed_hospital_count": 3,
                  "rate_band": ">5%",
                  "risk": "high",
                  "severe_or_esrd": false,
                  "sulfonylurea": false
                },
                {
                  "age_lt_77": true,
                  "citation": {
                    "authors": "Karter AJ, Warton EM, Lipska KJ, Ralston JD, Moffet HH, Jackson GG, Huang ES, Miller DR",
                    "doi": "10.1001/jamainternmed.2017.3844",
                    "id": "karter-2017",
                    "pmid": "28828479",
                    "source": "JAMA Intern Med. 2017;177(10):1461-1470",
                    "title": "Development and Validation of a Tool to Identify Patients With Type 2 Diabetes at High Risk of Hypoglycemia-Related Emergency Department or Hospital Use"
                  },
                  "criteria": [
                    {
                      "factor": "prior_hypo_ge_3",
                      "met": true,
                      "value": 3
                    },
                    {
                      "factor": "prior_hypo_1_or_2",
                      "met": false,
                      "value": 3
                    },
                    {
                      "factor": "insulin",
                      "met": false
                    },
                    {
                      "factor": "sulfonylurea",
                      "met": false
                    },
                    {
                      "factor": "ed_visits_ge_2",
                      "met": false,
                      "value": 0
                    },
                    {
                      "factor": "severe_or_esrd",
                      "met": false
                    },
                    {
                      "factor": "age_lt_77",
                      "met": true
                    }
                  ],
                  "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
                  "ed_visits_12mo": 0,
                  "ed_visits_band": "lt_2",
                  "figure2_option": 1,
                  "formula": "hypoglycemia_risk_score",
                  "formula_expression": "hypoglycemia_risk_score first-match Karter 2017 Figure 2 (6 mutually exclusive options; eTable 2 source): (1) prior_hypo_ed_hospital_count >= 3 -> high; (2) prior 1-2 and insulin -> high; (3) prior 1-2 and not insulin -> intermediate; (4) prior 0 and insulin and (ed_visits_12mo >= 2 or severe_or_esrd or not age_lt_77) -> intermediate; (5) prior 0 and not insulin and sulfonylurea and (ed_visits_12mo >= 2 or severe_or_esrd) -> intermediate; (6) else -> low. high >5%, intermediate 1-5%, low <1% 12-month hypoglycemia-related ED/hospital use. T2D only. Not a points sum. magent does not assay glucose. Not a diagnosis. Not an insulin dose",
                  "insulin": false,
                  "prior_hypo_band": "ge_3",
                  "prior_hypo_ed_hospital_count": 3,
                  "rate_band": ">5%",
                  "risk": "high",
                  "severe_or_esrd": false,
                  "sulfonylurea": false
                }
              ],
              "path": "/api/calc/hypoglycemia_risk_score"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "age_lt_77": {
                            "description": "Age younger than 77 years as assigned by the caller (Karter 2017 Figure 2). true or false. When prior episodes are 0 and insulin is true, age not <77 (with ED visits <2 and severe_or_esrd false) is intermediate. magent does not compute age.",
                            "type": "boolean"
                          },
                          "ed_visits_12mo": {
                            "description": "ED encounters for any reason in the prior 12 months (integer 0-50). Karter 2017 Figure 2 bands: <2 vs >=2. magent does not count visits.",
                            "type": "integer"
                          },
                          "insulin": {
                            "description": "Current insulin use as assigned by the caller (Karter 2017 Figure 2). true or false. With 1-2 prior hypoglycemia-related ED or hospital episodes, insulin is high; with 0 prior episodes, insulin plus ED visits >=2, severe_or_esrd, or age not <77 is intermediate. Not an insulin dose.",
                            "type": "boolean"
                          },
                          "prior_hypo_ed_hospital_count": {
                            "description": "Count of prior hypoglycemia-related ED visits or hospitalizations (integer 0-20). Karter 2017 Figure 2 bands: 0, 1-2, or >=3. >=3 is high regardless of other inputs. magent does not read claims.",
                            "type": "integer"
                          },
                          "severe_or_esrd": {
                            "description": "Severe or end-stage kidney disease as assigned by the caller (Karter 2017: dialysis or CKD stage 4-5, eGFR <=29 mL/min/1.73 m2). true or false. magent does not compute eGFR.",
                            "type": "boolean"
                          },
                          "sulfonylurea": {
                            "description": "Current sulfonylurea use as assigned by the caller (Karter 2017 Figure 2). true or false. With 0 prior episodes and no insulin, sulfonylurea plus ED visits >=2 or severe_or_esrd is intermediate. magent does not dispense medication.",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "prior_hypo_ed_hospital_count",
                          "ed_visits_12mo",
                          "insulin",
                          "sulfonylurea",
                          "severe_or_esrd",
                          "age_lt_77"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}