# PECARN febrile infant rule

PECARN febrile infant

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

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

## What it computes

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.

## When to use

When an agent already has age in days, a caller-assigned negative or positive urinalysis, ANC, and serum procalcitonin and needs the published three-variable low-risk boolean. magent does not assay UA, ANC, or PCT. Not Rochester, Boston, Philadelphia, Step-by-Step, or pecarn-head.

## When not to use

- Not a medical device.
- Not a diagnosis of serious bacterial infection (SBI) and not a discharge, admission, or lumbar-puncture order.
- This tool is the Kuppermann 2019 three-variable PECARN rule only. Not Rochester, Boston, Philadelphia, or Step-by-Step criteria. Not the later AAP/PECARN neonatal cutoffs (ANC 4000 / PCT 0.5). Not pecarn-head.
- Age 0-60 days pins the published population (febrile infants 60 days and younger). Age is required but was not retained in the 3-variable tree.
- magent does not assay urinalysis, ANC, or procalcitonin. The caller assigns negative_urinalysis and laboratory values.

## Formula

```
low_risk iff negative_urinalysis and anc_per_ul <= 4090 and pct_ng_ml <= 1.71; age_days 0-60 pins the published population and is not a tree variable (Kuppermann 2019)
```

## Citation

[A Clinical Prediction Rule to Identify Febrile Infants 60 Days and Younger at Low Risk for Serious Bacterial Infections.](https://doi.org/10.1001/jamapediatrics.2018.5501)
Kuppermann N, Dayan PS, Levine DA, et al.
JAMA Pediatr. 2019;173(4):342-351
DOI: [10.1001/jamapediatrics.2018.5501](https://doi.org/10.1001/jamapediatrics.2018.5501)

## Worked example

### All three Kuppermann 2019 laboratory criteria met

Given: `age_days=36, anc_per_ul=3000, negative_urinalysis=true, pct_ng_ml=0.5`

1. age_days 36 is in the published 0-60 day population and is not a tree variable
2. negative_urinalysis is true (caller-assigned negative UA)
3. ANC 3000/µL is 4090 or less; serum procalcitonin 0.5 ng/mL is 1.71 or less
4. Every laboratory criterion holds, so low_risk is true


## Also searched as

- PECARN febrile infant
- Kuppermann 2019
- febrile infant 60 days
- PECARN SBI rule
- febrile infant procalcitonin
- PECARN ANC urinalysis PCT
- Kuppermann Dayan Levine
- serious bacterial infection infant rule

## Parameters

- `age_days` (integer, required): Chronological age in days (integer 0-60). Kuppermann 2019 studied febrile infants 60 days and younger. Age pins the published population and is not a tree variable; age 0 and age 60 can both be low-risk when the three laboratory criteria hold.
- `negative_urinalysis` (boolean, required): Caller-assigned negative urinalysis as used in Kuppermann 2019. true means the UA is negative. true or false. magent does not assay UA.
- `anc_per_ul` (number, required): Absolute neutrophil count in cells/µL. Range 0-100000. Low-risk requires ANC 4090/µL or less (4090 meets; 4091 does not). magent does not assay ANC.
- `pct_ng_ml` (number, required): Serum procalcitonin in ng/mL. Range 0.01-100. Low-risk requires 1.71 ng/mL or less (1.71 meets; 1.72 does not). magent does not assay procalcitonin.

## 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/pecarn_febrile`
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_days": "36",
      "anc_per_ul": "3000",
      "negative_urinalysis": "true",
      "pct_ng_ml": "0.5"
    },
    {
      "age_days": "36",
      "anc_per_ul": "3000",
      "negative_urinalysis": "true",
      "pct_ng_ml": "0.5"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/pecarn_febrile",
  "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": "Kuppermann N, Dayan PS, Levine DA, et al.",
        "doi": "10.1001/jamapediatrics.2018.5501",
        "id": "kuppermann-2019",
        "pmid": "30776077",
        "source": "JAMA Pediatr. 2019;173(4):342-351",
        "title": "A Clinical Prediction Rule to Identify Febrile Infants 60 Days and Younger at Low Risk for Serious Bacterial Infections."
      },
      "formula": "pecarn_febrile",
      "formula_expression": "low_risk iff negative_urinalysis and anc_per_ul <= 4090 and pct_ng_ml <= 1.71; age_days 0-60 pins the published population and is not a tree variable (Kuppermann 2019)",
      "anc_per_ul": 3.0e3,
      "criteria": [
        {
          "factor": "negative_urinalysis",
          "met": true
        },
        {
          "value": 3.0e3,
          "factor": "anc_le_4090",
          "met": true
        },
        {
          "value": 0.5,
          "factor": "pct_le_1_71",
          "met": true
        }
      ],
      "low_risk": true,
      "age_days": 36,
      "pct_ng_ml": 0.5
    },
    {
      "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": "Kuppermann N, Dayan PS, Levine DA, et al.",
        "doi": "10.1001/jamapediatrics.2018.5501",
        "id": "kuppermann-2019",
        "pmid": "30776077",
        "source": "JAMA Pediatr. 2019;173(4):342-351",
        "title": "A Clinical Prediction Rule to Identify Febrile Infants 60 Days and Younger at Low Risk for Serious Bacterial Infections."
      },
      "formula": "pecarn_febrile",
      "formula_expression": "low_risk iff negative_urinalysis and anc_per_ul <= 4090 and pct_ng_ml <= 1.71; age_days 0-60 pins the published population and is not a tree variable (Kuppermann 2019)",
      "anc_per_ul": 3.0e3,
      "criteria": [
        {
          "factor": "negative_urinalysis",
          "met": true
        },
        {
          "value": 3.0e3,
          "factor": "anc_le_4090",
          "met": true
        },
        {
          "value": 0.5,
          "factor": "pct_le_1_71",
          "met": true
        }
      ],
      "low_risk": true,
      "age_days": 36,
      "pct_ng_ml": 0.5
    }
  ]
}
```

## Response fields

- `formula` (string): pecarn_febrile
- `formula_expression` (string): Kuppermann 2019 three-variable PECARN low-risk rule
- `low_risk` (boolean): true only when negative_urinalysis, anc_per_ul <= 4090, and pct_ng_ml <= 1.71 all hold. false is not_low_risk. Not an SBI probability and not a discharge or LP order.
- `age_days` (integer): Age in days used to pin the published 0-60 day population. Not a tree criterion.
- `anc_per_ul` (number): ANC in cells/µL used for the <=4090 cutoff
- `pct_ng_ml` (number): Serum procalcitonin in ng/mL used for the <=1.71 cutoff
- `criteria` (array): Per-criterion rows with factor and met: negative_urinalysis, anc_le_4090, pct_le_1_71. low_risk iff all are met. Age is not a criterion.
- `citation` (object): Kuppermann et al. JAMA Pediatr 2019 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "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": "Kuppermann N, Dayan PS, Levine DA, et al.",
    "doi": "10.1001/jamapediatrics.2018.5501",
    "id": "kuppermann-2019",
    "pmid": "30776077",
    "source": "JAMA Pediatr. 2019;173(4):342-351",
    "title": "A Clinical Prediction Rule to Identify Febrile Infants 60 Days and Younger at Low Risk for Serious Bacterial Infections."
  },
  "formula": "pecarn_febrile",
  "formula_expression": "low_risk iff negative_urinalysis and anc_per_ul <= 4090 and pct_ng_ml <= 1.71; age_days 0-60 pins the published population and is not a tree variable (Kuppermann 2019)",
  "anc_per_ul": 3.0e3,
  "criteria": [
    {
      "factor": "negative_urinalysis",
      "met": true
    },
    {
      "value": 3.0e3,
      "factor": "anc_le_4090",
      "met": true
    },
    {
      "value": 0.5,
      "factor": "pct_le_1_71",
      "met": true
    }
  ],
  "low_risk": true,
  "age_days": 36,
  "pct_ng_ml": 0.5
}
```

## Errors

- HTTP 400 `invalid_pecarn_febrile`: age_days must be an integer 0-60, anc_per_ul a number 0-100000, and pct_ng_ml a number 0.01-100 (Kuppermann 2019 PECARN febrile infants ≤60 days). Returned before settlement; you are not charged.
- HTTP 400 `invalid_flag`: boolean clinical flags must be true or false 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

- [Rochester criteria](https://magentlab.com/docs/rochester) — Apply the Dagan 1985 Rochester criteria and return low_risk only when every published criterion holds for an infant younger than 3 months.
- [BRUE](https://magentlab.com/docs/brue) — Apply the Tieder 2016 AAP BRUE definition and return feature_count (0-4) and whether the published definition box holds (brue).

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