MAGENT

Kidney · LIVE

McMahon rhabdomyolysis score

McMahon score

Sum McMahon 2013 Table 3 derivation points from age, sex, initial creatinine, calcium, CPK, etiology, phosphate, and bicarbonate and return the numeric total (max 19).

LIVE $0.005 USDC GET /api/calc/mcmahon

Markdown: /docs/mcmahon.md · Canonical: https://magentlab.com/docs/mcmahon

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

What it computes

Sum McMahon 2013 Table 3 derivation points from age, sex, initial creatinine, calcium, CPK, etiology, phosphate, and bicarbonate and return the numeric total (max 19).

When to use

When an agent needs the published McMahon rhabdomyolysis point total and must not invent a dialysis order, diagnosis, or named risk class.

When not to use

  • Not a medical device and not a diagnosis or dialysis order. magent does not assay labs.
  • Adults with rhabdomyolysis as in McMahon 2013. Age is an integer 18-120. Labs and origin are caller-supplied.
  • Half-points follow Table 3 derivation. Theoretical max is 19 (sum of published maxima); the paper observed 0–17.5.
  • Derivation stratified the composite of kidney failure or death at score <5 versus >10. magent returns the numeric total only and does not emit named risk classes.

Formula

McMahon = age(≤50→0, >50–≤70→1.5, >70–≤80→2.5, >80→3) + female(1) + Cr_mg_dL(<1.4→0, 1.4–2.2→1.5, >2.2→3) + Ca_mg_dL(<7.5→2) + CPK_U_L(>40000→2) + origin_not_seizure_syncope_exercise_statin_myositis(3) + PO4_mg_dL(<4.0→0, 4.0–5.4→1.5, >5.4→3) + HCO3_mEq_L(<19→2); McMahon 2013 Table 3 derivation; max 19

Citation

Title
A risk prediction score for kidney failure or mortality in rhabdomyolysis
Authors
McMahon GM, Zeng X, Waikar SS
Source
JAMA Intern Med. 2013;173(19):1821-1828
DOI
10.1001/jamainternmed.2013.9774

Worked example

All zero-point bands

Given: age=40bicarbonate_mmol_l=24calcium_mg_dl=9.0cpk_u_l=2000creatinine_mg_dl=1.0low_risk_origin=truephosphate_mg_dl=3.5sex=male

  1. Age 40 → 0; male → 0; Cr 1.0 → 0; Ca 9.0 → 0; CPK 2000 → 0; low-risk origin → 0; phosphate 3.5 → 0; bicarbonate 24 → 0
  2. Score = 0 (max 19). Numeric total only; no named risk class.

Age 51 isolated on the zero baseline

Given: age=51bicarbonate_mmol_l=24calcium_mg_dl=9.0cpk_u_l=2000creatinine_mg_dl=1.0low_risk_origin=truephosphate_mg_dl=3.5sex=male

  1. Age 51 is >50 to ≤70 → 1.5; remaining factors 0
  2. Score = 1.5 (max 19).

Also searched as

  • McMahon score
  • McMahon rhabdomyolysis
  • rhabdomyolysis kidney failure score
  • McMahon 2013
  • rhabdomyolysis mortality score
  • McMahon prediction score
  • rhabdo score
  • kidney failure rhabdomyolysis

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/mcmahon?age=40&sex=male&creatinine_mg_dl=1.0&calcium_mg_dl=9.0&cpk_u_l=2000&low_risk_origin=true&phosphate_mg_dl=3.5&bicarbonate_mmol_l=24

Full URL: https://api.magentlab.com/api/calc/mcmahon?age=40&sex=male&creatinine_mg_dl=1.0&calcium_mg_dl=9.0&cpk_u_l=2000&low_risk_origin=true&phosphate_mg_dl=3.5&bicarbonate_mmol_l=24

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/mcmahon?age=40&sex=male&creatinine_mg_dl=1.0&calcium_mg_dl=9.0&cpk_u_l=2000&low_risk_origin=true&phosphate_mg_dl=3.5&bicarbonate_mmol_l=24"

Parameters

