Emergency · LIVE
Step-by-Step febrile infant
Apply the Gomez 2016 sequential Step-by-Step approach and return high, intermediate, or low IBI-risk tier for a febrile infant 90 days or younger.
Markdown: /docs/step-by-step.md · Canonical: https://magentlab.com/docs/step-by-step
Not a medical device. Not a diagnosis or dosing recommendation.
What it computes
Apply the Gomez 2016 sequential Step-by-Step approach and return high, intermediate, or low IBI-risk tier for a febrile infant 90 days or younger.
When to use
Returns the published three-tier Step-by-Step result from age in days, a caller-assigned well-appearing flag, leukocyturia, serum procalcitonin, CRP, and ANC. magent does not examine the infant or assay UA, PCT, CRP, or ANC. Not Rochester, Boston, Philadelphia, or PECARN febrile.
When not to use
- Not a diagnosis of invasive bacterial infection (IBI) and not a discharge, admission, lumbar-puncture, or antibiotic order.
- Magent does not examine the infant. The caller assigns well_appearing. Magent does not assay urine dipstick/UA, procalcitonin, CRP, or ANC.
- This tool is the Gomez 2016 sequential Step-by-Step only (derivation Mintegi 2014). Not Rochester, Boston, Philadelphia, or PECARN febrile (Kuppermann 2019 ANC 4090 / PCT 1.71).
- Age 0-90 days pins the published population (febrile infants 90 days and younger). Age 21 days is high-risk; age 22 can be low when remaining low-risk criteria hold.
- Returns the published high/intermediate/low tier only. Does not report an IBI probability.
Formula
risk = high if not well_appearing or age_days <= 21 or leukocyturia or pct_ng_ml >= 0.5; else intermediate if crp_mg_l > 20 or anc_per_ul > 10000; else low; low_risk iff well_appearing and age_gt_21 and no_leukocyturia and pct_lt_0_5 and crp_le_20 and anc_le_10000 (Gomez 2016 Step-by-Step; derivation Mintegi 2014)
Citation
- Authors
- Gomez B, Mintegi S, Bressan S, Da Dalt L, Gervaix A, Lacroix L
- Source
- Pediatrics. 2016;138(2):e20154381
Worked example
Gomez 2016 low-risk febrile infant
Given:
age_days=47anc_per_ul=4000crp_mg_l=5leukocyturia=falsepct_ng_ml=0.2well_appearing=true
- age_days 47 is in the published 0-90 day population and is greater than 21
- well_appearing is true and leukocyturia is false (caller-assigned)
- PCT 0.2 ng/mL is less than 0.5; CRP 5 mg/L is not greater than 20; ANC 4000/µL is not greater than 10000
- No high-risk or intermediate criterion holds, so risk is low and low_risk is true
Also searched as
- Step-by-Step febrile infant
- Gomez 2016
- Mintegi 2014
- febrile infant 90 days
- infant procalcitonin CRP
- febrile infant leukocyturia
- Gomez Mintegi Bressan
- young febrile infant IBI
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/step-by-step?age_days=47&well_appearing=true&leukocyturia=false&pct_ng_ml=0.2&crp_mg_l=5&anc_per_ul=4000
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/step-by-step?age_days=47&well_appearing=true&leukocyturia=false&pct_ng_ml=0.2&crp_mg_l=5&anc_per_ul=4000"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
age_days |
integer | required | Chronological age in days (integer 0-90). Gomez 2016 studied febrile infants 90 days and younger. Age 21 days or younger is high-risk. Age 22 can be low-risk when remaining low-risk criteria hold. |
well_appearing |
boolean | required | Caller-assigned well-appearing as used in Gomez 2016. true or false. Ill-appearing (well_appearing=false) is high-risk. magent does not examine the infant. |
leukocyturia |
boolean | required | Caller-assigned leukocyturia (urine dipstick / UA leukocytes) as used in Gomez 2016. true means leukocytes are present and is high-risk. true or false. magent does not assay UA. |
pct_ng_ml |
number | required | Serum procalcitonin in ng/mL. Range 0.01-100. High-risk if 0.5 ng/mL or greater (0.5 is high). Low-risk requires less than 0.5. magent does not assay procalcitonin. |
crp_mg_l |
number | required | C-reactive protein in mg/L. Range 0-500. Intermediate (when not already high) if greater than 20 mg/L (20 is not intermediate). magent does not assay CRP. |
anc_per_ul |
number | required | Absolute neutrophil count in cells/µL. Range 0-100000. Intermediate (when not already high) if greater than 10000/µL (10000 is not intermediate). magent does not assay ANC. |
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_days": "47",
"anc_per_ul": "4000",
"crp_mg_l": "5",
"leukocyturia": "false",
"pct_ng_ml": "0.2",
"well_appearing": "true"
},
{
"age_days": "47",
"anc_per_ul": "4000",
"crp_mg_l": "5",
"leukocyturia": "false",
"pct_ng_ml": "0.2",
"well_appearing": "true"
}
]
}
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/step-by-step",
"items": [
{
"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": "Gomez B, Mintegi S, Bressan S, Da Dalt L, Gervaix A, Lacroix L",
"doi": "10.1542/peds.2015-4381",
"id": "gomez-2016",
"pmid": "27382134",
"source": "Pediatrics. 2016;138(2):e20154381",
"title": "Validation of the \"Step-by-Step\" Approach in the Management of Young Febrile Infants"
},
"formula": "step_by_step",
"formula_expression": "risk = high if not well_appearing or age_days <= 21 or leukocyturia or pct_ng_ml >= 0.5; else intermediate if crp_mg_l > 20 or anc_per_ul > 10000; else low; low_risk iff well_appearing and age_gt_21 and no_leukocyturia and pct_lt_0_5 and crp_le_20 and anc_le_10000 (Gomez 2016 Step-by-Step; derivation Mintegi 2014)",
"anc_per_ul": 4.0e3,
"criteria": [
{
"factor": "well_appearing",
"met": true
},
{
"value": 47,
"factor": "age_gt_21",
"met": true
},
{
"factor": "no_leukocyturia",
"met": true
},
{
"value": 0.2,
"factor": "pct_lt_0_5",
"met": true
},
{
"value": 5.0,
"factor": "crp_le_20",
"met": true
},
{
"value": 4.0e3,
"factor": "anc_le_10000",
"met": true
}
],
"low_risk": true,
"high_risk": false,
"crp_mg_l": 5.0,
"risk": "low",
"age_days": 47,
"pct_ng_ml": 0.2,
"intermediate_risk": 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": "Gomez B, Mintegi S, Bressan S, Da Dalt L, Gervaix A, Lacroix L",
"doi": "10.1542/peds.2015-4381",
"id": "gomez-2016",
"pmid": "27382134",
"source": "Pediatrics. 2016;138(2):e20154381",
"title": "Validation of the \"Step-by-Step\" Approach in the Management of Young Febrile Infants"
},
"formula": "step_by_step",
"formula_expression": "risk = high if not well_appearing or age_days <= 21 or leukocyturia or pct_ng_ml >= 0.5; else intermediate if crp_mg_l > 20 or anc_per_ul > 10000; else low; low_risk iff well_appearing and age_gt_21 and no_leukocyturia and pct_lt_0_5 and crp_le_20 and anc_le_10000 (Gomez 2016 Step-by-Step; derivation Mintegi 2014)",
"anc_per_ul": 4.0e3,
"criteria": [
{
"factor": "well_appearing",
"met": true
},
{
"value": 47,
"factor": "age_gt_21",
"met": true
},
{
"factor": "no_leukocyturia",
"met": true
},
{
"value": 0.2,
"factor": "pct_lt_0_5",
"met": true
},
{
"value": 5.0,
"factor": "crp_le_20",
"met": true
},
{
"value": 4.0e3,
"factor": "anc_le_10000",
"met": true
}
],
"low_risk": true,
"high_risk": false,
"crp_mg_l": 5.0,
"risk": "low",
"age_days": 47,
"pct_ng_ml": 0.2,
"intermediate_risk": false
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | step_by_step |
formula_expression |
string | Gomez 2016 sequential Step-by-Step three-tier rule |
risk |
string | high, intermediate, or low. Sequential: high before intermediate. Not an IBI probability and not a discharge, admission, LP, or antibiotic order. |
low_risk |
boolean | true only when risk is low (every tree criterion holds). false is not a discharge order. |
high_risk |
boolean | true only when risk is high (ill-appearing, age_days <= 21, leukocyturia, or PCT >= 0.5). High beats intermediate. |
intermediate_risk |
boolean | true only when risk is intermediate (CRP > 20 or ANC > 10000 and no high-risk criterion). CRP 20 and ANC 10000 are not intermediate. |
age_days |
integer | Age in days used for the age_days <= 21 high-risk cutoff |
pct_ng_ml |
number | Serum procalcitonin in ng/mL used for the >=0.5 high-risk cutoff |
crp_mg_l |
number | CRP in mg/L used for the >20 intermediate cutoff |
anc_per_ul |
number | ANC in cells/µL used for the >10000 intermediate cutoff |
criteria |
array | Per-criterion rows with factor and met: well_appearing, age_gt_21, no_leukocyturia, pct_lt_0_5, crp_le_20, anc_le_10000. low_risk iff all are met. If any of well_appearing, age_gt_21, no_leukocyturia, or pct_lt_0_5 is unmet, risk is high even when CRP or ANC is also elevated. |
citation |
object | Gomez et al. Pediatrics 2016 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"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": "Gomez B, Mintegi S, Bressan S, Da Dalt L, Gervaix A, Lacroix L",
"doi": "10.1542/peds.2015-4381",
"id": "gomez-2016",
"pmid": "27382134",
"source": "Pediatrics. 2016;138(2):e20154381",
"title": "Validation of the \"Step-by-Step\" Approach in the Management of Young Febrile Infants"
},
"formula": "step_by_step",
"formula_expression": "risk = high if not well_appearing or age_days <= 21 or leukocyturia or pct_ng_ml >= 0.5; else intermediate if crp_mg_l > 20 or anc_per_ul > 10000; else low; low_risk iff well_appearing and age_gt_21 and no_leukocyturia and pct_lt_0_5 and crp_le_20 and anc_le_10000 (Gomez 2016 Step-by-Step; derivation Mintegi 2014)",
"anc_per_ul": 4.0e3,
"criteria": [
{
"factor": "well_appearing",
"met": true
},
{
"value": 47,
"factor": "age_gt_21",
"met": true
},
{
"factor": "no_leukocyturia",
"met": true
},
{
"value": 0.2,
"factor": "pct_lt_0_5",
"met": true
},
{
"value": 5.0,
"factor": "crp_le_20",
"met": true
},
{
"value": 4.0e3,
"factor": "anc_le_10000",
"met": true
}
],
"low_risk": true,
"high_risk": false,
"crp_mg_l": 5.0,
"risk": "low",
"age_days": 47,
"pct_ng_ml": 0.2,
"intermediate_risk": false
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_step_by_step |
age_days must be an integer 0-90, pct_ng_ml a number 0.01-100, crp_mg_l a number 0-500, and anc_per_ul a number 0-100000 (Gomez 2016 Step-by-Step). 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_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
- PECARN febrile infant — Apply the Kuppermann 2019 PECARN clinical prediction rule and return low_risk only when a febrile infant 60 days or younger has a caller-assigned negative urinalysis, ANC ≤4090/µL, and serum procalcitonin ≤1.71 ng/mL.
- Rochester criteria — Apply the Dagan 1985 Rochester criteria and return low_risk only when every published criterion holds for an infant younger than 3 months.
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.
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.