# AMI READMITS 30-day readmission score

READMITS

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

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

## What it computes

Sum the Nguyen 2018 first-day AMI READMITS predictors and return the integer score, Table 4 quintile, and mean predicted 30-day readmission percent.

## When to use

When an agent needs the published first-day AMI READMITS point total within 24 hours of AMI admission and must not invent a PCI, reperfusion, or discharge order, or the full-stay model.

## When not to use

- Not a medical device and not a PCI, reperfusion, or discharge order. magent does not assay creatinine or natriuretic peptides, take blood pressure, or examine the patient.
- First-day AMI READMITS only (Nguyen 2018 Table 2). Does not include the full-stay model's intravenous diuretics, discharge anemia, or post-acute care.
- Sex is the published nonmale/female item (female scores 2). Not race.
- Quintile percents are Table 4 mean predicted 30-day readmission risk (3/7/11/16/35%), not an individual measured rate.
- Creatinine >2 mg/dL, elevated BNP or NT-proBNP, PCI within 24 hours, and SBP <100 mm Hg are caller-assigned booleans. magent does not convert units or read timestamps.

## Formula

```
READMITS = creatinine_gt_2 (6) + elevated_bnp (8) + floor((age_years-18)/10) (1 per decade >18) + diabetes (4) + female (2) + no_pci_within_24h (1) + sbp_lt_100 (3); Nguyen 2018 first-day AMI READMITS Table 2; max 32 at age 100; Table 4 quintiles <=13 extremely_low 3%, 14-15 low 7%, 16-17 moderate 11%, 18-19 high 16%, >=20 extremely_high 35%
```

## Citation

