MAGENT

Respiratory · LIVE

du Bois IPF score

du Bois IPF

Sum du Bois 2011 Table 4 points from age, 24-week respiratory hospitalization, FVC percent predicted, and 24-week change in FVC percent predicted (abbreviated four-predictor model).

LIVE $0.005 USDC GET /api/calc/du_bois

Markdown: /docs/du-bois.md · Canonical: https://magentlab.com/docs/du-bois

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

What it computes

Sum du Bois 2011 Table 4 points from age, 24-week respiratory hospitalization, FVC percent predicted, and 24-week change in FVC percent predicted (abbreviated four-predictor model).

When to use

When an agent needs the published du Bois 2011 four-predictor IPF point total and must not invent a 1-year mortality percent, a GAP stage, or a transplant listing.

When not to use

  • Not a medical device and not a transplant listing protocol. Returns the published du Bois 2011 Table 4 point total only; Table 4 expected 1-year risk percents have gaps and are not interpolated.
  • Not the Ley 2012 GAP index. Age and FVC bands follow du Bois 2011 Table 4, not GAP cutoffs.
  • FVC percent predicted and 24-week FVC change are caller-supplied. magent does not perform spirometry or compute percent predicted from raw volumes.
  • Abbreviated four-predictor clinical model omits DLCO and SGRQ by design (du Bois 2011). Respiratory hospitalization is a caller-assigned 24-week history flag.

Formula

du_bois = age_points + hospitalization_points + fvc_points + fvc_change_points; age <60 -> 0, 60-69 -> 4, >=70 -> 8; respiratory_hospitalization false -> 0, true -> 14; FVC% <50 -> 18, 51-65 -> 13, 66-79 -> 8, >80 -> 0 (50 and 80 unpublished); 24-wk FVC% change <= -10 -> 21, > -10 and < -4.9 -> 10, >= -4.9 -> 0; max 61; score only

Citation

Title
Ascertainment of individual risk of mortality for patients with idiopathic pulmonary fibrosis
Authors
du Bois RM, Weycker D, Albera C, Bradford WZ, Costabel U, Kartashov A, Lancaster L, Noble PW, Raghu G, Sahn SA, Szwarcberg J, Thomeer M, Valeyre D, King TE Jr
Source
Am J Respir Crit Care Med. 2011;184(4):459-466
DOI
10.1164/rccm.201011-1790OC

Worked example

Table 4 footnote (score 31)

Given: age=70fvc_change_24wk=-7fvc_percent_predicted=55respiratory_hospitalization=false

  1. Age 70 ≥70 → 8; no respiratory hospitalization → 0; FVC 55% in 51–65 → 13; 24-week change −7 (between −10 and −4.9) → 10
  2. Score = 31

All 0-point bands

Given: age=55fvc_change_24wk=0fvc_percent_predicted=81respiratory_hospitalization=false

  1. Age 55 <60 → 0; no hospitalization → 0; FVC 81% >80 → 0; 24-week change 0 ≥ −4.9 → 0
  2. Score = 0

Also searched as

  • du Bois score
  • du Bois IPF
  • IPF mortality score
  • idiopathic pulmonary fibrosis risk
  • four-predictor IPF
  • du Bois 2011

Try

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

/api/calc/du_bois?age=70&respiratory_hospitalization=false&fvc_percent_predicted=55&fvc_change_24wk=-7

Full URL: https://api.magentlab.com/api/calc/du_bois?age=70&respiratory_hospitalization=false&fvc_percent_predicted=55&fvc_change_24wk=-7

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/du_bois?age=70&respiratory_hospitalization=false&fvc_percent_predicted=55&fvc_change_24wk=-7"

Parameters

