{
  "x402Version": 2,
  "id": 38790,
  "slug": "38790",
  "resource": "https://api.magentlab.com/api/calc/stop_bang",
  "description": "Chung 2008 Appendix 2 STOP-Bang OSA screen. Four caller-assigned STOP flags (loud snoring heard through closed doors, daytime tiredness, observed stop-breathing, hypertension) plus computed BANG: BMI >35, age >50, neck >40 cm, male; each 1; max 8. BMI 35, age 50, and neck 40 cm do not score. Returns bands 0-2 and >=3. Not Chung 2012 three-tier, not a medical device, and not a sleep-study order.",
  "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": 40,
                "bmi_kg_m2": 30,
                "hypertension": false,
                "neck_cm": 38,
                "observed_apnea": false,
                "sex": "female",
                "snoring": false,
                "tired": false
              },
              {
                "age": 40,
                "bmi_kg_m2": 30,
                "hypertension": false,
                "neck_cm": 38,
                "observed_apnea": false,
                "sex": "female",
                "snoring": false,
                "tired": false
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "age_years": 40,
                "bmi_kg_m2": 30,
                "citation": {
                  "authors": "Chung F, Yegneswaran B, Liao P, et al.",
                  "doi": "10.1097/ALN.0b013e31816d83e4",
                  "id": "chung-2008",
                  "pmid": "18431116",
                  "source": "Anesthesiology. 2008;108(5):812-821",
                  "title": "STOP questionnaire: a tool to screen patients for obstructive sleep apnea"
                },
                "components": [
                  {
                    "factor": "snoring",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "tired",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "observed_apnea",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "hypertension",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "bmi_gt_35",
                    "points": 0,
                    "present": false,
                    "value": 30
                  },
                  {
                    "factor": "age_gt_50",
                    "points": 0,
                    "present": false,
                    "value": 40
                  },
                  {
                    "factor": "neck_gt_40",
                    "points": 0,
                    "present": false,
                    "value": 38
                  },
                  {
                    "factor": "male",
                    "points": 0,
                    "present": false
                  }
                ],
                "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.",
                "formula": "stop_bang",
                "formula_expression": "STOP-Bang = snoring + tired + observed_apnea + hypertension + (bmi_kg_m2>35) + (age>50) + (neck_cm>40) + male; each 1 if true; max 8; bands 0-2 / >=3",
                "hypertension": false,
                "max_score": 8,
                "neck_cm": 38,
                "observed_apnea": false,
                "score": 0,
                "sex": "female",
                "snoring": false,
                "stop_bang_band": "0-2",
                "tired": false
              },
              {
                "age_years": 40,
                "bmi_kg_m2": 30,
                "citation": {
                  "authors": "Chung F, Yegneswaran B, Liao P, et al.",
                  "doi": "10.1097/ALN.0b013e31816d83e4",
                  "id": "chung-2008",
                  "pmid": "18431116",
                  "source": "Anesthesiology. 2008;108(5):812-821",
                  "title": "STOP questionnaire: a tool to screen patients for obstructive sleep apnea"
                },
                "components": [
                  {
                    "factor": "snoring",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "tired",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "observed_apnea",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "hypertension",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "bmi_gt_35",
                    "points": 0,
                    "present": false,
                    "value": 30
                  },
                  {
                    "factor": "age_gt_50",
                    "points": 0,
                    "present": false,
                    "value": 40
                  },
                  {
                    "factor": "neck_gt_40",
                    "points": 0,
                    "present": false,
                    "value": 38
                  },
                  {
                    "factor": "male",
                    "points": 0,
                    "present": false
                  }
                ],
                "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.",
                "formula": "stop_bang",
                "formula_expression": "STOP-Bang = snoring + tired + observed_apnea + hypertension + (bmi_kg_m2>35) + (age>50) + (neck_cm>40) + male; each 1 if true; max 8; bands 0-2 / >=3",
                "hypertension": false,
                "max_score": 8,
                "neck_cm": 38,
                "observed_apnea": false,
                "score": 0,
                "sex": "female",
                "snoring": false,
                "stop_bang_band": "0-2",
                "tired": false
              }
            ],
            "path": "/api/calc/stop_bang"
          },
          "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": {
                          "description": "Age in years (18-120). Chung 2008 Appendix 2 BANG: scores 1 when >50. Age 50 does not score.",
                          "type": "integer"
                        },
                        "bmi_kg_m2": {
                          "description": "Body-mass index in kg/m^2 (10-80). Chung 2008 Appendix 2 BANG: scores 1 when >35. BMI 35 does not score. Caller-supplied; magent does not compute BMI from height and weight.",
                          "type": "number"
                        },
                        "hypertension": {
                          "description": "Has or is being treated for high blood pressure (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.",
                          "type": "boolean"
                        },
                        "neck_cm": {
                          "description": "Neck circumference in cm (20-80). Chung 2008 Appendix 2 BANG: scores 1 when >40. Neck 40 does not score.",
                          "type": "number"
                        },
                        "observed_apnea": {
                          "description": "Anyone observed the patient stop breathing during sleep (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.",
                          "type": "boolean"
                        },
                        "sex": {
                          "description": "female or male. Chung 2008 Appendix 2 BANG: male scores 1. Female scores 0.",
                          "enum": [
                            "female",
                            "male"
                          ],
                          "type": "string"
                        },
                        "snoring": {
                          "description": "Loud snoring heard through closed doors (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.",
                          "type": "boolean"
                        },
                        "tired": {
                          "description": "Daytime tiredness, fatigue, or sleepiness (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "snoring",
                        "tired",
                        "observed_apnea",
                        "hypertension",
                        "bmi_kg_m2",
                        "age",
                        "neck_cm",
                        "sex"
                      ],
                      "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": [
    "stop-bang",
    "osa",
    "sleep-apnea",
    "respiratory",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T15:22:11.922Z",
  "quality": {
    "calls30d": 6,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T15:22:11.809Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "age": 40,
                  "bmi_kg_m2": 30,
                  "hypertension": false,
                  "neck_cm": 38,
                  "observed_apnea": false,
                  "sex": "female",
                  "snoring": false,
                  "tired": false
                },
                {
                  "age": 40,
                  "bmi_kg_m2": 30,
                  "hypertension": false,
                  "neck_cm": 38,
                  "observed_apnea": false,
                  "sex": "female",
                  "snoring": false,
                  "tired": false
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "age_years": 40,
                  "bmi_kg_m2": 30,
                  "citation": {
                    "authors": "Chung F, Yegneswaran B, Liao P, et al.",
                    "doi": "10.1097/ALN.0b013e31816d83e4",
                    "id": "chung-2008",
                    "pmid": "18431116",
                    "source": "Anesthesiology. 2008;108(5):812-821",
                    "title": "STOP questionnaire: a tool to screen patients for obstructive sleep apnea"
                  },
                  "components": [
                    {
                      "factor": "snoring",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "tired",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "observed_apnea",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "hypertension",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "bmi_gt_35",
                      "points": 0,
                      "present": false,
                      "value": 30
                    },
                    {
                      "factor": "age_gt_50",
                      "points": 0,
                      "present": false,
                      "value": 40
                    },
                    {
                      "factor": "neck_gt_40",
                      "points": 0,
                      "present": false,
                      "value": 38
                    },
                    {
                      "factor": "male",
                      "points": 0,
                      "present": false
                    }
                  ],
                  "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.",
                  "formula": "stop_bang",
                  "formula_expression": "STOP-Bang = snoring + tired + observed_apnea + hypertension + (bmi_kg_m2>35) + (age>50) + (neck_cm>40) + male; each 1 if true; max 8; bands 0-2 / >=3",
                  "hypertension": false,
                  "max_score": 8,
                  "neck_cm": 38,
                  "observed_apnea": false,
                  "score": 0,
                  "sex": "female",
                  "snoring": false,
                  "stop_bang_band": "0-2",
                  "tired": false
                },
                {
                  "age_years": 40,
                  "bmi_kg_m2": 30,
                  "citation": {
                    "authors": "Chung F, Yegneswaran B, Liao P, et al.",
                    "doi": "10.1097/ALN.0b013e31816d83e4",
                    "id": "chung-2008",
                    "pmid": "18431116",
                    "source": "Anesthesiology. 2008;108(5):812-821",
                    "title": "STOP questionnaire: a tool to screen patients for obstructive sleep apnea"
                  },
                  "components": [
                    {
                      "factor": "snoring",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "tired",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "observed_apnea",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "hypertension",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "bmi_gt_35",
                      "points": 0,
                      "present": false,
                      "value": 30
                    },
                    {
                      "factor": "age_gt_50",
                      "points": 0,
                      "present": false,
                      "value": 40
                    },
                    {
                      "factor": "neck_gt_40",
                      "points": 0,
                      "present": false,
                      "value": 38
                    },
                    {
                      "factor": "male",
                      "points": 0,
                      "present": false
                    }
                  ],
                  "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.",
                  "formula": "stop_bang",
                  "formula_expression": "STOP-Bang = snoring + tired + observed_apnea + hypertension + (bmi_kg_m2>35) + (age>50) + (neck_cm>40) + male; each 1 if true; max 8; bands 0-2 / >=3",
                  "hypertension": false,
                  "max_score": 8,
                  "neck_cm": 38,
                  "observed_apnea": false,
                  "score": 0,
                  "sex": "female",
                  "snoring": false,
                  "stop_bang_band": "0-2",
                  "tired": false
                }
              ],
              "path": "/api/calc/stop_bang"
            },
            "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": {
                            "description": "Age in years (18-120). Chung 2008 Appendix 2 BANG: scores 1 when >50. Age 50 does not score.",
                            "type": "integer"
                          },
                          "bmi_kg_m2": {
                            "description": "Body-mass index in kg/m^2 (10-80). Chung 2008 Appendix 2 BANG: scores 1 when >35. BMI 35 does not score. Caller-supplied; magent does not compute BMI from height and weight.",
                            "type": "number"
                          },
                          "hypertension": {
                            "description": "Has or is being treated for high blood pressure (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.",
                            "type": "boolean"
                          },
                          "neck_cm": {
                            "description": "Neck circumference in cm (20-80). Chung 2008 Appendix 2 BANG: scores 1 when >40. Neck 40 does not score.",
                            "type": "number"
                          },
                          "observed_apnea": {
                            "description": "Anyone observed the patient stop breathing during sleep (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.",
                            "type": "boolean"
                          },
                          "sex": {
                            "description": "female or male. Chung 2008 Appendix 2 BANG: male scores 1. Female scores 0.",
                            "enum": [
                              "female",
                              "male"
                            ],
                            "type": "string"
                          },
                          "snoring": {
                            "description": "Loud snoring heard through closed doors (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.",
                            "type": "boolean"
                          },
                          "tired": {
                            "description": "Daytime tiredness, fatigue, or sleepiness (Chung 2008 Appendix 2 STOP). true or false. Caller-assigned. 1 point if true.",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "snoring",
                          "tired",
                          "observed_apnea",
                          "hypertension",
                          "bmi_kg_m2",
                          "age",
                          "neck_cm",
                          "sex"
                        ],
                        "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"
  }
}