Name Type Required Description
age integer required Age in years (integer 18-120). McMahon 2013 Table 3: ≤50 → 0, >50 to ≤70 → 1.5, >70 to ≤80 → 2.5, >80 → 3. magent does not assign age.
sex string required · female, male Caller-assigned sex. Female scores 1 (McMahon 2013 Table 3). magent does not assign sex.
creatinine_mg_dl number optional Initial serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. McMahon 2013 Table 3: <1.4 → 0, 1.4 to 2.2 inclusive → 1.5, >2.2 → 3. magent does not assay creatinine.
creatinine_umol_l number optional Initial serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. magent does not assay creatinine.
calcium_mg_dl number required Initial calcium in mg/dL (4-16). McMahon 2013 Table 3: <7.5 → 2. 7.5 is not <7.5. magent does not assay calcium.
cpk_u_l number required Initial CPK in U/L (1-500000). McMahon 2013 Table 3: >40000 → 2. 40000 is not >40000. magent does not assay CPK.
low_risk_origin boolean required true when the cause is seizure, syncope, exercise, statin, or myositis (0 points). false otherwise (3 points; McMahon 2013 Table 3 origin not those causes). magent does not assign etiology.
phosphate_mg_dl number required Initial phosphate in mg/dL (0.5-20). McMahon 2013 Table 3: <4.0 → 0, 4.0 to 5.4 inclusive → 1.5, >5.4 → 3. magent does not assay phosphate.
bicarbonate_mmol_l number required Initial bicarbonate in mEq/L or mmol/L (2-45). McMahon 2013 Table 3: <19 → 2. 19 is not <19. magent does not assay bicarbonate.

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.

POST /api/calc/mcmahon Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "items": [
    {
      "age": "40",
      "bicarbonate_mmol_l": "24",
      "calcium_mg_dl": "9.0",
      "cpk_u_l": "2000",
      "creatinine_mg_dl": "1.0",
      "low_risk_origin": "true",
      "phosphate_mg_dl": "3.5",
      "sex": "male"
    },
    {
      "age": "40",
      "bicarbonate_mmol_l": "24",
      "calcium_mg_dl": "9.0",
      "cpk_u_l": "2000",
      "creatinine_mg_dl": "1.0",
      "low_risk_origin": "true",
      "phosphate_mg_dl": "3.5",
      "sex": "male"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/mcmahon",
  "items": [
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "value": "male",
          "factor": "female",
          "points": 0,
          "present": false
        },
        {
          "value": 1.0,
          "factor": "creatinine",
          "points": 0,
          "present": false
        },
        {
          "value": 9.0,
          "factor": "calcium",
          "points": 0,
          "present": false
        },
        {
          "value": 2.0e3,
          "factor": "cpk",
          "points": 0,
          "present": false
        },
        {
          "value": true,
          "factor": "origin",
          "points": 0,
          "present": false
        },
        {
          "value": 3.5,
          "factor": "phosphate",
          "points": 0,
          "present": false
        },
        {
          "value": 24.0,
          "factor": "bicarbonate",
          "points": 0,
          "present": false
        }
      ],
      "age": 40,
      "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": "McMahon GM, Zeng X, Waikar SS",
        "doi": "10.1001/jamainternmed.2013.9774",
        "id": "mcmahon-2013",
        "pmid": "23939467",
        "source": "JAMA Intern Med. 2013;173(19):1821-1828",
        "title": "A risk prediction score for kidney failure or mortality in rhabdomyolysis"
      },
      "formula": "mcmahon",
      "formula_expression": "McMahon = age(≤50→0, >50–≤70→1.5, >70–≤80→2.5, >80→3) + female(1) + Cr_mg_dL(<1.4→0, 1.4–2.2→1.5, >2.2→3) + Ca_mg_dL(<7.5→2) + CPK_U_L(>40000→2) + origin_not_seizure_syncope_exercise_statin_myositis(3) + PO4_mg_dL(<4.0→0, 4.0–5.4→1.5, >5.4→3) + HCO3_mEq_L(<19→2); McMahon 2013 Table 3 derivation; max 19",
      "max_score": 19,
      "score": 0,
      "sex": "male",
      "creatinine_mg_dl": 1.0,
      "bicarbonate_mmol_l": 24.0,
      "calcium_mg_dl": 9.0,
      "cpk_u_l": 2.0e3,
      "low_risk_origin": true,
      "phosphate_mg_dl": 3.5
    },
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "value": "male",
          "factor": "female",
          "points": 0,
          "present": false
        },
        {
          "value": 1.0,
          "factor": "creatinine",
          "points": 0,
          "present": false
        },
        {
          "value": 9.0,
          "factor": "calcium",
          "points": 0,
          "present": false
        },
        {
          "value": 2.0e3,
          "factor": "cpk",
          "points": 0,
          "present": false
        },
        {
          "value": true,
          "factor": "origin",
          "points": 0,
          "present": false
        },
        {
          "value": 3.5,
          "factor": "phosphate",
          "points": 0,
          "present": false
        },
        {
          "value": 24.0,
          "factor": "bicarbonate",
          "points": 0,
          "present": false
        }
      ],
      "age": 40,
      "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": "McMahon GM, Zeng X, Waikar SS",
        "doi": "10.1001/jamainternmed.2013.9774",
        "id": "mcmahon-2013",
        "pmid": "23939467",
        "source": "JAMA Intern Med. 2013;173(19):1821-1828",
        "title": "A risk prediction score for kidney failure or mortality in rhabdomyolysis"
      },
      "formula": "mcmahon",
      "formula_expression": "McMahon = age(≤50→0, >50–≤70→1.5, >70–≤80→2.5, >80→3) + female(1) + Cr_mg_dL(<1.4→0, 1.4–2.2→1.5, >2.2→3) + Ca_mg_dL(<7.5→2) + CPK_U_L(>40000→2) + origin_not_seizure_syncope_exercise_statin_myositis(3) + PO4_mg_dL(<4.0→0, 4.0–5.4→1.5, >5.4→3) + HCO3_mEq_L(<19→2); McMahon 2013 Table 3 derivation; max 19",
      "max_score": 19,
      "score": 0,
      "sex": "male",
      "creatinine_mg_dl": 1.0,
      "bicarbonate_mmol_l": 24.0,
      "calcium_mg_dl": 9.0,
      "cpk_u_l": 2.0e3,
      "low_risk_origin": true,
      "phosphate_mg_dl": 3.5
    }
  ]
}

