# Pediatric Asthma Risk Score (PARS)

PARS

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

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

## What it computes

Sum the Biagini Myers 2019 Table III Pediatric Asthma Risk Score weights and return the Fig E1 integer predicted risk of asthma by age 7.

## When to use

When an agent has caller-assigned parental asthma, eczema before age 3, wheezing apart from colds, wheezing before age 3, African American race as used in Biagini Myers 2019, and SPT ≥2 aeroallergen and/or food allergen flags, and needs the published PARS total and Fig E1 percent rather than API, mAPI, or a named risk band.

## When not to use

- Not a medical device and not an asthma diagnosis. magent does not examine the child.
- african_american is caller-assigned African American race as used in Biagini Myers 2019. magent does not assign race.
- Not the Castro-Rodriguez 2000 Asthma Predictive Index (API) and not the modified Asthma Predictive Index (mAPI).
- magent does not perform skin prick testing. spt_ge_2 is a caller-assigned flag for SPT positive to ≥2 aeroallergens and/or food allergens.
- Fig E1 reports predicted risk of asthma by age 7 as integers for attainable scores 0, 2-12, and 14. Scores 1 and 13 are unattainable given Table III weights. magent does not invent percents for unattainable scores and does not return named low/moderate/high bands.

## Formula

```
PARS = 2*parental_asthma + 2*eczema_before_age_3 + 3*wheezing_apart_from_colds + 3*wheezing_before_age_3 + 2*african_american + 2*spt_ge_2; Biagini Myers 2019 Table III (OR rounded to nearest integer) and Fig E1; max 14; predicted_asthma_percent is the Fig E1 integer predicted risk of asthma by age 7; scores 1 and 13 are unattainable
```

## Citation

