# Terrapon 2021 TDN Grade Calculator

> Terrapon 2021 TDN Grade Calculator 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-15).

Computes the Terrapon 2021 Therapy-Disability-Neurology (TDN) composite adverse-event grade from caller-assigned therapy tier, modified Rankin Scale, and new neurologic deficit flag.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/tdn_grade
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/terrapon-2021-tdn-grade-calculator-49d3f73f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xV5Y64hTIEwftxhdgfaa2

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 terrapon-2021-tdn-grade-calculator-49d3f73f
```

Example prompt: Calculate the Terrapon 2021 TDN grade for a patient who received t2 pharmacologic treatment, has a modified Rankin score of 3, and has no new neurologic deficit.

## When to prefer this

Use this endpoint when you need to standardize adverse event severity using the Terrapon 2021 TDN classification specifically — particularly for neurosurgical or neurologic procedural outcomes where the three-dimensional therapy/disability/neurology grading is required. Prefer over Clavien-Dindo when neurologic disability and new deficits must be captured separately.

## Known failure modes

- Missing required query parameters (therapy, disability_mrs, or new_neurologic_deficit) returns a 4xx error
- Invalid therapy enum value (not t1–t5) returns validation error
- disability_mrs outside integer range 0–6 returns validation error
- Network or upstream service unavailability returns 5xx
- Payment not provided or insufficient returns 402

## How this service works

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.

## Output

Returns the overall TDN grade as an integer from 1 to 5, computed as the maximum of the three sub-dimensions T (therapy), D (disability mapped from mRS), and N (neurologic deficit). Special rules ensure t5 or mRS 6 always yields grade 5.

## 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": [
      "therapy",
      "disability_mrs",
      "new_neurologic_deficit"
     ],
     "properties": {
      "therapy": {
       "enum": [
        "t1",
        "t2",
        "t3",
        "t4",
        "t5"
       ],
       "type": "string",
       "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."
      },
      "disability_mrs": {
       "type": "integer",
       "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."
      },
      "new_neurologic_deficit": {
       "type": "boolean",
       "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."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/terrapon-2021-tdn-grade-calculator-49d3f73f/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)