Name Type Required Description
age integer required Age in years (integer 18-120). du Bois 2011 Table 4: <60 scores 0; 60-69 scores 4; >=70 scores 8.
respiratory_hospitalization boolean required 24-week history of respiratory hospitalization (true or false). du Bois 2011 Table 4: false scores 0; true scores 14.
fvc_percent_predicted number required FVC percent predicted (10-150). du Bois 2011 Table 4: <50 scores 18; 51-65 scores 13; 66-79 scores 8; >80 scores 0. Exactly 50 or 80 is unpublished.
fvc_change_24wk number required 24-week change in FVC percent predicted, in percentage points (-50 to 50). du Bois 2011 Table 4: <= -10 scores 21; > -10 and < -4.9 scores 10; >= -4.9 scores 0.

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/du_bois 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": "70",
      "fvc_change_24wk": "-7",
      "fvc_percent_predicted": "55",
      "respiratory_hospitalization": "false"
    },
    {
      "age": "70",
      "fvc_change_24wk": "-7",
      "fvc_percent_predicted": "55",
      "respiratory_hospitalization": "false"
    }
  ]
}

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/du_bois",
  "items": [
    {
      "components": [
        {
          "value": 70,
          "factor": "age",
          "points": 8,
          "present": true
        },
        {
          "value": false,
          "factor": "respiratory_hospitalization",
          "points": 0,
          "present": false
        },
        {
          "value": 55.0,
          "factor": "fvc",
          "points": 13,
          "present": true
        },
        {
          "value": -7.0,
          "factor": "fvc_change",
          "points": 10,
          "present": true
        }
      ],
      "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": 70,
      "citation": {
        "authors": "du Bois RM, Weycker D, Albera C, Bradford WZ, Costabel U, Kartashov A, Lancaster L, Noble PW, Raghu G, Sahn SA, Szwarcberg J, Thomeer M, Valeyre D, King TE Jr",
        "doi": "10.1164/rccm.201011-1790OC",
        "id": "du-bois-2011",
        "pmid": "21616999",
        "source": "Am J Respir Crit Care Med. 2011;184(4):459-466",
        "title": "Ascertainment of individual risk of mortality for patients with idiopathic pulmonary fibrosis"
      },
      "formula": "du_bois",
      "formula_expression": "du_bois = age_points + hospitalization_points + fvc_points + fvc_change_points; age <60 -> 0, 60-69 -> 4, >=70 -> 8; respiratory_hospitalization false -> 0, true -> 14; FVC% <50 -> 18, 51-65 -> 13, 66-79 -> 8, >80 -> 0 (50 and 80 unpublished); 24-wk FVC% change <= -10 -> 21, > -10 and < -4.9 -> 10, >= -4.9 -> 0; max 61; score only",
      "max_score": 61,
      "score": 31,
      "fvc_change_24wk": -7.0,
      "fvc_percent_predicted": 55.0,
      "respiratory_hospitalization": false
    },
    {
      "components": [
        {
          "value": 70,
          "factor": "age",
          "points": 8,
          "present": true
        },
        {
          "value": false,
          "factor": "respiratory_hospitalization",
          "points": 0,
          "present": false
        },
        {
          "value": 55.0,
          "factor": "fvc",
          "points": 13,
          "present": true
        },
        {
          "value": -7.0,
          "factor": "fvc_change",
          "points": 10,
          "present": true
        }
      ],
      "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": 70,
      "citation": {
        "authors": "du Bois RM, Weycker D, Albera C, Bradford WZ, Costabel U, Kartashov A, Lancaster L, Noble PW, Raghu G, Sahn SA, Szwarcberg J, Thomeer M, Valeyre D, King TE Jr",
        "doi": "10.1164/rccm.201011-1790OC",
        "id": "du-bois-2011",
        "pmid": "21616999",
        "source": "Am J Respir Crit Care Med. 2011;184(4):459-466",
        "title": "Ascertainment of individual risk of mortality for patients with idiopathic pulmonary fibrosis"
      },
      "formula": "du_bois",
      "formula_expression": "du_bois = age_points + hospitalization_points + fvc_points + fvc_change_points; age <60 -> 0, 60-69 -> 4, >=70 -> 8; respiratory_hospitalization false -> 0, true -> 14; FVC% <50 -> 18, 51-65 -> 13, 66-79 -> 8, >80 -> 0 (50 and 80 unpublished); 24-wk FVC% change <= -10 -> 21, > -10 and < -4.9 -> 10, >= -4.9 -> 0; max 61; score only",
      "max_score": 61,
      "score": 31,
      "fvc_change_24wk": -7.0,
      "fvc_percent_predicted": 55.0,
      "respiratory_hospitalization": false
    }
  ]
}

Response

Field Type Description
formula string du_bois
formula_expression string Exact du Bois 2011 four-predictor Table 4 expression
score integer du Bois 2011 Table 4 points 0-61
max_score integer Always 61
age_years integer Age in years used
respiratory_hospitalization boolean Caller-assigned 24-week respiratory hospitalization flag
fvc_percent_predicted number FVC percent predicted used
fvc_change_24wk number 24-week change in FVC percent predicted, in percentage points
components array Per-factor points for age, hospitalization, fvc, and fvc_change
citation object du Bois et al. Am J Respir Crit Care Med 2011 citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "components": [
    {
      "value": 70,
      "factor": "age",
      "points": 8,
      "present": true
    },
    {
      "value": false,
      "factor": "respiratory_hospitalization",
      "points": 0,
      "present": false
    },
    {
      "value": 55.0,
      "factor": "fvc",
      "points": 13,
      "present": true
    },
    {
      "value": -7.0,
      "factor": "fvc_change",
      "points": 10,
      "present": true
    }
  ],
  "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": 70,
  "citation": {
    "authors": "du Bois RM, Weycker D, Albera C, Bradford WZ, Costabel U, Kartashov A, Lancaster L, Noble PW, Raghu G, Sahn SA, Szwarcberg J, Thomeer M, Valeyre D, King TE Jr",
    "doi": "10.1164/rccm.201011-1790OC",
    "id": "du-bois-2011",
    "pmid": "21616999",
    "source": "Am J Respir Crit Care Med. 2011;184(4):459-466",
    "title": "Ascertainment of individual risk of mortality for patients with idiopathic pulmonary fibrosis"
  },
  "formula": "du_bois",
  "formula_expression": "du_bois = age_points + hospitalization_points + fvc_points + fvc_change_points; age <60 -> 0, 60-69 -> 4, >=70 -> 8; respiratory_hospitalization false -> 0, true -> 14; FVC% <50 -> 18, 51-65 -> 13, 66-79 -> 8, >80 -> 0 (50 and 80 unpublished); 24-wk FVC% change <= -10 -> 21, > -10 and < -4.9 -> 10, >= -4.9 -> 0; max 61; score only",
  "max_score": 61,
  "score": 31,
  "fvc_change_24wk": -7.0,
  "fvc_percent_predicted": 55.0,
  "respiratory_hospitalization": false
}

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_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_fvc_percent fvc_percent_predicted must be a number from 10 to 150. Returned before settlement; you are not charged.
400 invalid_du_bois_fvc fvc_percent_predicted must be <50, 51-65, 66-79, or >80 (du Bois 2011 Table 4; 50 and 80 are not published cells). Returned before settlement; you are not charged.
400 invalid_fvc_change fvc_change_24wk must be a number from -50 to 50 (du Bois 2011 24-week change in % predicted FVC). 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

  • GAP index — Sum Ley 2012 GAP index points from sex, age, FVC percent predicted, and DLCO percent predicted or cannot-perform.

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.