# Mirels impending pathologic fracture score

Mirels

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

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

## What it computes

Sum the Mirels 1989 score for diagnosing impending pathologic fractures in long-bone metastatic disease from four caller-assigned items and return the published 4–12 integer total and band (≤7 / 8 / ≥9). Not an operative order and not SINS.

## When to use

When an agent has already assigned Mirels 1989 site, size, nature, and pain for metastatic disease in a long bone and needs the published integer sum and band, not a surgical order and not SINS (neoplastic spinal instability).

## When not to use

- Not a medical device. magent does not read radiographs. Site, size, nature, and pain are caller-assigned.
- Not an operative order. Bands ≤7 (le_7), 8, and ≥9 (ge_9) follow Mirels 1989; they are not a surgical command.
- Not SINS (Fisher 2010 neoplastic spinal instability). This tool is Mirels 1989 for metastatic disease in long bones.
- Pain 3 is functional (pain that is functional), not severe. magent does not interview the patient.

## Formula

```
Mirels = site (upper 1, lower 2, peritrochanteric 3) + size (lt_one_third 1, one_to_two_thirds 2, gt_two_thirds 3) + nature (blastic 1, mixed 2, lytic 3) + pain (mild 1, moderate 2, functional 3); Mirels 1989; sum 4-12; bands le_7 (<=7), 8, ge_9 (>=9)
```

## Citation

