{
  "x402Version": 2,
  "id": 39077,
  "slug": "39077",
  "resource": "https://api.magentlab.com/api/calc/irae_colitis",
  "description": "Brahmer 2018 ASCO Table 2.1 irAE colitis grade from stools_over_baseline (0-40) and four caller-assigned flags. First-match: grade 4 if life_threatening; else 3 if stools >= 7 or incontinence or hospitalization_indicated or limiting_self_care; else 2 if stools >= 4; else 1. Returns icpi_action continue, hold, hold_consider_discontinue_ctla4, or permanently_discontinue. Ostomy-output bands not implemented. magent does not count stools. Not a medical device, not a diagnosis, not a steroid dose.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "AI Inference",
  "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": [
              {
                "hospitalization_indicated": false,
                "incontinence": false,
                "life_threatening": false,
                "limiting_self_care": false,
                "stools_over_baseline": 2
              },
              {
                "hospitalization_indicated": false,
                "incontinence": false,
                "life_threatening": false,
                "limiting_self_care": false,
                "stools_over_baseline": 2
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "citation": {
                  "authors": "Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA",
                  "doi": "10.1200/JCO.2017.77.6385",
                  "id": "brahmer-2018",
                  "pmid": "29442540",
                  "source": "J Clin Oncol. 2018;36(17):1714-1768",
                  "title": "Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline"
                },
                "criteria": [
                  {
                    "factor": "life_threatening",
                    "met": false
                  },
                  {
                    "factor": "stools_ge_7",
                    "met": false,
                    "value": 2
                  },
                  {
                    "factor": "incontinence",
                    "met": false
                  },
                  {
                    "factor": "hospitalization_indicated",
                    "met": false
                  },
                  {
                    "factor": "limiting_self_care",
                    "met": false
                  },
                  {
                    "factor": "stools_ge_4",
                    "met": false,
                    "value": 2
                  }
                ],
                "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": "irae_colitis",
                "formula_expression": "irae colitis first-match (Brahmer 2018 Table 2.1 CTCAE diarrhea): grade 4 if life_threatening; else grade 3 if stools_over_baseline >= 7 or incontinence or hospitalization_indicated or limiting_self_care; else grade 2 if stools_over_baseline >= 4; else grade 1. icpi_action continue (1), hold (2), hold_consider_discontinue_ctla4 (3), permanently_discontinue (4). Ostomy-output bands not implemented. magent does not count stools. Not a diagnosis. Not a steroid dose",
                "grade": 1,
                "hospitalization_indicated": false,
                "icpi_action": "continue",
                "incontinence": false,
                "life_threatening": false,
                "limiting_self_care": false,
                "stools_over_baseline": 2
              },
              {
                "citation": {
                  "authors": "Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA",
                  "doi": "10.1200/JCO.2017.77.6385",
                  "id": "brahmer-2018",
                  "pmid": "29442540",
                  "source": "J Clin Oncol. 2018;36(17):1714-1768",
                  "title": "Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline"
                },
                "criteria": [
                  {
                    "factor": "life_threatening",
                    "met": false
                  },
                  {
                    "factor": "stools_ge_7",
                    "met": false,
                    "value": 2
                  },
                  {
                    "factor": "incontinence",
                    "met": false
                  },
                  {
                    "factor": "hospitalization_indicated",
                    "met": false
                  },
                  {
                    "factor": "limiting_self_care",
                    "met": false
                  },
                  {
                    "factor": "stools_ge_4",
                    "met": false,
                    "value": 2
                  }
                ],
                "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": "irae_colitis",
                "formula_expression": "irae colitis first-match (Brahmer 2018 Table 2.1 CTCAE diarrhea): grade 4 if life_threatening; else grade 3 if stools_over_baseline >= 7 or incontinence or hospitalization_indicated or limiting_self_care; else grade 2 if stools_over_baseline >= 4; else grade 1. icpi_action continue (1), hold (2), hold_consider_discontinue_ctla4 (3), permanently_discontinue (4). Ostomy-output bands not implemented. magent does not count stools. Not a diagnosis. Not a steroid dose",
                "grade": 1,
                "hospitalization_indicated": false,
                "icpi_action": "continue",
                "incontinence": false,
                "life_threatening": false,
                "limiting_self_care": false,
                "stools_over_baseline": 2
              }
            ],
            "path": "/api/calc/irae_colitis"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "hospitalization_indicated": {
                          "description": "Hospitalization indicated as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not admit the patient.",
                          "type": "boolean"
                        },
                        "incontinence": {
                          "description": "Incontinence as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not examine the patient.",
                          "type": "boolean"
                        },
                        "life_threatening": {
                          "description": "Life-threatening consequences with urgent intervention indicated, as assigned by the caller (Brahmer 2018 Table 2.1 grade 4). true or false. When true, grade is 4 regardless of stool count. magent does not examine the patient.",
                          "type": "boolean"
                        },
                        "limiting_self_care": {
                          "description": "Limiting self-care ADL as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not assess ADL.",
                          "type": "boolean"
                        },
                        "stools_over_baseline": {
                          "description": "Increase of stools per day over baseline as assigned by the caller (integer 0-40; Brahmer 2018 Table 2.1 CTCAE diarrhea). Fewer than four is grade 1; four to six is grade 2; seven or more is grade 3 unless life_threatening is true. Ostomy-output increase is not an input. magent does not count stools.",
                          "type": "integer"
                        }
                      },
                      "required": [
                        "stools_over_baseline",
                        "incontinence",
                        "hospitalization_indicated",
                        "limiting_self_care",
                        "life_threatening"
                      ],
                      "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": [
    "irae-colitis",
    "gi",
    "immunotherapy",
    "ctcae",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T07:06:25.004Z",
  "quality": {
    "calls30d": 5,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-13T07:06:24.86Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "hospitalization_indicated": false,
                  "incontinence": false,
                  "life_threatening": false,
                  "limiting_self_care": false,
                  "stools_over_baseline": 2
                },
                {
                  "hospitalization_indicated": false,
                  "incontinence": false,
                  "life_threatening": false,
                  "limiting_self_care": false,
                  "stools_over_baseline": 2
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "citation": {
                    "authors": "Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA",
                    "doi": "10.1200/JCO.2017.77.6385",
                    "id": "brahmer-2018",
                    "pmid": "29442540",
                    "source": "J Clin Oncol. 2018;36(17):1714-1768",
                    "title": "Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline"
                  },
                  "criteria": [
                    {
                      "factor": "life_threatening",
                      "met": false
                    },
                    {
                      "factor": "stools_ge_7",
                      "met": false,
                      "value": 2
                    },
                    {
                      "factor": "incontinence",
                      "met": false
                    },
                    {
                      "factor": "hospitalization_indicated",
                      "met": false
                    },
                    {
                      "factor": "limiting_self_care",
                      "met": false
                    },
                    {
                      "factor": "stools_ge_4",
                      "met": false,
                      "value": 2
                    }
                  ],
                  "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": "irae_colitis",
                  "formula_expression": "irae colitis first-match (Brahmer 2018 Table 2.1 CTCAE diarrhea): grade 4 if life_threatening; else grade 3 if stools_over_baseline >= 7 or incontinence or hospitalization_indicated or limiting_self_care; else grade 2 if stools_over_baseline >= 4; else grade 1. icpi_action continue (1), hold (2), hold_consider_discontinue_ctla4 (3), permanently_discontinue (4). Ostomy-output bands not implemented. magent does not count stools. Not a diagnosis. Not a steroid dose",
                  "grade": 1,
                  "hospitalization_indicated": false,
                  "icpi_action": "continue",
                  "incontinence": false,
                  "life_threatening": false,
                  "limiting_self_care": false,
                  "stools_over_baseline": 2
                },
                {
                  "citation": {
                    "authors": "Brahmer JR, Lacchetti C, Schneider BJ, Atkins MB, Brassil KJ, Caterino JM, Chau I, Ernstoff MS, Gardner JM, Ginex P, Hallmeyer S, Holter Chakrabarty J, Leighl NB, Mammen JS, McDermott DF, Naing A, Nastoupil LJ, Phillips T, Porter LD, Puzanov I, Reichner CA, Santomasso BD, Seigel C, Spira A, Suarez-Almazor ME, Wang Y, Weber JS, Wolchok JD, Thompson JA",
                    "doi": "10.1200/JCO.2017.77.6385",
                    "id": "brahmer-2018",
                    "pmid": "29442540",
                    "source": "J Clin Oncol. 2018;36(17):1714-1768",
                    "title": "Management of Immune-Related Adverse Events in Patients Treated With Immune Checkpoint Inhibitor Therapy: American Society of Clinical Oncology Clinical Practice Guideline"
                  },
                  "criteria": [
                    {
                      "factor": "life_threatening",
                      "met": false
                    },
                    {
                      "factor": "stools_ge_7",
                      "met": false,
                      "value": 2
                    },
                    {
                      "factor": "incontinence",
                      "met": false
                    },
                    {
                      "factor": "hospitalization_indicated",
                      "met": false
                    },
                    {
                      "factor": "limiting_self_care",
                      "met": false
                    },
                    {
                      "factor": "stools_ge_4",
                      "met": false,
                      "value": 2
                    }
                  ],
                  "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": "irae_colitis",
                  "formula_expression": "irae colitis first-match (Brahmer 2018 Table 2.1 CTCAE diarrhea): grade 4 if life_threatening; else grade 3 if stools_over_baseline >= 7 or incontinence or hospitalization_indicated or limiting_self_care; else grade 2 if stools_over_baseline >= 4; else grade 1. icpi_action continue (1), hold (2), hold_consider_discontinue_ctla4 (3), permanently_discontinue (4). Ostomy-output bands not implemented. magent does not count stools. Not a diagnosis. Not a steroid dose",
                  "grade": 1,
                  "hospitalization_indicated": false,
                  "icpi_action": "continue",
                  "incontinence": false,
                  "life_threatening": false,
                  "limiting_self_care": false,
                  "stools_over_baseline": 2
                }
              ],
              "path": "/api/calc/irae_colitis"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "hospitalization_indicated": {
                            "description": "Hospitalization indicated as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not admit the patient.",
                            "type": "boolean"
                          },
                          "incontinence": {
                            "description": "Incontinence as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not examine the patient.",
                            "type": "boolean"
                          },
                          "life_threatening": {
                            "description": "Life-threatening consequences with urgent intervention indicated, as assigned by the caller (Brahmer 2018 Table 2.1 grade 4). true or false. When true, grade is 4 regardless of stool count. magent does not examine the patient.",
                            "type": "boolean"
                          },
                          "limiting_self_care": {
                            "description": "Limiting self-care ADL as assigned by the caller (Brahmer 2018 Table 2.1 grade 3). true or false. When true and life_threatening is false, grade is 3. magent does not assess ADL.",
                            "type": "boolean"
                          },
                          "stools_over_baseline": {
                            "description": "Increase of stools per day over baseline as assigned by the caller (integer 0-40; Brahmer 2018 Table 2.1 CTCAE diarrhea). Fewer than four is grade 1; four to six is grade 2; seven or more is grade 3 unless life_threatening is true. Ostomy-output increase is not an input. magent does not count stools.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "stools_over_baseline",
                          "incontinence",
                          "hospitalization_indicated",
                          "limiting_self_care",
                          "life_threatening"
                        ],
                        "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"
  }
}