# Abnormal Involuntary Movement Scale (AIMS)

AIMS

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

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

## What it computes

Sum Guy 1976 AIMS movement items 1-7 (each caller-assigned integer 0-4) and return the dyskinesia total (max 28). Overall severity, incapacitation, awareness, dental problems, and dentures are recorded only.

## When to use

When an agent already has Guy 1976 AIMS item integers and dental flags and needs the published dyskinesia total. magent does not examine the patient, diagnose tardive dyskinesia, subtract for activation-only movements, or apply Schooler-Kane criteria.

## When not to use

- Not a medical device. magent does not examine the patient. Each item is a caller-assigned Guy 1976 integer or yes/no.
- Not a diagnosis of tardive dyskinesia. Guy 1976 published no total-score TD cutoffs. magent does not apply Schooler-Kane research diagnostic criteria.
- Items 8-12 (overall_severity, incapacitation, awareness, dental_problems, wears_dentures) are required and returned and are not added to the dyskinesia total.
- magent does not subtract 1 for activation-only movements. Rate highest severity observed as assigned by the caller.
- Not AIMS65 (Saltzman 2011 upper GI bleed).

## Formula

```
AIMS dyskinesia total = facial_expression + lips_perioral + jaw + tongue + upper_extremities + lower_extremities + trunk; each integer 0-4 (Guy 1976: 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe); rate highest severity observed; max 28; overall_severity, incapacitation, awareness, dental_problems, and wears_dentures recorded only, not in the total; no activation subtraction; no published total-score TD cutoffs
```

## Citation

