# Mehran CIN risk score after PCI

Mehran CIN risk score

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

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

## What it computes

Sum the Mehran 2004 eGFR model B integer score for contrast-induced nephropathy after PCI and return low (≤5), moderate (6–10), high (11–15), or very_high (≥16) with the development-set CIN percent.

## When to use

When an agent already has caller-assigned hypotension, IABP, CHF, anemia, diabetes, contrast volume, and eGFR and needs the published Mehran 2004 point total. magent does not measure contrast or compute eGFR. Not a CKD diagnosis.

## When not to use

- Not a medical device and not a CKD diagnosis or a diagnosis of contrast-induced nephropathy.
- magent does not measure contrast. contrast_ml is a caller-supplied integer (10-1000).
- egfr_ml_min is caller-assigned. magent does not compute eGFR and does not implement race-based MDRD.
- This is Mehran 2004 Table 3 model B (eGFR bands) only. Serum creatinine >1.5 is the alternate model A and is not added; that would double-count.
- Hypotension (SBP <80 mm Hg ≥1 h requiring inotropes or IABP within 24 h), IABP, CHF (NYHA III/IV and/or pulmonary edema), anemia (WHO hematocrit), and diabetes are caller-assigned flags. magent does not examine the patient or assay hematocrit.
- Risk groups are ≤5 / 6–10 / 11–15 / ≥16. Score 16 is very_high. CIN percents are the development-set four-group rates (7.5 / 14.0 / 26.1 / 57.3). Dialysis and one-year mortality are separate figures and are not returned.

## Formula

```
Mehran 2004 model B = hypotension(5) + iabp(5) + chf(5) + age>75(4) + anemia(3) + diabetes(3) + floor(contrast_ml/100) + eGFR (>=60: 0, 40 to <60: 2, 20 to <40: 4, <20: 6); max 41 with contrast_ml 10-1000; risk_group low <=5, moderate 6-10, high 11-15, very_high >=16; development CIN 7.5% / 14.0% / 26.1% / 57.3%
```

## Citation