[Predicting 30-Day Hospital Readmissions in Acute Myocardial Infarction: The AMI "READMITS" (Renal Function, Elevated Brain Natriuretic Peptide, Age, Diabetes Mellitus, Nonmale Sex, Intervention with Timely Percutaneous Coronary Intervention, and Low Systolic Blood Pressure) Score](https://doi.org/10.1161/JAHA.118.008882)
Nguyen OK, Makam AN, Clark C, et al.
J Am Heart Assoc. 2018;7(8):e008882
DOI: [10.1161/JAHA.118.008882](https://doi.org/10.1161/JAHA.118.008882)

## Worked example

### Age 58 male, no first-day flags, PCI within 24 hours

Given: `age_years=58, creatinine_gt_2=false, diabetes=false, elevated_bnp=false, pci_within_24h=true, sbp_lt_100=false, sex=male`

1. age_years 58 -> floor((58-18)/10) = 4; male -> 0; creatinine_gt_2 false -> 0; elevated_bnp false -> 0; diabetes false -> 0; pci_within_24h true -> 0; sbp_lt_100 false -> 0
2. score = 4 (max 32); quintile extremely_low; Table 4 mean predicted 3%


### Age 58 male, creatinine, elevated BNP, and diabetes (score 20 or more)

Given: `age_years=58, creatinine_gt_2=true, diabetes=true, elevated_bnp=true, pci_within_24h=true, sbp_lt_100=false, sex=male`

1. age decades 4 + creatinine_gt_2 6 + elevated_bnp 8 + diabetes 4
2. score = 22 (max 32); quintile extremely_high; Table 4 mean predicted 35%


## Also searched as

- AMI READMITS
- Nguyen 2018 READMITS
- 30-day AMI readmission score
- first-day READMITS
- AMI creatinine BNP readmission
- READMITS quintile
- Nguyen AMI readmission
- timely PCI READMITS

## Parameters

- `age_years` (integer, required): Age in years (18-100). Nguyen 2018: 1 point per decade over 18, floor((age_years-18)/10).
- `sex` (string, required): female or male (Nguyen 2018 nonmale sex). Female scores 2. Male scores 0. A published sex item, not race.
- `creatinine_gt_2` (boolean, required): Whether serum creatinine was >2 mg/dL within the first 24 hours (Nguyen 2018: 6 points). Caller-assigned. magent does not assay creatinine.
- `elevated_bnp` (boolean, required): Whether BNP was >=50 pg/mL or NT-proBNP was >=125 pg/mL within the first 24 hours (Nguyen 2018: 8 points). Caller-assigned. magent does not assay natriuretic peptides.
- `diabetes` (boolean, required): Diabetes mellitus history (Nguyen 2018: 4 points). true or false.
- `pci_within_24h` (boolean, required): Whether PCI occurred within the first 24 hours (Nguyen 2018: false scores 1; true scores 0). Caller-assigned. magent does not read timestamps or the angiogram.
- `sbp_lt_100` (boolean, required): Whether systolic blood pressure was <100 mm Hg within the first 24 hours (Nguyen 2018: 3 points). Caller-assigned boolean; magent does not take an SBP number.

## 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/readmits`
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_years": "58",
      "creatinine_gt_2": "false",
      "diabetes": "false",
      "elevated_bnp": "false",
      "pci_within_24h": "true",
      "sbp_lt_100": "false",
      "sex": "male"
    },
    {
      "age_years": "58",
      "creatinine_gt_2": "false",
      "diabetes": "false",
      "elevated_bnp": "false",
      "pci_within_24h": "true",
      "sbp_lt_100": "false",
      "sex": "male"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/readmits",
  "items": [
    {
      "components": [
        {
          "factor": "creatinine_gt_2",
          "points": 0,
          "present": false
        },
        {
          "factor": "elevated_bnp",
          "points": 0,
          "present": false
        },
        {
          "value": 58,
          "factor": "age_years",
          "points": 4,
          "present": true
        },
        {
          "factor": "diabetes",
          "points": 0,
          "present": false
        },
        {
          "value": "male",
          "factor": "sex",
          "points": 0,
          "present": false
        },
        {
          "factor": "no_pci_within_24h",
          "points": 0,
          "present": false
        },
        {
          "factor": "sbp_lt_100",
          "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.",
      "age_years": 58,
      "citation": {
        "authors": "Nguyen OK, Makam AN, Clark C, et al.",
        "doi": "10.1161/JAHA.118.008882",
        "id": "nguyen-2018",
        "pmid": "29666144",
        "source": "J Am Heart Assoc. 2018;7(8):e008882",
        "title": "Predicting 30-Day Hospital Readmissions in Acute Myocardial Infarction: The AMI \"READMITS\" (Renal Function, Elevated Brain Natriuretic Peptide, Age, Diabetes Mellitus, Nonmale Sex, Intervention with Timely Percutaneous Coronary Intervention, and Low Systolic Blood Pressure) Score"
      },
      "formula": "readmits",
      "formula_expression": "READMITS = creatinine_gt_2 (6) + elevated_bnp (8) + floor((age_years-18)/10) (1 per decade >18) + diabetes (4) + female (2) + no_pci_within_24h (1) + sbp_lt_100 (3); Nguyen 2018 first-day AMI READMITS Table 2; max 32 at age 100; Table 4 quintiles <=13 extremely_low 3%, 14-15 low 7%, 16-17 moderate 11%, 18-19 high 16%, >=20 extremely_high 35%",
      "max_score": 32,
      "score": 4,
      "sex": "male",
      "diabetes": false,
      "age_decades": 4,
      "creatinine_gt_2": false,
      "elevated_bnp": false,
      "pci_within_24h": true,
      "predicted_readmission_percent": 3,
      "quintile": "extremely_low",
      "sbp_lt_100": false
    },
    {
      "components": [
        {
          "factor": "creatinine_gt_2",
          "points": 0,
          "present": false
        },
        {
          "factor": "elevated_bnp",
          "points": 0,
          "present": false
        },
        {
          "value": 58,
          "factor": "age_years",
          "points": 4,
          "present": true
        },
        {
          "factor": "diabetes",
          "points": 0,
          "present": false
        },
        {
          "value": "male",
          "factor": "sex",
          "points": 0,
          "present": false
        },
        {
          "factor": "no_pci_within_24h",
          "points": 0,
          "present": false
        },
        {
          "factor": "sbp_lt_100",
          "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.",
      "age_years": 58,
      "citation": {
        "authors": "Nguyen OK, Makam AN, Clark C, et al.",
        "doi": "10.1161/JAHA.118.008882",
        "id": "nguyen-2018",
        "pmid": "29666144",
        "source": "J Am Heart Assoc. 2018;7(8):e008882",
        "title": "Predicting 30-Day Hospital Readmissions in Acute Myocardial Infarction: The AMI \"READMITS\" (Renal Function, Elevated Brain Natriuretic Peptide, Age, Diabetes Mellitus, Nonmale Sex, Intervention with Timely Percutaneous Coronary Intervention, and Low Systolic Blood Pressure) Score"
      },
      "formula": "readmits",
      "formula_expression": "READMITS = creatinine_gt_2 (6) + elevated_bnp (8) + floor((age_years-18)/10) (1 per decade >18) + diabetes (4) + female (2) + no_pci_within_24h (1) + sbp_lt_100 (3); Nguyen 2018 first-day AMI READMITS Table 2; max 32 at age 100; Table 4 quintiles <=13 extremely_low 3%, 14-15 low 7%, 16-17 moderate 11%, 18-19 high 16%, >=20 extremely_high 35%",
      "max_score": 32,
      "score": 4,
      "sex": "male",
      "diabetes": false,
      "age_decades": 4,
      "creatinine_gt_2": false,
      "elevated_bnp": false,
      "pci_within_24h": true,
      "predicted_readmission_percent": 3,
      "quintile": "extremely_low",
      "sbp_lt_100": false
    }
  ]
}
```

## Response fields

- `formula` (string): readmits
- `formula_expression` (string): Exact expression used
- `score` (integer): First-day READMITS points; 0-32 at the age 18-100 clamp
- `max_score` (integer): 32 (age 100 plus all other items)
- `quintile` (string): Nguyen 2018 Table 4: extremely_low (<=13), low (14-15), moderate (16-17), high (18-19), or extremely_high (>=20)
- `predicted_readmission_percent` (integer): Table 4 mean predicted 30-day readmission percent: 3, 7, 11, 16, or 35
- `age_years` (integer): Age in years used
- `age_decades` (integer): floor((age_years-18)/10) points from age
- `sex` (string): female or male used
- `creatinine_gt_2` (boolean): Caller-assigned creatinine >2 mg/dL flag
- `elevated_bnp` (boolean): Caller-assigned elevated BNP or NT-proBNP flag
- `diabetes` (boolean): Caller-assigned diabetes history flag
- `pci_within_24h` (boolean): Caller-assigned PCI within 24 hours flag
- `sbp_lt_100` (boolean): Caller-assigned SBP <100 mm Hg flag
- `components` (array): Per-factor points
- `citation` (object): Nguyen et al. J Am Heart Assoc 2018 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "creatinine_gt_2",
      "points": 0,
      "present": false
    },
    {
      "factor": "elevated_bnp",
      "points": 0,
      "present": false
    },
    {
      "value": 58,
      "factor": "age_years",
      "points": 4,
      "present": true
    },
    {
      "factor": "diabetes",
      "points": 0,
      "present": false
    },
    {
      "value": "male",
      "factor": "sex",
      "points": 0,
      "present": false
    },
    {
      "factor": "no_pci_within_24h",
      "points": 0,
      "present": false
    },
    {
      "factor": "sbp_lt_100",
      "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.",
  "age_years": 58,
  "citation": {
    "authors": "Nguyen OK, Makam AN, Clark C, et al.",
    "doi": "10.1161/JAHA.118.008882",
    "id": "nguyen-2018",
    "pmid": "29666144",
    "source": "J Am Heart Assoc. 2018;7(8):e008882",
    "title": "Predicting 30-Day Hospital Readmissions in Acute Myocardial Infarction: The AMI \"READMITS\" (Renal Function, Elevated Brain Natriuretic Peptide, Age, Diabetes Mellitus, Nonmale Sex, Intervention with Timely Percutaneous Coronary Intervention, and Low Systolic Blood Pressure) Score"
  },
  "formula": "readmits",
  "formula_expression": "READMITS = creatinine_gt_2 (6) + elevated_bnp (8) + floor((age_years-18)/10) (1 per decade >18) + diabetes (4) + female (2) + no_pci_within_24h (1) + sbp_lt_100 (3); Nguyen 2018 first-day AMI READMITS Table 2; max 32 at age 100; Table 4 quintiles <=13 extremely_low 3%, 14-15 low 7%, 16-17 moderate 11%, 18-19 high 16%, >=20 extremely_high 35%",
  "max_score": 32,
  "score": 4,
  "sex": "male",
  "diabetes": false,
  "age_decades": 4,
  "creatinine_gt_2": false,
  "elevated_bnp": false,
  "pci_within_24h": true,
  "predicted_readmission_percent": 3,
  "quintile": "extremely_low",
  "sbp_lt_100": false
}
```

## Errors

- HTTP 400 `invalid_readmits`: READMITS needs Nguyen 2018 first-day creatinine, natriuretic peptide, age, diabetes, sex, PCI, and systolic BP in published ranges. 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

- [Killip](https://magentlab.com/docs/killip) — Return the Killip and Kimball 1967 myocardial-infarction heart-failure class 1-4 from a caller-assigned integer, with the published class description and 1967 CCU hospital mortality.
- [ORBI](https://magentlab.com/docs/orbi) — Sum the Auffret 2018 ORBI predictors after STEMI primary PCI and return the integer score (0-36), class I-IV, and derivation-cohort in-hospital cardiogenic-shock percent.

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