[Abnormal Involuntary Movement Scale (117-AIMS)](https://www.worldcat.org/oclc/2344751)
Guy W
ECDEU Assessment Manual for Psychopharmacology. Rockville, MD: National Institute of Mental Health; 1976:534-537
DOI: none

## Worked example

### Facial 2 and tongue 1

Given: `awareness=1, dental_problems=false, facial_expression=2, incapacitation=1, jaw=0, lips_perioral=0, lower_extremities=0, overall_severity=2, tongue=1, trunk=0, upper_extremities=0, wears_dentures=false`

1. facial_expression 2 + lips_perioral 0 + jaw 0 + tongue 1 + upper_extremities 0 + lower_extremities 0 + trunk 0
2. Score = 3 (max 28). overall_severity 2, incapacitation 1, awareness 1, dental_problems false, and wears_dentures false are recorded only and are not in the total.


### All movement items at published maximum

Given: `awareness=4, dental_problems=true, facial_expression=4, incapacitation=4, jaw=4, lips_perioral=4, lower_extremities=4, overall_severity=4, tongue=4, trunk=4, upper_extremities=4, wears_dentures=true`

1. each Guy 1976 movement item 1-7 is 4 as assigned by the caller
2. Score = 28 (max 28). Items 8-12 at maximum are recorded only and are not in the total. No total-score TD cutoff.


## Also searched as

- Abnormal Involuntary Movement Scale
- AIMS
- 117-AIMS
- Guy AIMS
- AIMS dyskinesia
- AIMS score
- involuntary movement scale
- Guy 1976 AIMS

## Parameters

- `facial_expression` (integer, required): Caller-assigned Guy 1976 AIMS item 1 muscles of facial expression (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.
- `lips_perioral` (integer, required): Caller-assigned Guy 1976 AIMS item 2 lips and perioral area (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.
- `jaw` (integer, required): Caller-assigned Guy 1976 AIMS item 3 jaw (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.
- `tongue` (integer, required): Caller-assigned Guy 1976 AIMS item 4 tongue (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate increase in movement, not inability to sustain. Rate highest severity observed. magent does not examine the patient.
- `upper_extremities` (integer, required): Caller-assigned Guy 1976 AIMS item 5 upper extremities (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Include choreic and athetoid movements. Do not include tremor. Rate highest severity observed. magent does not examine the patient.
- `lower_extremities` (integer, required): Caller-assigned Guy 1976 AIMS item 6 lower extremities (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.
- `trunk` (integer, required): Caller-assigned Guy 1976 AIMS item 7 neck, shoulders, hips (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Rate highest severity observed. magent does not examine the patient.
- `overall_severity` (integer, required): Caller-assigned Guy 1976 AIMS item 8 overall severity of abnormal movements (integer 0-4): 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe. Recorded only; not added to the dyskinesia total. magent does not examine the patient.
- `incapacitation` (integer, required): Caller-assigned Guy 1976 AIMS item 9 incapacitation due to abnormal movements (integer 0-4): 0 none, 1 minimal, 2 mild, 3 moderate, 4 severe. Recorded only; not added to the dyskinesia total. magent does not examine the patient.
- `awareness` (integer, required): Caller-assigned Guy 1976 AIMS item 10 patient's awareness of abnormal movements (integer 0-4): 0 no awareness, 1 aware no distress, 2 aware mild distress, 3 aware moderate distress, 4 aware severe distress. Rate only the patient's report. Recorded only; not added to the dyskinesia total. magent does not examine the patient.
- `dental_problems` (boolean, required): Caller-assigned Guy 1976 AIMS item 11 current problems with teeth and/or dentures (true or false). Recorded only; not added to the dyskinesia total. magent does not examine the patient.
- `wears_dentures` (boolean, required): Caller-assigned Guy 1976 AIMS item 12 does the patient usually wear dentures (true or false). Recorded only; not added to the dyskinesia total. magent does not examine the patient.

## 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/aims`
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": [
    {
      "awareness": "1",
      "dental_problems": "false",
      "facial_expression": "2",
      "incapacitation": "1",
      "jaw": "0",
      "lips_perioral": "0",
      "lower_extremities": "0",
      "overall_severity": "2",
      "tongue": "1",
      "trunk": "0",
      "upper_extremities": "0",
      "wears_dentures": "false"
    },
    {
      "awareness": "1",
      "dental_problems": "false",
      "facial_expression": "2",
      "incapacitation": "1",
      "jaw": "0",
      "lips_perioral": "0",
      "lower_extremities": "0",
      "overall_severity": "2",
      "tongue": "1",
      "trunk": "0",
      "upper_extremities": "0",
      "wears_dentures": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/aims",
  "items": [
    {
      "components": [
        {
          "value": 2,
          "factor": "facial_expression",
          "points": 2,
          "present": true
        },
        {
          "value": 0,
          "factor": "lips_perioral",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "jaw",
          "points": 0,
          "present": true
        },
        {
          "value": 1,
          "factor": "tongue",
          "points": 1,
          "present": true
        },
        {
          "value": 0,
          "factor": "upper_extremities",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "lower_extremities",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "trunk",
          "points": 0,
          "present": true
        }
      ],
      "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": "Guy W",
        "id": "guy-1976",
        "source": "ECDEU Assessment Manual for Psychopharmacology. Rockville, MD: National Institute of Mental Health; 1976:534-537",
        "title": "Abnormal Involuntary Movement Scale (117-AIMS)"
      },
      "formula": "aims",
      "formula_expression": "AIMS dyskinesia total = facial_expression + lips_perioral + jaw + tongue + upper_extremities + lower_extremities + trunk; each integer 0-4 (Guy 1976: 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe); rate highest severity observed; max 28; overall_severity, incapacitation, awareness, dental_problems, and wears_dentures recorded only, not in the total; no activation subtraction; no published total-score TD cutoffs",
      "max_score": 28,
      "score": 3,
      "awareness": 1,
      "dental_problems": false,
      "incapacitation": 1,
      "overall_severity": 2,
      "wears_dentures": false
    },
    {
      "components": [
        {
          "value": 2,
          "factor": "facial_expression",
          "points": 2,
          "present": true
        },
        {
          "value": 0,
          "factor": "lips_perioral",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "jaw",
          "points": 0,
          "present": true
        },
        {
          "value": 1,
          "factor": "tongue",
          "points": 1,
          "present": true
        },
        {
          "value": 0,
          "factor": "upper_extremities",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "lower_extremities",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "trunk",
          "points": 0,
          "present": true
        }
      ],
      "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": "Guy W",
        "id": "guy-1976",
        "source": "ECDEU Assessment Manual for Psychopharmacology. Rockville, MD: National Institute of Mental Health; 1976:534-537",
        "title": "Abnormal Involuntary Movement Scale (117-AIMS)"
      },
      "formula": "aims",
      "formula_expression": "AIMS dyskinesia total = facial_expression + lips_perioral + jaw + tongue + upper_extremities + lower_extremities + trunk; each integer 0-4 (Guy 1976: 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe); rate highest severity observed; max 28; overall_severity, incapacitation, awareness, dental_problems, and wears_dentures recorded only, not in the total; no activation subtraction; no published total-score TD cutoffs",
      "max_score": 28,
      "score": 3,
      "awareness": 1,
      "dental_problems": false,
      "incapacitation": 1,
      "overall_severity": 2,
      "wears_dentures": false
    }
  ]
}
```

## Response fields

- `formula` (string): aims
- `formula_expression` (string): Exact expression used
- `score` (integer): Guy 1976 AIMS dyskinesia total: sum of movement items 1-7 (0-28)
- `max_score` (integer): Always 28
- `overall_severity` (integer): Guy 1976 item 8 overall severity (0-4); not in the dyskinesia total
- `incapacitation` (integer): Guy 1976 item 9 incapacitation (0-4); not in the dyskinesia total
- `awareness` (integer): Guy 1976 item 10 awareness (0-4); not in the dyskinesia total
- `dental_problems` (boolean): Guy 1976 item 11 current dental problems; not in the dyskinesia total
- `wears_dentures` (boolean): Guy 1976 item 12 usually wears dentures; not in the dyskinesia total
- `components` (array): Per-region caller-assigned points for movement items 1-7 only
- `citation` (object): Guy 1976 ECDEU 117-AIMS citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 2,
      "factor": "facial_expression",
      "points": 2,
      "present": true
    },
    {
      "value": 0,
      "factor": "lips_perioral",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "jaw",
      "points": 0,
      "present": true
    },
    {
      "value": 1,
      "factor": "tongue",
      "points": 1,
      "present": true
    },
    {
      "value": 0,
      "factor": "upper_extremities",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "lower_extremities",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "trunk",
      "points": 0,
      "present": true
    }
  ],
  "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": "Guy W",
    "id": "guy-1976",
    "source": "ECDEU Assessment Manual for Psychopharmacology. Rockville, MD: National Institute of Mental Health; 1976:534-537",
    "title": "Abnormal Involuntary Movement Scale (117-AIMS)"
  },
  "formula": "aims",
  "formula_expression": "AIMS dyskinesia total = facial_expression + lips_perioral + jaw + tongue + upper_extremities + lower_extremities + trunk; each integer 0-4 (Guy 1976: 0 none, 1 minimal may be extreme normal, 2 mild, 3 moderate, 4 severe); rate highest severity observed; max 28; overall_severity, incapacitation, awareness, dental_problems, and wears_dentures recorded only, not in the total; no activation subtraction; no published total-score TD cutoffs",
  "max_score": 28,
  "score": 3,
  "awareness": 1,
  "dental_problems": false,
  "incapacitation": 1,
  "overall_severity": 2,
  "wears_dentures": false
}
```

## Errors

- HTTP 400 `invalid_aims`: AIMS needs Guy 1976 movement items 1-7 as integers 0-4 plus global and dental items 8-12. 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

- [BARS](https://magentlab.com/docs/bars) — Return the Swift 2002 Behavioural Activity Rating Scale (BARS) 1-7 from a caller-assigned integer, with a stable label.
- [GDS-15](https://magentlab.com/docs/gds-15) — Sum fifteen Sheikh 1986 GDS-15 yes/no items using that paper's reverse-scoring key and return the published 0-15 total. Does not apply later total-score severity bands.

## 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.