[A simple risk score for prediction of contrast-induced nephropathy after percutaneous coronary intervention: development and initial validation](https://doi.org/10.1016/j.jacc.2004.06.068)
Mehran R, Aymong ED, Nikolsky E, et al.
J Am Coll Cardiol. 2004;44(7):1393-1399
DOI: [10.1016/j.jacc.2004.06.068](https://doi.org/10.1016/j.jacc.2004.06.068)

## Worked example

### Age 60, no flags, 100 mL contrast, eGFR 90

Given: `age=60, anemia=false, chf=false, contrast_ml=100, diabetes=false, egfr_ml_min=90, hypotension=false, iabp=false`

1. No hypotension, IABP, CHF, anemia, or diabetes → 0; age 60 is not >75 → 0
2. contrast_ml 100 → floor(100/100) = 1; eGFR 90 ≥60 → 0
3. Score = 1 (max 41); risk_group = low; development CIN 7.5%


## Also searched as

- Mehran score
- Mehran CIN score
- contrast-induced nephropathy risk
- Mehran 2004
- CIN risk score PCI
- contrast nephropathy score
- Mehran eGFR model

## Parameters

- `age` (integer, required): Age in years (18-120). Age >75 scores 4 (Mehran 2004 Table 3 model B). Age 75 scores 0.
- `hypotension` (boolean, required): Hypotension as assigned by the caller: SBP <80 mm Hg for ≥1 h requiring inotropes or IABP within 24 h (Mehran 2004). true scores 5. true or false. magent does not measure blood pressure.
- `iabp` (boolean, required): Intra-aortic balloon pump use as assigned by the caller (Mehran 2004 Table 3). true scores 5. Independent of the hypotension flag. true or false.
- `chf` (boolean, required): CHF as assigned by the caller: NYHA III/IV and/or pulmonary edema (Mehran 2004). true scores 5. true or false. magent does not examine the patient.
- `anemia` (boolean, required): Anemia as assigned by the caller using WHO hematocrit <39% (men) or <36% (women) (Mehran 2004). true scores 3. Flag only; do not send a hematocrit number. magent does not assay hematocrit.
- `diabetes` (boolean, required): Diabetes mellitus as assigned by the caller (Mehran 2004 Table 3). true scores 3. true or false.
- `contrast_ml` (integer, required): Contrast volume in mL (integer 10-1000). Scores 1 per 100 mL: floor(contrast_ml/100) (Mehran 2004). 100 scores 1; 199 scores 1; 200 scores 2. magent does not measure contrast.
- `egfr_ml_min` (number, required): Caller-assigned eGFR in mL/min/1.73m² (5-150). Mehran 2004 Table 3 model B: ≥60 scores 0; 40 to <60 scores 2; 20 to <40 scores 4; <20 scores 6. magent does not compute eGFR and does not use race-based MDRD. Do not send serum creatinine; creatinine >1.5 is the alternate model A and would double-count.

## 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/mehran`
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": [
    {
      "age": "60",
      "anemia": "false",
      "chf": "false",
      "contrast_ml": "100",
      "diabetes": "false",
      "egfr_ml_min": "90",
      "hypotension": "false",
      "iabp": "false"
    },
    {
      "age": "60",
      "anemia": "false",
      "chf": "false",
      "contrast_ml": "100",
      "diabetes": "false",
      "egfr_ml_min": "90",
      "hypotension": "false",
      "iabp": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/mehran",
  "items": [
    {
      "components": [
        {
          "factor": "hypotension",
          "points": 0,
          "present": false
        },
        {
          "factor": "iabp",
          "points": 0,
          "present": false
        },
        {
          "factor": "chf",
          "points": 0,
          "present": false
        },
        {
          "value": 60,
          "factor": "age_gt_75",
          "points": 0,
          "present": false
        },
        {
          "factor": "anemia",
          "points": 0,
          "present": false
        },
        {
          "factor": "diabetes",
          "points": 0,
          "present": false
        },
        {
          "value": 100,
          "factor": "contrast_ml",
          "points": 1,
          "present": true
        },
        {
          "value": 90.0,
          "factor": "egfr_ml_min",
          "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": "Mehran R, Aymong ED, Nikolsky E, et al.",
        "doi": "10.1016/j.jacc.2004.06.068",
        "id": "mehran-2004",
        "pmid": "15464318",
        "source": "J Am Coll Cardiol. 2004;44(7):1393-1399",
        "title": "A simple risk score for prediction of contrast-induced nephropathy after percutaneous coronary intervention: development and initial validation"
      },
      "formula": "mehran",
      "formula_expression": "Mehran 2004 model B = hypotension(5) + iabp(5) + chf(5) + age>75(4) + anemia(3) + diabetes(3) + floor(contrast_ml/100) + eGFR (>=60: 0, 40 to <60: 2, 20 to <40: 4, <20: 6); max 41 with contrast_ml 10-1000; risk_group low <=5, moderate 6-10, high 11-15, very_high >=16; development CIN 7.5% / 14.0% / 26.1% / 57.3%",
      "age_years": 60,
      "max_score": 41,
      "score": 1,
      "anemia": false,
      "diabetes": false,
      "risk_group": "low",
      "chf": false,
      "cin_percent": 7.5,
      "contrast_ml": 100,
      "egfr_ml_min": 90.0,
      "hypotension": false,
      "iabp": false
    },
    {
      "components": [
        {
          "factor": "hypotension",
          "points": 0,
          "present": false
        },
        {
          "factor": "iabp",
          "points": 0,
          "present": false
        },
        {
          "factor": "chf",
          "points": 0,
          "present": false
        },
        {
          "value": 60,
          "factor": "age_gt_75",
          "points": 0,
          "present": false
        },
        {
          "factor": "anemia",
          "points": 0,
          "present": false
        },
        {
          "factor": "diabetes",
          "points": 0,
          "present": false
        },
        {
          "value": 100,
          "factor": "contrast_ml",
          "points": 1,
          "present": true
        },
        {
          "value": 90.0,
          "factor": "egfr_ml_min",
          "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": "Mehran R, Aymong ED, Nikolsky E, et al.",
        "doi": "10.1016/j.jacc.2004.06.068",
        "id": "mehran-2004",
        "pmid": "15464318",
        "source": "J Am Coll Cardiol. 2004;44(7):1393-1399",
        "title": "A simple risk score for prediction of contrast-induced nephropathy after percutaneous coronary intervention: development and initial validation"
      },
      "formula": "mehran",
      "formula_expression": "Mehran 2004 model B = hypotension(5) + iabp(5) + chf(5) + age>75(4) + anemia(3) + diabetes(3) + floor(contrast_ml/100) + eGFR (>=60: 0, 40 to <60: 2, 20 to <40: 4, <20: 6); max 41 with contrast_ml 10-1000; risk_group low <=5, moderate 6-10, high 11-15, very_high >=16; development CIN 7.5% / 14.0% / 26.1% / 57.3%",
      "age_years": 60,
      "max_score": 41,
      "score": 1,
      "anemia": false,
      "diabetes": false,
      "risk_group": "low",
      "chf": false,
      "cin_percent": 7.5,
      "contrast_ml": 100,
      "egfr_ml_min": 90.0,
      "hypotension": false,
      "iabp": false
    }
  ]
}
```

## Response fields

- `formula` (string): mehran
- `formula_expression` (string): Mehran 2004 Table 3 eGFR model B integer score
- `score` (integer): Mehran points (max 41 with contrast_ml 10-1000)
- `max_score` (integer): Always 41 (5+5+5+4+3+3+10+6) with the magent contrast_ml clamp
- `risk_group` (string): low (≤5), moderate (6-10), high (11-15), or very_high (≥16). Mehran 2004 development-set four groups. Score 16 is very_high, not high. Not a CKD or CIN diagnosis.
- `cin_percent` (number): Development-set CIN percent for the risk group: 7.5, 14.0, 26.1, or 57.3 (Mehran 2004). Not a dialysis or mortality percent.
- `age_years` (integer): Age used for the >75 criterion
- `hypotension` (boolean): Caller-assigned hypotension flag used
- `iabp` (boolean): Caller-assigned IABP flag used
- `chf` (boolean): Caller-assigned CHF (NYHA III/IV and/or pulmonary edema) flag used
- `anemia` (boolean): Caller-assigned WHO anemia flag used
- `diabetes` (boolean): Caller-assigned diabetes flag used
- `contrast_ml` (integer): Contrast volume in mL used for floor(contrast_ml/100)
- `egfr_ml_min` (number): Caller-assigned eGFR in mL/min/1.73m² used for the model B band
- `components` (array): Per-factor Mehran 2004 points
- `citation` (object): Mehran 2004 JACC citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "hypotension",
      "points": 0,
      "present": false
    },
    {
      "factor": "iabp",
      "points": 0,
      "present": false
    },
    {
      "factor": "chf",
      "points": 0,
      "present": false
    },
    {
      "value": 60,
      "factor": "age_gt_75",
      "points": 0,
      "present": false
    },
    {
      "factor": "anemia",
      "points": 0,
      "present": false
    },
    {
      "factor": "diabetes",
      "points": 0,
      "present": false
    },
    {
      "value": 100,
      "factor": "contrast_ml",
      "points": 1,
      "present": true
    },
    {
      "value": 90.0,
      "factor": "egfr_ml_min",
      "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": "Mehran R, Aymong ED, Nikolsky E, et al.",
    "doi": "10.1016/j.jacc.2004.06.068",
    "id": "mehran-2004",
    "pmid": "15464318",
    "source": "J Am Coll Cardiol. 2004;44(7):1393-1399",
    "title": "A simple risk score for prediction of contrast-induced nephropathy after percutaneous coronary intervention: development and initial validation"
  },
  "formula": "mehran",
  "formula_expression": "Mehran 2004 model B = hypotension(5) + iabp(5) + chf(5) + age>75(4) + anemia(3) + diabetes(3) + floor(contrast_ml/100) + eGFR (>=60: 0, 40 to <60: 2, 20 to <40: 4, <20: 6); max 41 with contrast_ml 10-1000; risk_group low <=5, moderate 6-10, high 11-15, very_high >=16; development CIN 7.5% / 14.0% / 26.1% / 57.3%",
  "age_years": 60,
  "max_score": 41,
  "score": 1,
  "anemia": false,
  "diabetes": false,
  "risk_group": "low",
  "chf": false,
  "cin_percent": 7.5,
  "contrast_ml": 100,
  "egfr_ml_min": 90.0,
  "hypotension": false,
  "iabp": false
}
```

## Errors

- HTTP 400 `invalid_mehran`: contrast_ml 10-1000 and egfr_ml_min 5-150 (Mehran 2004; magent clamps). Returned before settlement; you are not charged.
- HTTP 400 `invalid_age`: age must be an integer from 18 to 120 Returned before settlement; you are not charged.
- HTTP 400 `invalid_flag`: boolean clinical flags must be true or false 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

- [AKIN](https://magentlab.com/docs/akin) — Apply Mehta 2007 Table 2 AKIN staging and return stage 0-3 as the worse of the creatinine and urine-output limbs, with initiated renal replacement therapy mapping to stage 3.

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