Response

Field Type Description
formula string mcmahon
formula_expression string Exact expression used
score number McMahon 2013 Table 3 points (half-points allowed; 0-19)
max_score integer Always 19 (sum of published maxima)
age integer Age used, years
sex string female or male
creatinine_mg_dl number Initial creatinine used, mg/dL
calcium_mg_dl number Initial calcium used, mg/dL
cpk_u_l number Initial CPK used, U/L
low_risk_origin boolean true when origin is seizure, syncope, exercise, statin, or myositis (0 origin points)
phosphate_mg_dl number Initial phosphate used, mg/dL
bicarbonate_mmol_l number Initial bicarbonate used, mEq/L
components array Per-factor points
citation object McMahon et al. JAMA Intern Med 2013 citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "components": [
    {
      "value": 40,
      "factor": "age",
      "points": 0,
      "present": false
    },
    {
      "value": "male",
      "factor": "female",
      "points": 0,
      "present": false
    },
    {
      "value": 1.0,
      "factor": "creatinine",
      "points": 0,
      "present": false
    },
    {
      "value": 9.0,
      "factor": "calcium",
      "points": 0,
      "present": false
    },
    {
      "value": 2.0e3,
      "factor": "cpk",
      "points": 0,
      "present": false
    },
    {
      "value": true,
      "factor": "origin",
      "points": 0,
      "present": false
    },
    {
      "value": 3.5,
      "factor": "phosphate",
      "points": 0,
      "present": false
    },
    {
      "value": 24.0,
      "factor": "bicarbonate",
      "points": 0,
      "present": false
    }
  ],
  "age": 40,
  "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": "McMahon GM, Zeng X, Waikar SS",
    "doi": "10.1001/jamainternmed.2013.9774",
    "id": "mcmahon-2013",
    "pmid": "23939467",
    "source": "JAMA Intern Med. 2013;173(19):1821-1828",
    "title": "A risk prediction score for kidney failure or mortality in rhabdomyolysis"
  },
  "formula": "mcmahon",
  "formula_expression": "McMahon = age(≤50→0, >50–≤70→1.5, >70–≤80→2.5, >80→3) + female(1) + Cr_mg_dL(<1.4→0, 1.4–2.2→1.5, >2.2→3) + Ca_mg_dL(<7.5→2) + CPK_U_L(>40000→2) + origin_not_seizure_syncope_exercise_statin_myositis(3) + PO4_mg_dL(<4.0→0, 4.0–5.4→1.5, >5.4→3) + HCO3_mEq_L(<19→2); McMahon 2013 Table 3 derivation; max 19",
  "max_score": 19,
  "score": 0,
  "sex": "male",
  "creatinine_mg_dl": 1.0,
  "bicarbonate_mmol_l": 24.0,
  "calcium_mg_dl": 9.0,
  "cpk_u_l": 2.0e3,
  "low_risk_origin": true,
  "phosphate_mg_dl": 3.5
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_age age must be an integer from 18 to 120 Returned before settlement; you are not charged.
400 invalid_sex sex must be female or male Returned before settlement; you are not charged.
400 invalid_creatinine creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.
400 invalid_calcium calcium_mg_dl (4-16) or calcium_mmol_l (1-4) is required Returned before settlement; you are not charged.
400 invalid_cpk cpk_u_l must be a number from 1 to 500000 (McMahon 2013). Returned before settlement; you are not charged.
400 invalid_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_phosphate phosphate_mg_dl must be a number from 0.5 to 20 (McMahon 2013). Returned before settlement; you are not charged.
400 invalid_bicarbonate bicarbonate_mmol_l must be a number from 2 to 45. Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • Cockcroft–Gault CrCl — Compute Cockcroft–Gault creatinine clearance in mL/min using total body weight.
  • FENa — Compute fractional excretion of sodium from plasma and urine sodium and creatinine using Espinel 1976.

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. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /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.