# Trunk Impairment Scale (Verheyden)

TIS

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/trunk_impairment`
HTML: https://magentlab.com/docs/trunk-impairment
Markdown: https://magentlab.com/docs/trunk-impairment.md

Not a medical device. Not a diagnosis, dose, or listing recommendation.

## What it computes

Sum caller-assigned Verheyden 2004 original Trunk Impairment Scale subscales (static sitting balance 0-7, dynamic sitting balance 0-10, coordination 0-6) to a 0-23 total. If static sitting balance is 0, the total is 0.

## When to use

When an agent already has caller-assigned Verheyden 2004 original TIS subscale integers and needs the published 0-23 total, including the first-item zero rule. magent does not examine sitting balance, apply TIS 2.0, apply Fujiwara 2004, or invent severity bands.

## When not to use

- Not a medical device and not a diagnosis, rehabilitation plan, or discharge decision. magent does not examine sitting balance. Subscales are caller-assigned integers.
- Original Verheyden 2004 TIS (static 0-7, dynamic 0-10, coordination 0-6, max 23). Not TIS 2.0 and not Fujiwara 2004. The 17-item appendix wording is not reproduced (copyright of the item list).
- If static_sitting_balance is 0, the total TIS is 0 even if dynamic sitting balance or coordination is nonzero (Verheyden 2004 first-item rule). Caller-assigned subscales are still returned.
- This paper published no mild/moderate/severe TIS cutoffs. magent returns score and max_score 23 only.

## Formula

```
TIS = static_sitting_balance + dynamic_sitting_balance + coordination when static_sitting_balance > 0, else 0; caller-assigned Verheyden 2004 original TIS subscales (static sitting balance 0-7, dynamic sitting balance 0-10, coordination 0-6); max 23; if static sitting balance is 0 the total is 0 even when the other subscales are nonzero; not TIS 2.0; not Fujiwara 2004; magent does not examine sitting balance; no published mild/moderate/severe cutoffs
```

## Citation

[The Trunk Impairment Scale: a new tool to measure motor impairment of the trunk after stroke](https://doi.org/10.1191/0269215504cr733oa)
Verheyden G, Nieuwboer A, Mertin J, Preger R, Kiekens C, De Weerdt W
Clin Rehabil. 2004;18(3):326-334
DOI: [10.1191/0269215504cr733oa](https://doi.org/10.1191/0269215504cr733oa)

## Worked example

### All subscales 0

Given: `coordination=0, dynamic_sitting_balance=0, static_sitting_balance=0`

1. static_sitting_balance 0, dynamic_sitting_balance 0, coordination 0 as assigned by the caller
2. static sitting balance is 0, so score = 0 (max 23). This paper published no mild/moderate/severe cutoff.


### Static 0 overrides other subscales

Given: `coordination=6, dynamic_sitting_balance=10, static_sitting_balance=0`

1. static_sitting_balance 0 with nonzero dynamic sitting balance and coordination
2. Verheyden 2004: if static sitting balance is 0, score = 0 (max 23). Subscale values are still returned.


### Mid-range sum

Given: `coordination=3, dynamic_sitting_balance=5, static_sitting_balance=4`

1. static_sitting_balance 4 is greater than 0, so score = 4 + 5 + 3
2. Score = 12 (max 23). No severity band.


### Published maximum

Given: `coordination=6, dynamic_sitting_balance=10, static_sitting_balance=7`

1. static_sitting_balance 7, dynamic_sitting_balance 10, coordination 6
2. Score = 7 + 10 + 6 = 23 (max 23). No severity band.


## Also searched as

- Trunk Impairment Scale
- TIS
- Verheyden TIS
- Verheyden 2004 TIS
- original Trunk Impairment Scale
- trunk impairment after stroke
- TIS 0-23
- static sitting balance TIS

## Parameters

- `static_sitting_balance` (integer, required): Caller-assigned Verheyden 2004 original TIS static sitting balance subscale (integer 0-7). magent does not examine sitting balance.
- `dynamic_sitting_balance` (integer, required): Caller-assigned Verheyden 2004 original TIS dynamic sitting balance subscale (integer 0-10). magent does not examine sitting balance.
- `coordination` (integer, required): Caller-assigned Verheyden 2004 original TIS coordination subscale (integer 0-6). magent does not examine sitting balance.

## Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

Method: `POST /api/calc/trunk_impairment`
Max items: 25
Price: unit_amount + extra_item_amount * (n - 1) (unit 5000 atomic, extra 2000 atomic)
Status: PREVIEW

- 1 to 25 items. Each item uses the same keys as the GET query parameters.
- POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
- The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
- HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
- Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
- x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request:

```json
{
  "items": [
    {
      "coordination": "0",
      "dynamic_sitting_balance": "0",
      "static_sitting_balance": "0"
    },
    {
      "coordination": "0",
      "dynamic_sitting_balance": "0",
      "static_sitting_balance": "0"
    }
  ]
}
```

Human paywall (two-item fixture): https://api.magentlab.com/paywall/bulk/trunk-impairment

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/trunk_impairment",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "static_sitting_balance",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "dynamic_sitting_balance",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "coordination",
          "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.",
      "citation": {
        "authors": "Verheyden G, Nieuwboer A, Mertin J, Preger R, Kiekens C, De Weerdt W",
        "doi": "10.1191/0269215504cr733oa",
        "id": "verheyden-2004",
        "pmid": "15137564",
        "source": "Clin Rehabil. 2004;18(3):326-334",
        "title": "The Trunk Impairment Scale: a new tool to measure motor impairment of the trunk after stroke"
      },
      "formula": "tis",
      "formula_expression": "TIS = static_sitting_balance + dynamic_sitting_balance + coordination when static_sitting_balance > 0, else 0; caller-assigned Verheyden 2004 original TIS subscales (static sitting balance 0-7, dynamic sitting balance 0-10, coordination 0-6); max 23; if static sitting balance is 0 the total is 0 even when the other subscales are nonzero; not TIS 2.0; not Fujiwara 2004; magent does not examine sitting balance; no published mild/moderate/severe cutoffs",
      "max_score": 23,
      "score": 0,
      "coordination": 0,
      "dynamic_sitting_balance": 0,
      "static_sitting_balance": 0
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "static_sitting_balance",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "dynamic_sitting_balance",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "coordination",
          "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.",
      "citation": {
        "authors": "Verheyden G, Nieuwboer A, Mertin J, Preger R, Kiekens C, De Weerdt W",
        "doi": "10.1191/0269215504cr733oa",
        "id": "verheyden-2004",
        "pmid": "15137564",
        "source": "Clin Rehabil. 2004;18(3):326-334",
        "title": "The Trunk Impairment Scale: a new tool to measure motor impairment of the trunk after stroke"
      },
      "formula": "tis",
      "formula_expression": "TIS = static_sitting_balance + dynamic_sitting_balance + coordination when static_sitting_balance > 0, else 0; caller-assigned Verheyden 2004 original TIS subscales (static sitting balance 0-7, dynamic sitting balance 0-10, coordination 0-6); max 23; if static sitting balance is 0 the total is 0 even when the other subscales are nonzero; not TIS 2.0; not Fujiwara 2004; magent does not examine sitting balance; no published mild/moderate/severe cutoffs",
      "max_score": 23,
      "score": 0,
      "coordination": 0,
      "dynamic_sitting_balance": 0,
      "static_sitting_balance": 0
    }
  ]
}
```

