# Ottawa Ankle Rule Calculator

> Ottawa Ankle Rule 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).

Evaluates whether ankle X-ray is indicated using the Ottawa Ankle Rule (Stiell 1992) based on malleolar-zone pain, bony tenderness, and weight-bearing ability

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/ottawa_ankle
- 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/ottawa-ankle-rule-calculator-4bf38817
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FXR2ysfdOKzLr16LiKVtg

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 ottawa-ankle-rule-calculator-4bf38817
```

Example prompt: My patient has malleolar-zone pain, tenderness at the posterior tip of the lateral malleolus, no tenderness at the medial malleolus, was able to bear weight right after injury but cannot take four steps in the ED — should I order an ankle x-ray according to the Ottawa Ankle Rule?

## When to prefer this

Use this endpoint when you need a fast, authoritative implementation of the Stiell 1992 Ottawa Ankle Rule specifically — not the Ottawa Foot Rule (midfoot pain) and not the Pittsburgh Knee Rule. Ideal for ED and urgent care clinical decision support agents that need to determine whether ankle radiography is warranted based on structured clinical findings. Prefer this over general LLM reasoning for medico-legal reproducibility.

## Known failure modes

- Missing required query parameters returns an error — all five boolean flags must be provided
- Misclassification risk if caller incorrectly assigns malleolar_pain as true when pain is in the foot zone (use Ottawa Foot Rule instead)
- Rule does not apply to children under 18, intoxicated patients, or patients with distracting injuries — results may be misleading in those populations
- unable_to_bear_weight_in_ed alone without unable_to_bear_weight_immediately does not trigger a positive result; both must be true

## How this service works

Ottawa ankle rule (Stiell 1992). Ankle x-ray is indicated when there is malleolar-zone pain and any of: bone tenderness at the posterior edge or tip of the lateral or medial malleolus, or inability to bear weight both immediately after injury and in the emergency department (four steps). One weight-bearing failure alone is not enough. Not a diagnosis of fracture, not the Ottawa foot rule, and not the Pittsburgh knee rule. magent does not examine the ankle.

## Output

Returns whether an ankle X-ray is indicated based on the Ottawa Ankle Rule criteria: a positive result (x-ray indicated) requires malleolar-zone pain plus at least one of bony tenderness at the posterior edge or tip of lateral or medial malleolus, or inability to bear weight both immediately after injury AND in the ED. A negative result indicates imaging is not required by the rule.

## 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": [
      "malleolar_pain",
      "lateral_malleolus_tenderness",
      "medial_malleolus_tenderness",
      "unable_to_bear_weight_immediately",
      "unable_to_bear_weight_in_ed"
     ],
     "properties": {
      "malleolar_pain": {
       "type": "boolean",
       "description": "Pain in the malleolar zone as assigned by the caller. true or false. Ankle x-ray is not indicated when false, even if tenderness flags are true."
      },
      "medial_malleolus_tenderness": {
       "type": "boolean",
       "description": "Bone tenderness at the posterior edge or tip of the medial malleolus. true or false. Applies only inside the malleolar zone."
      },
      "unable_to_bear_weight_in_ed": {
       "type": "boolean",
       "description": "Unable to bear weight in the emergency department (four steps). true or false. Counts only when also unable immediately after injury."
      },
      "lateral_malleolus_tenderness": {
       "type": "boolean",
       "description": "Bone tenderness at the posterior edge or tip of the lateral malleolus. true or false. Applies only inside the malleolar zone."
      },
      "unable_to_bear_weight_immediately": {
       "type": "boolean",
       "description": "Unable to bear weight immediately after injury (four steps). true or false. Counts only when also unable in the emergency department."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/ottawa_ankle",
  "count": 2,
  "items": [
   {
    "formula": "ottawa_ankle",
    "citation": {
     "id": "stiell-1992",
     "doi": "10.1016/S0196-0644(05)82656-3",
     "title": "A study to develop clinical decision rules for the use of radiography in acute ankle injuries",
     "source": "Ann Emerg Med. 1992;21(4):384-390",
     "authors": "Stiell IG, Greenberg GH, McKnight RD, Nair RC, McDowell I, Worthington JR"
    },
    "criteria": [
     {
      "met": false,
      "factor": "malleolar_pain"
     },
     {
      "met": false,
      "factor": "lateral_malleolus_tenderness"
     },
     {
      "met": false,
      "factor": "medial_malleolus_tenderness"
     },
     {
      "met": false,
      "factor": "unable_to_bear_weight_both",
      "unable_to_bear_weight_in_ed": false,
      "unable_to_bear_weight_immediately": 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.",
    "xray_indicated": false,
    "formula_expression": "Ankle x-ray indicated iff malleolar_pain and (lateral_malleolus_tenderness or medial_malleolus_tenderness or (unable_to_bear_weight_immediately and unable_to_bear_weight_in_ed))"
   },
   {
    "formula": "ottawa_ankle",
    "citation": {
     "id": "stiell-1992",
     "doi": "10.1016/S0196-0644(05)82656-3",
     "title": "A study to develop clinical decision rules for the use of radiography in acute ankle injuries",
     "source": "Ann Emerg Med. 1992;21(4):384-390",
     "authors": "Stiell IG, Greenberg GH, McKnight RD, Nair RC, McDowell I, Worthington JR"
    },
    "criteria": [
     {
      "met": false,
      "factor": "malleolar_pain"
     },
     {
      "met": false,
      "factor": "lateral_malleolus_tenderness"
     },
     {
      "met": false,
      "factor": "medial_malleolus_tenderness"
     },
     {
      "met": false,
      "factor": "unable_to_bear_weight_both",
      "unable_to_bear_weight_in_ed": false,
      "unable_to_bear_weight_immediately": 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.",
    "xray_indicated": false,
    "formula_expression": "Ankle x-ray indicated iff malleolar_pain and (lateral_malleolus
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ottawa-ankle-rule-calculator-4bf38817/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)
