Emergency · LIVE
NUTRIC (Nutrition Risk in the Critically Ill)
NUTRIC
Sum Heyland 2011 original 6-variable NUTRIC (Nutrition Risk in the Critically Ill) Table 4 overall points, including IL-6, and return whether the total is high nutrition risk (score ≥6).
Markdown: /docs/nutric.md · Canonical: https://magentlab.com/docs/nutric
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Sum Heyland 2011 original 6-variable NUTRIC (Nutrition Risk in the Critically Ill) Table 4 overall points, including IL-6, and return whether the total is high nutrition risk (score ≥6).
When to use
When an agent has caller-supplied age, APACHE II, SOFA, comorbidity count, hospital days to ICU, and IL-6 and needs the published original NUTRIC total and high-risk flag, not a feeding order, and not Rahman 2015 mNUTRIC.
When not to use
- Not a medical device.
- Not a feeding order or nutrition-therapy prescription.
- Heyland 2011 original 6-variable NUTRIC including IL-6 (Table 4 overall). high_risk is true iff score ≥ 6. This is not Rahman 2015 mNUTRIC (IL-6 omitted; do not use the 5–9 cutoff).
- magent does not compute APACHE II or SOFA; the caller supplies those integers. APACHE II 28 scores 2 (the 20–28 row, not the overlapping ≥28 row).
Formula
NUTRIC = age (0–2) + apache_ii (0–3) + sofa (0–2) + comorbidities (0–1) + hospital_days_to_icu (0–1) + il6_pg_ml (0–1); Heyland 2011 Table 4 overall including IL-6; max 10; high_risk if score ≥ 6
Citation
- Authors
- Heyland DK, Dhaliwal R, Jiang X, Day AG
- Source
- Crit Care. 2011;15(6):R268
- DOI
- 10.1186/cc10546
Worked example
All zero bands, age 40
Given:
age=40apache_ii=10comorbidities=0hospital_days_to_icu=0il6_pg_ml=100sofa=4
- age 40 <50 → 0; apache_ii 10 <15 → 0; sofa 4 <6 → 0
- comorbidities 0 → 0; hospital_days_to_icu 0 → 0; il6_pg_ml 100 <400 → 0
- Score = 0 (max 10); high_risk false
Age 75, APACHE II 20, SOFA 10 at the high-risk cutoff
Given:
age=75apache_ii=20comorbidities=0hospital_days_to_icu=0il6_pg_ml=100sofa=10
- age ≥75 → 2; apache_ii 20–28 → 2; sofa ≥10 → 2
- comorbidities, hospital days, and IL-6 stay 0
- Score = 6 (max 10); high_risk true
Also searched as
- NUTRIC
- Nutrition Risk in the Critically Ill
- Heyland NUTRIC
- NUTRIC score
- nutrition risk critically ill
- NUTRIC IL-6
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
/api/calc/nutric?age=40&apache_ii=10&sofa=4&comorbidities=0&hospital_days_to_icu=0&il6_pg_ml=100
Full URL: https://api.magentlab.com/api/calc/nutric?age=40&apache_ii=10&sofa=4&comorbidities=0&hospital_days_to_icu=0&il6_pg_ml=100
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/nutric?age=40&apache_ii=10&sofa=4&comorbidities=0&hospital_days_to_icu=0&il6_pg_ml=100"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
age |
integer | required | Age in years (18-120). Heyland 2011 Table 4 overall: <50 → 0; 50–<75 → 1; ≥75 → 2. Age 50 scores 1. Age 74 scores 1. Age 75 scores 2. |
apache_ii |
integer | required | Caller-supplied APACHE II total (integer 0-71). Heyland 2011 Table 4 overall: <15 → 0; 15–<20 → 1; 20–28 inclusive → 2; ≥29 → 3. APACHE II 28 scores 2 (the 20–28 row, not the overlapping ≥28 row). magent does not compute APACHE II. |
sofa |
integer | required | Caller-supplied SOFA total (integer 0-24). Heyland 2011 Table 4 overall: <6 → 0; 6–<10 → 1; ≥10 → 2. magent does not compute SOFA. |
comorbidities |
integer | required | Number of comorbidities (integer 0-20). Heyland 2011 Table 4 overall: 0–1 → 0; ≥2 → 1. |
hospital_days_to_icu |
number | required | Days from hospital admission to ICU admission (0-365). Heyland 2011 Table 4 overall: 0–<1 → 0; ≥1 → 1. 0.9 scores 0. 1.0 scores 1. |
il6_pg_ml |
number | required | Serum IL-6 in pg/mL (0-100000). Heyland 2011 Table 4 overall original 6-variable NUTRIC: 0–<400 → 0; ≥400 → 1. 399.9 scores 0. 400 scores 1. This is not Rahman 2015 mNUTRIC (IL-6 omitted). |
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": "40",
"apache_ii": "10",
"comorbidities": "0",
"hospital_days_to_icu": "0",
"il6_pg_ml": "100",
"sofa": "4"
},
{
"age": "40",
"apache_ii": "10",
"comorbidities": "0",
"hospital_days_to_icu": "0",
"il6_pg_ml": "100",
"sofa": "4"
}
]
}
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/nutric",
"items": [
{
"components": [
{
"value": 40,
"factor": "age",
"points": 0,
"present": false
},
{
"value": 10,
"factor": "apache_ii",
"points": 0,
"present": false
},
{
"value": 4,
"factor": "sofa",
"points": 0,
"present": false
},
{
"value": 0,
"factor": "comorbidities",
"points": 0,
"present": false
},
{
"value": 0.0,
"factor": "hospital_days_to_icu",
"points": 0,
"present": false
},
{
"value": 100.0,
"factor": "il6_pg_ml",
"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": "Heyland DK, Dhaliwal R, Jiang X, Day AG",
"doi": "10.1186/cc10546",
"id": "heyland-2011",
"pmid": "22085762",
"source": "Crit Care. 2011;15(6):R268",
"title": "Identifying critically ill patients who benefit the most from nutrition therapy: the development and initial validation of a novel risk assessment tool"
},
"formula": "nutric",
"formula_expression": "NUTRIC = age (0–2) + apache_ii (0–3) + sofa (0–2) + comorbidities (0–1) + hospital_days_to_icu (0–1) + il6_pg_ml (0–1); Heyland 2011 Table 4 overall including IL-6; max 10; high_risk if score ≥ 6",
"age_years": 40,
"max_score": 10,
"score": 0,
"high_risk": false,
"apache_ii": 10,
"comorbidities": 0,
"hospital_days_to_icu": 0.0,
"il6_pg_ml": 100.0,
"sofa": 4
},
{
"components": [
{
"value": 40,
"factor": "age",
"points": 0,
"present": false
},
{
"value": 10,
"factor": "apache_ii",
"points": 0,
"present": false
},
{
"value": 4,
"factor": "sofa",
"points": 0,
"present": false
},
{
"value": 0,
"factor": "comorbidities",
"points": 0,
"present": false
},
{
"value": 0.0,
"factor": "hospital_days_to_icu",
"points": 0,
"present": false
},
{
"value": 100.0,
"factor": "il6_pg_ml",
"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": "Heyland DK, Dhaliwal R, Jiang X, Day AG",
"doi": "10.1186/cc10546",
"id": "heyland-2011",
"pmid": "22085762",
"source": "Crit Care. 2011;15(6):R268",
"title": "Identifying critically ill patients who benefit the most from nutrition therapy: the development and initial validation of a novel risk assessment tool"
},
"formula": "nutric",
"formula_expression": "NUTRIC = age (0–2) + apache_ii (0–3) + sofa (0–2) + comorbidities (0–1) + hospital_days_to_icu (0–1) + il6_pg_ml (0–1); Heyland 2011 Table 4 overall including IL-6; max 10; high_risk if score ≥ 6",
"age_years": 40,
"max_score": 10,
"score": 0,
"high_risk": false,
"apache_ii": 10,
"comorbidities": 0,
"hospital_days_to_icu": 0.0,
"il6_pg_ml": 100.0,
"sofa": 4
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | nutric |
formula_expression |
string | Exact expression used |
score |
integer | NUTRIC points 0-10 |
max_score |
integer | 10 |
high_risk |
boolean | true iff score ≥ 6 (Heyland 2011 original 6-variable NUTRIC with IL-6). Not a feeding order. Not the Rahman 2015 mNUTRIC 5–9 cutoff. |
age_years |
integer | Age used for the 0–2 age points |
apache_ii |
integer | Caller-supplied APACHE II total used for the 0–3 points |
sofa |
integer | Caller-supplied SOFA total used for the 0–2 points |
comorbidities |
integer | Comorbidity count used for the 0–1 points |
hospital_days_to_icu |
number | Hospital days to ICU used for the 0–1 points |
il6_pg_ml |
number | IL-6 pg/mL used for the 0–1 points |
components |
array | Per-item Heyland 2011 Table 4 overall points |
citation |
object | Heyland et al. Crit Care 2011 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": 10,
"factor": "apache_ii",
"points": 0,
"present": false
},
{
"value": 4,
"factor": "sofa",
"points": 0,
"present": false
},
{
"value": 0,
"factor": "comorbidities",
"points": 0,
"present": false
},
{
"value": 0.0,
"factor": "hospital_days_to_icu",
"points": 0,
"present": false
},
{
"value": 100.0,
"factor": "il6_pg_ml",
"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": "Heyland DK, Dhaliwal R, Jiang X, Day AG",
"doi": "10.1186/cc10546",
"id": "heyland-2011",
"pmid": "22085762",
"source": "Crit Care. 2011;15(6):R268",
"title": "Identifying critically ill patients who benefit the most from nutrition therapy: the development and initial validation of a novel risk assessment tool"
},
"formula": "nutric",
"formula_expression": "NUTRIC = age (0–2) + apache_ii (0–3) + sofa (0–2) + comorbidities (0–1) + hospital_days_to_icu (0–1) + il6_pg_ml (0–1); Heyland 2011 Table 4 overall including IL-6; max 10; high_risk if score ≥ 6",
"age_years": 40,
"max_score": 10,
"score": 0,
"high_risk": false,
"apache_ii": 10,
"comorbidities": 0,
"hospital_days_to_icu": 0.0,
"il6_pg_ml": 100.0,
"sofa": 4
}
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_apache_ii |
apache_ii must be an integer from 0 to 71 (Heyland 2011 NUTRIC). Returned before settlement; you are not charged. |
| 400 | invalid_sofa_total |
sofa must be an integer from 0 to 24 (Heyland 2011 NUTRIC). Returned before settlement; you are not charged. |
| 400 | invalid_comorbidity_count |
comorbidities must be an integer from 0 to 20 (Heyland 2011 NUTRIC). Returned before settlement; you are not charged. |
| 400 | invalid_hospital_days |
hospital_days_to_icu must be a number from 0 to 365 (Heyland 2011 NUTRIC). Returned before settlement; you are not charged. |
| 400 | invalid_il6 |
il6_pg_ml must be a number from 0 to 100000 (Heyland 2011 NUTRIC). 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
- NRS-2002 — Sum Kondrup 2003 NRS-2002 impaired nutritional status (0–3), disease severity (0–3), and 1 if age ≥70, and return whether the total is at nutritional risk (score ≥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. 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.