{
  "x402Version": 2,
  "id": 38785,
  "slug": "38785",
  "resource": "https://api.magentlab.com/api/calc/tdn_grade",
  "description": "Terrapon 2021 Therapy-Disability-Neurology (TDN) grade. Caller assigns therapy t1-t5, modified Rankin 0-6 (6 is death), and new neurologic deficit. Overall grade is max(T, D, N); t5 or mRS 6 is always 5. D maps mRS 0-1→1, 2-3→2, 4→3, 5→4, 6→5; new deficit is N=2 else N=1. Not a diagnosis and not Clavien-Dindo alone. magent does not grade the event.",
  "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": [
              {
                "disability_mrs": 0,
                "new_neurologic_deficit": false,
                "therapy": "t1"
              },
              {
                "disability_mrs": 0,
                "new_neurologic_deficit": false,
                "therapy": "t1"
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "citation": {
                  "authors": "Terrapon APR, Zattra CM, Voglis S, et al.",
                  "doi": "10.1093/neuros/nyab121",
                  "id": "terrapon-2021",
                  "pmid": "33887774",
                  "source": "Neurosurgery. 2021;89(2):236-245",
                  "title": "Adverse Events in Neurosurgery: The Novel Therapy-Disability-Neurology Grade"
                },
                "criteria": [
                  {
                    "factor": "therapy",
                    "met": true,
                    "value": 1
                  },
                  {
                    "factor": "disability",
                    "met": true,
                    "value": 1
                  },
                  {
                    "factor": "neurology",
                    "met": true,
                    "value": 1
                  }
                ],
                "disability_grade": 1,
                "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": "tdn_grade",
                "formula_expression": "tdn_grade = max(T, D, N); T is therapy t1-t5 (t1 no treatment beyond antiemetics, antipyretics, analgesics, diuretics, electrolytes, physiotherapy, bedside wound opening; t2 pharmacologic including transfusion or TPN; t3 invasive procedure; t4 life-threatening ICU; t5 death); D maps disability_mrs 0-1→1, 2-3→2, 4→3, 5→4, 6→5; N is 2 if new_neurologic_deficit else 1; if therapy is t5 or disability_mrs is 6, tdn_grade is 5 (Terrapon 2021)",
                "neurology_grade": 1,
                "tdn_grade": 1,
                "therapy_grade": 1
              },
              {
                "citation": {
                  "authors": "Terrapon APR, Zattra CM, Voglis S, et al.",
                  "doi": "10.1093/neuros/nyab121",
                  "id": "terrapon-2021",
                  "pmid": "33887774",
                  "source": "Neurosurgery. 2021;89(2):236-245",
                  "title": "Adverse Events in Neurosurgery: The Novel Therapy-Disability-Neurology Grade"
                },
                "criteria": [
                  {
                    "factor": "therapy",
                    "met": true,
                    "value": 1
                  },
                  {
                    "factor": "disability",
                    "met": true,
                    "value": 1
                  },
                  {
                    "factor": "neurology",
                    "met": true,
                    "value": 1
                  }
                ],
                "disability_grade": 1,
                "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": "tdn_grade",
                "formula_expression": "tdn_grade = max(T, D, N); T is therapy t1-t5 (t1 no treatment beyond antiemetics, antipyretics, analgesics, diuretics, electrolytes, physiotherapy, bedside wound opening; t2 pharmacologic including transfusion or TPN; t3 invasive procedure; t4 life-threatening ICU; t5 death); D maps disability_mrs 0-1→1, 2-3→2, 4→3, 5→4, 6→5; N is 2 if new_neurologic_deficit else 1; if therapy is t5 or disability_mrs is 6, tdn_grade is 5 (Terrapon 2021)",
                "neurology_grade": 1,
                "tdn_grade": 1,
                "therapy_grade": 1
              }
            ],
            "path": "/api/calc/tdn_grade"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "disability_mrs": {
                          "description": "Modified Rankin 0-6 as assigned by the caller, including death as 6. Maps to Disability D: 0-1→1, 2-3→2, 4→3, 5→4, 6→5. This is not van Swieten 1988 modified Rankin 0-5, which omits death. magent does not interview the patient.",
                          "type": "integer"
                        },
                        "new_neurologic_deficit": {
                          "description": "New neurologic deficit as assigned by the caller (Terrapon 2021 Neurology dimension). true or false. false is N=1; true is N=2. magent does not examine the patient.",
                          "type": "boolean"
                        },
                        "therapy": {
                          "description": "Terrapon 2021 Therapy dimension as assigned by the caller. t1 no treatment or intervention beyond antiemetics, antipyretics, analgesics, diuretics, electrolytes, physiotherapy, or bedside wound opening (T=1). t2 pharmacologic treatment including blood transfusion or TPN (T=2). t3 invasive procedure, surgical, endoscopic, or radiologic (T=3). t4 life-threatening, ICU management (T=4). t5 death (T=5). magent does not grade the adverse event.",
                          "enum": [
                            "t1",
                            "t2",
                            "t3",
                            "t4",
                            "t5"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "therapy",
                        "disability_mrs",
                        "new_neurologic_deficit"
                      ],
                      "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": [
    "tdn-grade",
    "neurosurgery",
    "adverse-event",
    "neurology",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T15:32:06.774Z",
  "quality": {
    "calls30d": 6,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T15:32:06.639Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "disability_mrs": 0,
                  "new_neurologic_deficit": false,
                  "therapy": "t1"
                },
                {
                  "disability_mrs": 0,
                  "new_neurologic_deficit": false,
                  "therapy": "t1"
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "citation": {
                    "authors": "Terrapon APR, Zattra CM, Voglis S, et al.",
                    "doi": "10.1093/neuros/nyab121",
                    "id": "terrapon-2021",
                    "pmid": "33887774",
                    "source": "Neurosurgery. 2021;89(2):236-245",
                    "title": "Adverse Events in Neurosurgery: The Novel Therapy-Disability-Neurology Grade"
                  },
                  "criteria": [
                    {
                      "factor": "therapy",
                      "met": true,
                      "value": 1
                    },
                    {
                      "factor": "disability",
                      "met": true,
                      "value": 1
                    },
                    {
                      "factor": "neurology",
                      "met": true,
                      "value": 1
                    }
                  ],
                  "disability_grade": 1,
                  "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": "tdn_grade",
                  "formula_expression": "tdn_grade = max(T, D, N); T is therapy t1-t5 (t1 no treatment beyond antiemetics, antipyretics, analgesics, diuretics, electrolytes, physiotherapy, bedside wound opening; t2 pharmacologic including transfusion or TPN; t3 invasive procedure; t4 life-threatening ICU; t5 death); D maps disability_mrs 0-1→1, 2-3→2, 4→3, 5→4, 6→5; N is 2 if new_neurologic_deficit else 1; if therapy is t5 or disability_mrs is 6, tdn_grade is 5 (Terrapon 2021)",
                  "neurology_grade": 1,
                  "tdn_grade": 1,
                  "therapy_grade": 1
                },
                {
                  "citation": {
                    "authors": "Terrapon APR, Zattra CM, Voglis S, et al.",
                    "doi": "10.1093/neuros/nyab121",
                    "id": "terrapon-2021",
                    "pmid": "33887774",
                    "source": "Neurosurgery. 2021;89(2):236-245",
                    "title": "Adverse Events in Neurosurgery: The Novel Therapy-Disability-Neurology Grade"
                  },
                  "criteria": [
                    {
                      "factor": "therapy",
                      "met": true,
                      "value": 1
                    },
                    {
                      "factor": "disability",
                      "met": true,
                      "value": 1
                    },
                    {
                      "factor": "neurology",
                      "met": true,
                      "value": 1
                    }
                  ],
                  "disability_grade": 1,
                  "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": "tdn_grade",
                  "formula_expression": "tdn_grade = max(T, D, N); T is therapy t1-t5 (t1 no treatment beyond antiemetics, antipyretics, analgesics, diuretics, electrolytes, physiotherapy, bedside wound opening; t2 pharmacologic including transfusion or TPN; t3 invasive procedure; t4 life-threatening ICU; t5 death); D maps disability_mrs 0-1→1, 2-3→2, 4→3, 5→4, 6→5; N is 2 if new_neurologic_deficit else 1; if therapy is t5 or disability_mrs is 6, tdn_grade is 5 (Terrapon 2021)",
                  "neurology_grade": 1,
                  "tdn_grade": 1,
                  "therapy_grade": 1
                }
              ],
              "path": "/api/calc/tdn_grade"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "disability_mrs": {
                            "description": "Modified Rankin 0-6 as assigned by the caller, including death as 6. Maps to Disability D: 0-1→1, 2-3→2, 4→3, 5→4, 6→5. This is not van Swieten 1988 modified Rankin 0-5, which omits death. magent does not interview the patient.",
                            "type": "integer"
                          },
                          "new_neurologic_deficit": {
                            "description": "New neurologic deficit as assigned by the caller (Terrapon 2021 Neurology dimension). true or false. false is N=1; true is N=2. magent does not examine the patient.",
                            "type": "boolean"
                          },
                          "therapy": {
                            "description": "Terrapon 2021 Therapy dimension as assigned by the caller. t1 no treatment or intervention beyond antiemetics, antipyretics, analgesics, diuretics, electrolytes, physiotherapy, or bedside wound opening (T=1). t2 pharmacologic treatment including blood transfusion or TPN (T=2). t3 invasive procedure, surgical, endoscopic, or radiologic (T=3). t4 life-threatening, ICU management (T=4). t5 death (T=5). magent does not grade the adverse event.",
                            "enum": [
                              "t1",
                              "t2",
                              "t3",
                              "t4",
                              "t5"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "therapy",
                          "disability_mrs",
                          "new_neurologic_deficit"
                        ],
                        "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"
  }
}