[Metastatic disease in long bones. A proposed scoring system for diagnosing impending pathologic fractures.](https://pubmed.ncbi.nlm.nih.gov/2684463)
Mirels H
Clin Orthop Relat Res. 1989;(249):256-264
DOI: none

## Worked example

### All minimum grades

Given: `nature=blastic, pain=mild, site=upper, size=lt_one_third`

1. upper 1 + lt_one_third 1 + blastic 1 + mild 1
2. Score = 4 (max 12); mirels_band le_7. Not an operative order


### Score 8

Given: `nature=mixed, pain=moderate, site=lower, size=one_to_two_thirds`

1. lower 2 + one_to_two_thirds 2 + mixed 2 + moderate 2
2. Score = 8 (max 12); mirels_band 8


### All maximum grades

Given: `nature=lytic, pain=functional, site=peritrochanteric, size=gt_two_thirds`

1. peritrochanteric 3 + gt_two_thirds 3 + lytic 3 + functional 3
2. Score = 12 (max 12); mirels_band ge_9. Not an operative order


## Also searched as

- Mirels score
- Mirels criteria
- impending pathologic fracture
- Mirels 1989
- metastatic long bone score
- pathologic fracture scoring
- Mirels classification
- peritrochanteric Mirels

## Parameters

- `site` (string, required): Caller-assigned site (Mirels 1989). upper (upper limb) scores 1; lower (lower limb) scores 2; peritrochanteric scores 3. magent does not read radiographs.
- `size` (string, required): Caller-assigned lesion size relative to bone diameter (Mirels 1989). lt_one_third (<1/3) scores 1; one_to_two_thirds (1/3–2/3) scores 2; gt_two_thirds (>2/3) scores 3. magent does not read radiographs.
- `nature` (string, required): Caller-assigned lesion nature (Mirels 1989). blastic scores 1; mixed scores 2; lytic scores 3. magent does not read radiographs.
- `pain` (string, required): Caller-assigned pain (Mirels 1989). mild scores 1; moderate scores 2; functional (pain that is functional) scores 3. Not severe. magent does not interview 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/mirels`
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": [
    {
      "nature": "blastic",
      "pain": "mild",
      "site": "upper",
      "size": "lt_one_third"
    },
    {
      "nature": "blastic",
      "pain": "mild",
      "site": "upper",
      "size": "lt_one_third"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/mirels",
  "items": [
    {
      "size": "lt_one_third",
      "components": [
        {
          "value": "upper",
          "factor": "site",
          "points": 1,
          "present": true
        },
        {
          "value": "lt_one_third",
          "factor": "size",
          "points": 1,
          "present": true
        },
        {
          "value": "blastic",
          "factor": "nature",
          "points": 1,
          "present": true
        },
        {
          "value": "mild",
          "factor": "pain",
          "points": 1,
          "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": "Mirels H",
        "id": "mirels-1989",
        "pmid": "2684463",
        "source": "Clin Orthop Relat Res. 1989;(249):256-264",
        "title": "Metastatic disease in long bones. A proposed scoring system for diagnosing impending pathologic fractures."
      },
      "formula": "mirels",
      "formula_expression": "Mirels = site (upper 1, lower 2, peritrochanteric 3) + size (lt_one_third 1, one_to_two_thirds 2, gt_two_thirds 3) + nature (blastic 1, mixed 2, lytic 3) + pain (mild 1, moderate 2, functional 3); Mirels 1989; sum 4-12; bands le_7 (<=7), 8, ge_9 (>=9)",
      "max_score": 12,
      "score": 4,
      "mirels_band": "le_7",
      "nature": "blastic",
      "pain": "mild",
      "site": "upper"
    },
    {
      "size": "lt_one_third",
      "components": [
        {
          "value": "upper",
          "factor": "site",
          "points": 1,
          "present": true
        },
        {
          "value": "lt_one_third",
          "factor": "size",
          "points": 1,
          "present": true
        },
        {
          "value": "blastic",
          "factor": "nature",
          "points": 1,
          "present": true
        },
        {
          "value": "mild",
          "factor": "pain",
          "points": 1,
          "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": "Mirels H",
        "id": "mirels-1989",
        "pmid": "2684463",
        "source": "Clin Orthop Relat Res. 1989;(249):256-264",
        "title": "Metastatic disease in long bones. A proposed scoring system for diagnosing impending pathologic fractures."
      },
      "formula": "mirels",
      "formula_expression": "Mirels = site (upper 1, lower 2, peritrochanteric 3) + size (lt_one_third 1, one_to_two_thirds 2, gt_two_thirds 3) + nature (blastic 1, mixed 2, lytic 3) + pain (mild 1, moderate 2, functional 3); Mirels 1989; sum 4-12; bands le_7 (<=7), 8, ge_9 (>=9)",
      "max_score": 12,
      "score": 4,
      "mirels_band": "le_7",
      "nature": "blastic",
      "pain": "mild",
      "site": "upper"
    }
  ]
}
```

## Response fields

- `formula` (string): mirels
- `formula_expression` (string): Exact expression used
- `score` (integer): Mirels 1989 integer sum 4-12. Not an operative order.
- `max_score` (integer): 12
- `mirels_band` (string): Mirels 1989 band: le_7 (score ≤7), 8 (score 8), or ge_9 (score ≥9). Not a surgical order.
- `site` (string): Caller-assigned site used (upper, lower, or peritrochanteric)
- `size` (string): Caller-assigned size used (lt_one_third, one_to_two_thirds, or gt_two_thirds)
- `nature` (string): Caller-assigned nature used (blastic, mixed, or lytic)
- `pain` (string): Caller-assigned pain used (mild, moderate, or functional)
- `components` (array): Per-factor Mirels 1989 points
- `citation` (object): Mirels Clin Orthop Relat Res 1989 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "size": "lt_one_third",
  "components": [
    {
      "value": "upper",
      "factor": "site",
      "points": 1,
      "present": true
    },
    {
      "value": "lt_one_third",
      "factor": "size",
      "points": 1,
      "present": true
    },
    {
      "value": "blastic",
      "factor": "nature",
      "points": 1,
      "present": true
    },
    {
      "value": "mild",
      "factor": "pain",
      "points": 1,
      "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": "Mirels H",
    "id": "mirels-1989",
    "pmid": "2684463",
    "source": "Clin Orthop Relat Res. 1989;(249):256-264",
    "title": "Metastatic disease in long bones. A proposed scoring system for diagnosing impending pathologic fractures."
  },
  "formula": "mirels",
  "formula_expression": "Mirels = site (upper 1, lower 2, peritrochanteric 3) + size (lt_one_third 1, one_to_two_thirds 2, gt_two_thirds 3) + nature (blastic 1, mixed 2, lytic 3) + pain (mild 1, moderate 2, functional 3); Mirels 1989; sum 4-12; bands le_7 (<=7), 8, ge_9 (>=9)",
  "max_score": 12,
  "score": 4,
  "mirels_band": "le_7",
  "nature": "blastic",
  "pain": "mild",
  "site": "upper"
}
```

## Errors

- HTTP 400 `invalid_mirels`: site must be upper, lower, or peritrochanteric; size must be lt_one_third, one_to_two_thirds, or gt_two_thirds; nature must be blastic, mixed, or lytic; pain must be mild, moderate, or functional (Mirels 1989). 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

- [SINS](https://magentlab.com/docs/sins) — Sum the Fisher 2010 Spinal Instability Neoplastic Score from six caller-assigned items and return the published 0–18 integer total. Not later SOSG stability strata and not an operative order.

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