[A Pediatric Asthma Risk Score to better predict asthma development in young children](https://doi.org/10.1016/j.jaci.2018.09.037)
Biagini Myers JM, Schauberger E, He H, Martin LJ, Kroner J, Hill GM, Ryan PH, LeMasters GK, Bernstein DI, Lockey JE, Arshad SH, Kurukulaaratchy R, Khurana Hershey GK
J Allergy Clin Immunol. 2019;143(4):1803-1810.e2
DOI: [10.1016/j.jaci.2018.09.037](https://doi.org/10.1016/j.jaci.2018.09.037)

## Worked example

### All flags false

Given: `african_american=false, eczema_before_age_3=false, parental_asthma=false, spt_ge_2=false, wheezing_apart_from_colds=false, wheezing_before_age_3=false`

1. All six Table III flags false → score 0
2. Fig E1 predicted asthma by age 7 = 3%


### All flags true

Given: `african_american=true, eczema_before_age_3=true, parental_asthma=true, spt_ge_2=true, wheezing_apart_from_colds=true, wheezing_before_age_3=true`

1. parental asthma 2 + eczema before age 3 2 + wheezing apart from colds 3 + wheezing before age 3 3 + African American 2 + SPT ≥2 2
2. Score = 14 (max 14); Fig E1 predicted asthma by age 7 = 79%


## Also searched as

- Pediatric Asthma Risk Score
- PARS
- Biagini Myers PARS
- PARS Table III
- asthma by age 7 PARS
- pediatric asthma risk score PARS
- PARS Fig E1
- young children asthma development score

## Parameters

- `parental_asthma` (boolean, required): Parental asthma as assigned by the caller (Biagini Myers 2019 Table III). true scores 2. magent does not take a family history. true or false.
- `eczema_before_age_3` (boolean, required): Eczema before age 3 years as assigned by the caller (Biagini Myers 2019 Table III). true scores 2. magent does not examine the child. true or false.
- `wheezing_apart_from_colds` (boolean, required): Wheezing apart from colds as assigned by the caller (Biagini Myers 2019 Table III). true scores 3. magent does not auscultate. true or false.
- `wheezing_before_age_3` (boolean, required): Wheezing before age 3 years as assigned by the caller (Biagini Myers 2019 Table III). true scores 3. magent does not auscultate. true or false.
- `african_american` (boolean, required): Caller-assigned African American race as used in Biagini Myers 2019 Table III. true scores 2. magent does not assign race. true or false.
- `spt_ge_2` (boolean, required): Skin prick test positive to ≥2 aeroallergens and/or food allergens as assigned by the caller (Biagini Myers 2019 Table III). true scores 2. magent does not perform SPT. true or false.

## 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/pars`
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": [
    {
      "african_american": "false",
      "eczema_before_age_3": "false",
      "parental_asthma": "false",
      "spt_ge_2": "false",
      "wheezing_apart_from_colds": "false",
      "wheezing_before_age_3": "false"
    },
    {
      "african_american": "false",
      "eczema_before_age_3": "false",
      "parental_asthma": "false",
      "spt_ge_2": "false",
      "wheezing_apart_from_colds": "false",
      "wheezing_before_age_3": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/pars",
  "items": [
    {
      "components": [
        {
          "factor": "parental_asthma",
          "points": 0,
          "present": false
        },
        {
          "factor": "eczema_before_age_3",
          "points": 0,
          "present": false
        },
        {
          "factor": "wheezing_apart_from_colds",
          "points": 0,
          "present": false
        },
        {
          "factor": "wheezing_before_age_3",
          "points": 0,
          "present": false
        },
        {
          "factor": "african_american",
          "points": 0,
          "present": false
        },
        {
          "factor": "spt_ge_2",
          "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": "Biagini Myers JM, Schauberger E, He H, Martin LJ, Kroner J, Hill GM, Ryan PH, LeMasters GK, Bernstein DI, Lockey JE, Arshad SH, Kurukulaaratchy R, Khurana Hershey GK",
        "doi": "10.1016/j.jaci.2018.09.037",
        "id": "biagini-myers-2019-pars",
        "pmid": "30554722",
        "source": "J Allergy Clin Immunol. 2019;143(4):1803-1810.e2",
        "title": "A Pediatric Asthma Risk Score to better predict asthma development in young children"
      },
      "formula": "pars",
      "formula_expression": "PARS = 2*parental_asthma + 2*eczema_before_age_3 + 3*wheezing_apart_from_colds + 3*wheezing_before_age_3 + 2*african_american + 2*spt_ge_2; Biagini Myers 2019 Table III (OR rounded to nearest integer) and Fig E1; max 14; predicted_asthma_percent is the Fig E1 integer predicted risk of asthma by age 7; scores 1 and 13 are unattainable",
      "max_score": 14,
      "score": 0,
      "predicted_asthma_percent": 3
    },
    {
      "components": [
        {
          "factor": "parental_asthma",
          "points": 0,
          "present": false
        },
        {
          "factor": "eczema_before_age_3",
          "points": 0,
          "present": false
        },
        {
          "factor": "wheezing_apart_from_colds",
          "points": 0,
          "present": false
        },
        {
          "factor": "wheezing_before_age_3",
          "points": 0,
          "present": false
        },
        {
          "factor": "african_american",
          "points": 0,
          "present": false
        },
        {
          "factor": "spt_ge_2",
          "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": "Biagini Myers JM, Schauberger E, He H, Martin LJ, Kroner J, Hill GM, Ryan PH, LeMasters GK, Bernstein DI, Lockey JE, Arshad SH, Kurukulaaratchy R, Khurana Hershey GK",
        "doi": "10.1016/j.jaci.2018.09.037",
        "id": "biagini-myers-2019-pars",
        "pmid": "30554722",
        "source": "J Allergy Clin Immunol. 2019;143(4):1803-1810.e2",
        "title": "A Pediatric Asthma Risk Score to better predict asthma development in young children"
      },
      "formula": "pars",
      "formula_expression": "PARS = 2*parental_asthma + 2*eczema_before_age_3 + 3*wheezing_apart_from_colds + 3*wheezing_before_age_3 + 2*african_american + 2*spt_ge_2; Biagini Myers 2019 Table III (OR rounded to nearest integer) and Fig E1; max 14; predicted_asthma_percent is the Fig E1 integer predicted risk of asthma by age 7; scores 1 and 13 are unattainable",
      "max_score": 14,
      "score": 0,
      "predicted_asthma_percent": 3
    }
  ]
}
```

## Response fields

- `formula` (string): pars
- `formula_expression` (string): Biagini Myers 2019 Table III PARS weights and Fig E1 mapping
- `score` (integer): PARS points 0-14; 1 and 13 are unattainable
- `max_score` (integer): 14
- `predicted_asthma_percent` (integer): Fig E1 integer predicted risk of asthma by age 7. Not a named low/moderate/high band. Not a diagnosis of asthma.
- `components` (array): Per-factor Table III points
- `citation` (object): Biagini Myers 2019 J Allergy Clin Immunol citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "parental_asthma",
      "points": 0,
      "present": false
    },
    {
      "factor": "eczema_before_age_3",
      "points": 0,
      "present": false
    },
    {
      "factor": "wheezing_apart_from_colds",
      "points": 0,
      "present": false
    },
    {
      "factor": "wheezing_before_age_3",
      "points": 0,
      "present": false
    },
    {
      "factor": "african_american",
      "points": 0,
      "present": false
    },
    {
      "factor": "spt_ge_2",
      "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": "Biagini Myers JM, Schauberger E, He H, Martin LJ, Kroner J, Hill GM, Ryan PH, LeMasters GK, Bernstein DI, Lockey JE, Arshad SH, Kurukulaaratchy R, Khurana Hershey GK",
    "doi": "10.1016/j.jaci.2018.09.037",
    "id": "biagini-myers-2019-pars",
    "pmid": "30554722",
    "source": "J Allergy Clin Immunol. 2019;143(4):1803-1810.e2",
    "title": "A Pediatric Asthma Risk Score to better predict asthma development in young children"
  },
  "formula": "pars",
  "formula_expression": "PARS = 2*parental_asthma + 2*eczema_before_age_3 + 3*wheezing_apart_from_colds + 3*wheezing_before_age_3 + 2*african_american + 2*spt_ge_2; Biagini Myers 2019 Table III (OR rounded to nearest integer) and Fig E1; max 14; predicted_asthma_percent is the Fig E1 integer predicted risk of asthma by age 7; scores 1 and 13 are unattainable",
  "max_score": 14,
  "score": 0,
  "predicted_asthma_percent": 3
}
```

## Errors

- HTTP 400 `invalid_pars`: PARS flags must be true or false as in Biagini Myers 2019 Table III / Fig E1. 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

- [Asthma Predictive Index](https://magentlab.com/docs/asthma-api) — Apply Castro-Rodriguez 2000 Table 1 and return stringent and loose Asthma Predictive Index flags from caller-assigned early-wheeze class and five major/minor criteria.
- [Modified Asthma Predictive Index](https://magentlab.com/docs/mapi) — Apply Guilbert 2004 PEAK Table I and return a binary modified Asthma Predictive Index flag from caller-assigned history of 4 or more wheezing episodes and six major/minor criteria.
- [PIAMA](https://magentlab.com/docs/piama) — Sum the Caudri 2009 PIAMA Table III decimal clinical prediction weights for preschool children with symptoms suggestive of asthma and return below_10 (score < 10) and ge_30 (score ≥ 30).

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