## Response fields

- `formula` (string): tis
- `formula_expression` (string): Exact expression used
- `score` (integer): Verheyden 2004 original TIS total 0-23; 0 when static_sitting_balance is 0
- `max_score` (integer): Always 23
- `static_sitting_balance` (integer): Caller-assigned static sitting balance 0-7 used
- `dynamic_sitting_balance` (integer): Caller-assigned dynamic sitting balance 0-10 used
- `coordination` (integer): Caller-assigned coordination 0-6 used
- `components` (array): Per-subscale points; dynamic and coordination contribute 0 when static is 0
- `citation` (object): Verheyden et al. Clin Rehabil 2004 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 0,
      "factor": "static_sitting_balance",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "dynamic_sitting_balance",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "coordination",
      "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.",
  "citation": {
    "authors": "Verheyden G, Nieuwboer A, Mertin J, Preger R, Kiekens C, De Weerdt W",
    "doi": "10.1191/0269215504cr733oa",
    "id": "verheyden-2004",
    "pmid": "15137564",
    "source": "Clin Rehabil. 2004;18(3):326-334",
    "title": "The Trunk Impairment Scale: a new tool to measure motor impairment of the trunk after stroke"
  },
  "formula": "tis",
  "formula_expression": "TIS = static_sitting_balance + dynamic_sitting_balance + coordination when static_sitting_balance > 0, else 0; caller-assigned Verheyden 2004 original TIS subscales (static sitting balance 0-7, dynamic sitting balance 0-10, coordination 0-6); max 23; if static sitting balance is 0 the total is 0 even when the other subscales are nonzero; not TIS 2.0; not Fujiwara 2004; magent does not examine sitting balance; no published mild/moderate/severe cutoffs",
  "max_score": 23,
  "score": 0,
  "coordination": 0,
  "dynamic_sitting_balance": 0,
  "static_sitting_balance": 0
}
```

## Errors

- HTTP 400 `invalid_tis_subscale`: Trunk Impairment Scale needs static_sitting_balance 0-7, dynamic_sitting_balance 0-10, and coordination 0-6 (Verheyden 2004). Returned before settlement; you are not charged.
- HTTP 400 `invalid_items`: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
- HTTP 400 `invalid_item_count`: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
- HTTP 400 `invalid_item`: each items entry must be a JSON object Returned before settlement; you are not charged.

Shared HTTP 402 and 503: https://magentlab.com/docs/payments

## Related tools

- [NIHSS](https://magentlab.com/docs/nihss) — Sum Brott 1989 NIH stroke scale points from 15 caller-assigned examination integers, including pupillary response and plantar reflex. Weaker-limb motor arm and leg. Does not apply later total-score severity bands.
- [Barthel Index](https://magentlab.com/docs/barthel) — Sum ten caller-assigned Mahoney 1965 Barthel Index item points and return the published 0-100 total.
- [Modified Rankin](https://magentlab.com/docs/modified-rankin) — Return the van Swieten 1988 modified Rankin handicap grade 0-5 from a caller-assigned integer, with the published grade wording.

## Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s.

- GET the tool with Accept: application/json (do not send Accept: text/html unless you want the human paywall).
- HTTP 402 means you have not paid. Decode the base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote.
- Sign accepts[0] (exact, EIP-3009) with validBefore = now + maxTimeoutSeconds (600 seconds), or accepts[1] (batch-settlement deposit/voucher) on product GET. Ping and POST {items} stay exact. Magent retries transient facilitator 429/5xx before answering.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON of accepted and payload). Magent attaches canonical extensions.bazaar on CDP verify/settle; echoing 402 bazaar is optional.
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. exact settles before the tool. batch-settlement verifies (and deposit-settles) before the tool and commits the charge after HTTP 2xx. HTTP 503: retry the same PAYMENT-SIGNATURE. Mint a new exact nonce only after a new HTTP 402.

- offered `exact` on eip155:8453: Fixed-price USDC on Base. The buyer authorizes the advertised amount (EIP-3009). magent settles before the tool runs (paymentFlow upfront). extra.assetTransferMethod=eip3009 extra.paymentFlow=upfront.
- offered `batch-settlement` on eip155:8453: Payment-channel vouchers claimed later in batches. Exact stays accepts[0]. Same-path POST {items} is still exact. extra.assetTransferMethod=eip3009 extra.paymentFlow=authorization.

- not offered `upto`: Not offered. Usage-based: buyer authorizes a ceiling, seller settles the actual amount after work. Reserved for a future metered tool. Not for current calculators or code search.

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for GET unit plus $0.002 per extra item. That is not x402 batch-settlement (payment channels / vouchers).

Shared HTTP 402 and 503 table: https://magentlab.com/docs/payments

Stdio MCP (one process per host): https://magentlab.com/docs/mcp

## Guarantees

- HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
- exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
- HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
- Execution is timeout-bounded and concurrency-capped.
- Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.
