ACS · LIVE
AMI READMITS 30-day readmission score
READMITS
Sum the Nguyen 2018 first-day AMI READMITS predictors and return the integer score, Table 4 quintile, and mean predicted 30-day readmission percent.
Markdown: /docs/readmits.md · Canonical: https://magentlab.com/docs/readmits
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
- Authors
- Nguyen OK, Makam AN, Clark C, et al.
- Source
- J Am Heart Assoc. 2018;7(8):e008882
Worked example
Age 58 male, no first-day flags, PCI within 24 hours
Given:
age_years=58creatinine_gt_2=falsediabetes=falseelevated_bnp=falsepci_within_24h=truesbp_lt_100=falsesex=male
- 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
- 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=58creatinine_gt_2=truediabetes=trueelevated_bnp=truepci_within_24h=truesbp_lt_100=falsesex=male
- age decades 4 + creatinine_gt_2 6 + elevated_bnp 8 + diabetes 4
- 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
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/readmits?age_years=58&sex=male&creatinine_gt_2=false&elevated_bnp=false&diabetes=false&pci_within_24h=true&sbp_lt_100=false
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/readmits?age_years=58&sex=male&creatinine_gt_2=false&elevated_bnp=false&diabetes=false&pci_within_24h=true&sbp_lt_100=false"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
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, male | 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.
- 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_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"
}
]
}
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/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.",
"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%",
"age_years": 58,
"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.",
"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%",
"age_years": 58,
"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
| Field | Type | Description |
|---|---|---|
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
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"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.",
"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%",
"age_years": 58,
"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
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 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. |
| 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
- 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 — 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. 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.