# AAP pediatric blood pressure

AAP pediatric BP

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/aap_pediatric_bp`
HTML: https://magentlab.com/docs/aap-pediatric-bp
Markdown: https://magentlab.com/docs/aap-pediatric-bp.md

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

## What it computes

Apply Flynn 2017 Table 3 and return the more severe of the systolic and diastolic pediatric blood-pressure categories (normal, elevated, stage_1, or stage_2) from completed age and cuff readings, using caller-assigned 90th and 95th mm Hg for age 1-12.

## When to use

When an agent already has a cuff systolic and diastolic reading and completed age 1-17 years and needs the published AAP 2017 Table 3 category. For age 1-12 the caller must assign that child's 90th and 95th mm Hg from the guideline tables. magent does not measure blood pressure or interpolate height or sex tables. Not the 2004 Fourth Report and not adult ACC/AHA 2017 for age <13.

## When not to use

- Not a medical device and not a hypertension diagnosis.
- magent does not measure blood pressure. systolic_mm_hg and diastolic_mm_hg are caller-supplied cuff readings.
- Age 1-12 requires caller-assigned AAP-table 90th and 95th mm Hg. magent does not embed or interpolate the height/sex percentile tables.
- Age ≥13 uses Table 3 adult-aligned cutoffs. Percentile fields must be omitted for that band.
- This tool is Flynn 2017 Table 3 only. Not the 2004 Fourth Report. Not adult ACC/AHA 2017 for age <13.

## Formula

```
AAP 2017 Flynn Table 3 category is the more severe of the systolic and diastolic limbs (normal | elevated | stage_1 | stage_2). Age ≥13 (adult-aligned): normal if SBP <120 and DBP <80; elevated if SBP 120–129 and DBP <80; stage_1 if SBP 130–139 or DBP 80–89 and not stage_2; stage_2 if SBP ≥140 or DBP ≥90. Age 1–12 (caller-assigned AAP-table 90th and 95th mm Hg; magent does not interpolate Tables 4/5): stage_2 if SBP ≥ min(sbp_p95+12, 140) or DBP ≥ min(dbp_p95+12, 90); else stage_1 if SBP ≥ min(sbp_p95, 130) or DBP ≥ min(dbp_p95, 80); else elevated if SBP ≥ min(sbp_p90, 120) or DBP ≥ min(dbp_p90, 80); else normal. Percentile fields are required for age 1–12 and must be omitted for age ≥13. magent does not measure BP
```

## Citation

[Clinical Practice Guideline for Screening and Management of High Blood Pressure in Children and Adolescents](https://doi.org/10.1542/peds.2017-1904)
Flynn JT, Kaelber DC, Baker-Smith CM, et al; Subcommittee on Screening and Management of High Blood Pressure in Children
Pediatrics. 2017;140(3):e20171904
DOI: [10.1542/peds.2017-1904](https://doi.org/10.1542/peds.2017-1904)

## Worked example

### Age 15, 118/72: normal (Table 3 ≥13)

Given: `age_years=15, diastolic_mm_hg=72, systolic_mm_hg=118`

1. age_years 15 uses Table 3 adult-aligned cutoffs; percentile fields omitted
2. SBP 118 < 120 and DBP 72 < 80 → category normal


### Age 15, 124/70: elevated

Given: `age_years=15, diastolic_mm_hg=70, systolic_mm_hg=124`

1. SBP 124 is 120–129 and DBP 70 < 80 → category elevated


### Age 15, 135/85: stage_1

Given: `age_years=15, diastolic_mm_hg=85, systolic_mm_hg=135`

1. SBP 135 is 130–139 and DBP 85 is 80–89, and neither limb is stage_2 → category stage_1


### Age 15, 142/90: stage_2

Given: `age_years=15, diastolic_mm_hg=90, systolic_mm_hg=142`

1. SBP 142 ≥ 140 or DBP 90 ≥ 90 → category stage_2


### Age 8, 100/60 with caller p90 108/66 and p95 115/74: normal

Given: `age_years=8, dbp_p90_mm_hg=66, dbp_p95_mm_hg=74, diastolic_mm_hg=60, sbp_p90_mm_hg=108, sbp_p95_mm_hg=115, systolic_mm_hg=100`

1. stage_2 cutoffs min(115+12, 140)=127 and min(74+12, 90)=86
2. stage_1 cutoffs min(115, 130)=115 and min(74, 80)=74
3. elevated cutoffs min(108, 120)=108 and min(66, 80)=66
4. SBP 100 and DBP 60 are below those floors → category normal


## Also searched as

- AAP 2017 pediatric blood pressure
- Flynn 2017 Table 3
- pediatric hypertension category
- AAP CPG high blood pressure children
- pediatric BP stage 1
- pediatric elevated BP
- Flynn pediatric BP thresholds
- AAP 2017 BP screening

## Parameters

- `age_years` (integer, required): Completed age in years, integer 1-17 (Flynn 2017 Table 3). Age 1-12 uses the left-column percentile rule and requires caller 90th/95th mm Hg. Age 13-17 uses the right-column adult-aligned cutoffs and must omit percentile fields. Age 0 and age ≥18 are rejected.
- `systolic_mm_hg` (number, required): Caller-assigned cuff systolic blood pressure in mm Hg (50-250). magent does not measure blood pressure.
- `diastolic_mm_hg` (number, required): Caller-assigned cuff diastolic blood pressure in mm Hg (20-160). Must be less than systolic. magent does not measure blood pressure.
- `sbp_p90_mm_hg` (number, optional): Caller-assigned AAP Table 4/5 systolic 90th percentile in mm Hg for that child (40-180, and must be < sbp_p95_mm_hg). Required for age 1-12. Must be omitted for age ≥13. magent does not interpolate height or sex tables.
- `sbp_p95_mm_hg` (number, optional): Caller-assigned AAP Table 4/5 systolic 95th percentile in mm Hg for that child (40-180, and must be > sbp_p90_mm_hg). Required for age 1-12. Must be omitted for age ≥13. magent does not interpolate height or sex tables.
- `dbp_p90_mm_hg` (number, optional): Caller-assigned AAP Table 4/5 diastolic 90th percentile in mm Hg for that child (40-180, and must be < dbp_p95_mm_hg). Required for age 1-12. Must be omitted for age ≥13. magent does not interpolate height or sex tables.
- `dbp_p95_mm_hg` (number, optional): Caller-assigned AAP Table 4/5 diastolic 95th percentile in mm Hg for that child (40-180, and must be > dbp_p90_mm_hg). Required for age 1-12. Must be omitted for age ≥13. magent does not interpolate height or sex tables.

## 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/aap_pediatric_bp`
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_years": "15",
      "diastolic_mm_hg": "72",
      "systolic_mm_hg": "118"
    },
    {
      "age_years": "15",
      "diastolic_mm_hg": "72",
      "systolic_mm_hg": "118"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/aap_pediatric_bp",
  "items": [
    {
      "components": [
        {
          "value": 140.0,
          "factor": "systolic_stage_2",
          "met": false
        },
        {
          "value": 90.0,
          "factor": "diastolic_stage_2",
          "met": false
        },
        {
          "value": 130.0,
          "factor": "systolic_stage_1",
          "met": false
        },
        {
          "value": 80.0,
          "factor": "diastolic_stage_1",
          "met": false
        },
        {
          "value": 120.0,
          "factor": "systolic_elevated",
          "met": false
        },
        {
          "value": 80.0,
          "factor": "diastolic_elevated",
          "met": false
        }
      ],
      "category": "normal",
      "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": "Flynn JT, Kaelber DC, Baker-Smith CM, et al; Subcommittee on Screening and Management of High Blood Pressure in Children",
        "doi": "10.1542/peds.2017-1904",
        "id": "flynn-2017",
        "pmid": "29192011",
        "source": "Pediatrics. 2017;140(3):e20171904",
        "title": "Clinical Practice Guideline for Screening and Management of High Blood Pressure in Children and Adolescents"
      },
      "formula": "aap_pediatric_bp",
      "formula_expression": "AAP 2017 Flynn Table 3 category is the more severe of the systolic and diastolic limbs (normal | elevated | stage_1 | stage_2). Age ≥13 (adult-aligned): normal if SBP <120 and DBP <80; elevated if SBP 120–129 and DBP <80; stage_1 if SBP 130–139 or DBP 80–89 and not stage_2; stage_2 if SBP ≥140 or DBP ≥90. Age 1–12 (caller-assigned AAP-table 90th and 95th mm Hg; magent does not interpolate Tables 4/5): stage_2 if SBP ≥ min(sbp_p95+12, 140) or DBP ≥ min(dbp_p95+12, 90); else stage_1 if SBP ≥ min(sbp_p95, 130) or DBP ≥ min(dbp_p95, 80); else elevated if SBP ≥ min(sbp_p90, 120) or DBP ≥ min(dbp_p90, 80); else normal. Percentile fields are required for age 1–12 and must be omitted for age ≥13. magent does not measure BP",
      "age_years": 15,
      "systolic_mm_hg": 118.0,
      "diastolic_mm_hg": 72.0
    },
    {
      "components": [
        {
          "value": 140.0,
          "factor": "systolic_stage_2",
          "met": false
        },
        {
          "value": 90.0,
          "factor": "diastolic_stage_2",
          "met": false
        },
        {
          "value": 130.0,
          "factor": "systolic_stage_1",
          "met": false
        },
        {
          "value": 80.0,
          "factor": "diastolic_stage_1",
          "met": false
        },
        {
          "value": 120.0,
          "factor": "systolic_elevated",
          "met": false
        },
        {
          "value": 80.0,
          "factor": "diastolic_elevated",
          "met": false
        }
      ],
      "category": "normal",
      "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": "Flynn JT, Kaelber DC, Baker-Smith CM, et al; Subcommittee on Screening and Management of High Blood Pressure in Children",
        "doi": "10.1542/peds.2017-1904",
        "id": "flynn-2017",
        "pmid": "29192011",
        "source": "Pediatrics. 2017;140(3):e20171904",
        "title": "Clinical Practice Guideline for Screening and Management of High Blood Pressure in Children and Adolescents"
      },
      "formula": "aap_pediatric_bp",
      "formula_expression": "AAP 2017 Flynn Table 3 category is the more severe of the systolic and diastolic limbs (normal | elevated | stage_1 | stage_2). Age ≥13 (adult-aligned): normal if SBP <120 and DBP <80; elevated if SBP 120–129 and DBP <80; stage_1 if SBP 130–139 or DBP 80–89 and not stage_2; stage_2 if SBP ≥140 or DBP ≥90. Age 1–12 (caller-assigned AAP-table 90th and 95th mm Hg; magent does not interpolate Tables 4/5): stage_2 if SBP ≥ min(sbp_p95+12, 140) or DBP ≥ min(dbp_p95+12, 90); else stage_1 if SBP ≥ min(sbp_p95, 130) or DBP ≥ min(dbp_p95, 80); else elevated if SBP ≥ min(sbp_p90, 120) or DBP ≥ min(dbp_p90, 80); else normal. Percentile fields are required for age 1–12 and must be omitted for age ≥13. magent does not measure BP",
      "age_years": 15,
      "systolic_mm_hg": 118.0,
      "diastolic_mm_hg": 72.0
    }
  ]
}
```

## Response fields

- `formula` (string): aap_pediatric_bp
- `formula_expression` (string): Published Flynn 2017 Table 3 pediatric BP category rule
- `category` (string): More severe of the systolic and diastolic limbs: normal, elevated, stage_1, or stage_2. Not a hypertension diagnosis.
- `age_years` (integer): Echo of completed age in years (1-17)
- `systolic_mm_hg` (number): Echo of cuff systolic mm Hg
- `diastolic_mm_hg` (number): Echo of cuff diastolic mm Hg
- `components` (array): Tree rows for systolic_stage_2, diastolic_stage_2, systolic_stage_1, diastolic_stage_1, systolic_elevated, and diastolic_elevated with factor, met, and value (the limb cutoff in mm Hg)
- `citation` (object): Flynn 2017 Pediatrics citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 140.0,
      "factor": "systolic_stage_2",
      "met": false
    },
    {
      "value": 90.0,
      "factor": "diastolic_stage_2",
      "met": false
    },
    {
      "value": 130.0,
      "factor": "systolic_stage_1",
      "met": false
    },
    {
      "value": 80.0,
      "factor": "diastolic_stage_1",
      "met": false
    },
    {
      "value": 120.0,
      "factor": "systolic_elevated",
      "met": false
    },
    {
      "value": 80.0,
      "factor": "diastolic_elevated",
      "met": false
    }
  ],
  "category": "normal",
  "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": "Flynn JT, Kaelber DC, Baker-Smith CM, et al; Subcommittee on Screening and Management of High Blood Pressure in Children",
    "doi": "10.1542/peds.2017-1904",
    "id": "flynn-2017",
    "pmid": "29192011",
    "source": "Pediatrics. 2017;140(3):e20171904",
    "title": "Clinical Practice Guideline for Screening and Management of High Blood Pressure in Children and Adolescents"
  },
  "formula": "aap_pediatric_bp",
  "formula_expression": "AAP 2017 Flynn Table 3 category is the more severe of the systolic and diastolic limbs (normal | elevated | stage_1 | stage_2). Age ≥13 (adult-aligned): normal if SBP <120 and DBP <80; elevated if SBP 120–129 and DBP <80; stage_1 if SBP 130–139 or DBP 80–89 and not stage_2; stage_2 if SBP ≥140 or DBP ≥90. Age 1–12 (caller-assigned AAP-table 90th and 95th mm Hg; magent does not interpolate Tables 4/5): stage_2 if SBP ≥ min(sbp_p95+12, 140) or DBP ≥ min(dbp_p95+12, 90); else stage_1 if SBP ≥ min(sbp_p95, 130) or DBP ≥ min(dbp_p95, 80); else elevated if SBP ≥ min(sbp_p90, 120) or DBP ≥ min(dbp_p90, 80); else normal. Percentile fields are required for age 1–12 and must be omitted for age ≥13. magent does not measure BP",
  "age_years": 15,
  "systolic_mm_hg": 118.0,
  "diastolic_mm_hg": 72.0
}
```

## Errors

- HTTP 400 `invalid_aap_pediatric_bp`: AAP 2017 pediatric BP inputs must match Flynn Table 3 age 1-17, systolic/diastolic mm Hg, and for age 1-12 caller-assigned 90th and 95th mm Hg from that guideline. 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

- [MAP](https://magentlab.com/docs/map) — Compute conventional estimated mean arterial pressure from cuff systolic and diastolic pressures.
- [Shock index](https://magentlab.com/docs/shock-index) — Compute the Allgöwer–Burri shock index as heart rate in bpm divided by cuff systolic pressure in mm Hg.

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