# Preschool Respiratory Assessment Measure (PRAM)

PRAM

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

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

## What it computes

Sum five caller-assigned Chalut 2000 PRAM item points and return the published 0-12 total.

## When to use

When an agent has already assigned published Chalut 2000 points for oxygen saturation, suprasternal retractions, scalene contraction, air entry, and wheezing and needs the 0-12 total. magent does not auscultate, measure saturation, or diagnose asthma.

## When not to use

- Not a medical device and not an asthma diagnosis or a treatment or admission order.
- Each of the five items is a caller-assigned published point value from Chalut 2000. magent does not auscultate, measure oxygen saturation, or examine the patient.
- Chalut 2000 5-item index, max 12. Score only; magent does not emit mild/moderate/severe 0-3/4-7/8-12 bands. Ducharme 2008 validated the same 5-item 12-point score in ages 2-17 and is not used here as extra cutoffs.
- Not the Westley 1978 croup score.

## Formula

```
PRAM = oxygen_sat_points + suprasternal + scalene + air_entry + wheezing; Chalut 2000 caller-assigned points; oxygen_sat_points 0/1/2, suprasternal 0/2, scalene 0/2, air_entry 0-3, wheezing 0-3; max 12
```

## Citation

[The Preschool Respiratory Assessment Measure (PRAM): a responsive index of acute asthma severity](https://doi.org/10.1067/mpd.2000.110562)
Chalut DS, Ducharme FM, Davis GM
J Pediatr. 2000;137(6):762-768
DOI: [10.1067/mpd.2000.110562](https://doi.org/10.1067/mpd.2000.110562)

## Worked example

### All items 0

Given: `air_entry=0, oxygen_sat_points=0, scalene=0, suprasternal=0, wheezing=0`

1. oxygen_sat_points 0 + suprasternal 0 + scalene 0 + air_entry 0 + wheezing 0
2. Score = 0 (max 12)


### Maximum 12

Given: `air_entry=3, oxygen_sat_points=2, scalene=2, suprasternal=2, wheezing=3`

1. oxygen_sat_points 2 + suprasternal 2 + scalene 2 + air_entry 3 + wheezing 3
2. Score = 12 (max 12)


## Also searched as

- Preschool Respiratory Assessment Measure
- PRAM
- PRAM asthma
- Chalut PRAM
- PRAM 2000
- preschool asthma score
- PRAM score
- acute asthma PRAM

## Parameters

- `oxygen_sat_points` (integer, required): Caller-assigned Chalut 2000 PRAM oxygen saturation points (integer 0, 1, or 2): 0 if ≥95%; 1 if 92-94%; 2 if <92%. magent does not measure oxygen saturation.
- `suprasternal` (integer, required): Caller-assigned Chalut 2000 PRAM suprasternal retractions (integer 0 or 2): 0 absent; 2 present. Not 1. magent does not examine the patient.
- `scalene` (integer, required): Caller-assigned Chalut 2000 PRAM scalene muscle contraction (integer 0 or 2): 0 absent; 2 present. Not 1. magent does not examine the patient.
- `air_entry` (integer, required): Caller-assigned Chalut 2000 PRAM air entry (integer 0, 1, 2, or 3): 0 normal; 1 decreased at the base; 2 decreased at the apex and base; 3 minimal or absent. magent does not auscultate.
- `wheezing` (integer, required): Caller-assigned Chalut 2000 PRAM wheezing (integer 0, 1, 2, or 3): 0 absent; 1 expiratory only; 2 inspiratory with or without expiratory; 3 audible without a stethoscope or silent chest. magent does not auscultate.

## 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/pram`
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": [
    {
      "air_entry": "0",
      "oxygen_sat_points": "0",
      "scalene": "0",
      "suprasternal": "0",
      "wheezing": "0"
    },
    {
      "air_entry": "0",
      "oxygen_sat_points": "0",
      "scalene": "0",
      "suprasternal": "0",
      "wheezing": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/pram",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "oxygen_sat_points",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "suprasternal",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "scalene",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "air_entry",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "wheezing",
          "points": 0,
          "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.",
      "citation": {
        "authors": "Chalut DS, Ducharme FM, Davis GM",
        "doi": "10.1067/mpd.2000.110562",
        "id": "chalut-2000",
        "pmid": "11113831",
        "source": "J Pediatr. 2000;137(6):762-768",
        "title": "The Preschool Respiratory Assessment Measure (PRAM): a responsive index of acute asthma severity"
      },
      "formula": "pram",
      "formula_expression": "PRAM = oxygen_sat_points + suprasternal + scalene + air_entry + wheezing; Chalut 2000 caller-assigned points; oxygen_sat_points 0/1/2, suprasternal 0/2, scalene 0/2, air_entry 0-3, wheezing 0-3; max 12",
      "max_score": 12,
      "score": 0
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "oxygen_sat_points",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "suprasternal",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "scalene",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "air_entry",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "wheezing",
          "points": 0,
          "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.",
      "citation": {
        "authors": "Chalut DS, Ducharme FM, Davis GM",
        "doi": "10.1067/mpd.2000.110562",
        "id": "chalut-2000",
        "pmid": "11113831",
        "source": "J Pediatr. 2000;137(6):762-768",
        "title": "The Preschool Respiratory Assessment Measure (PRAM): a responsive index of acute asthma severity"
      },
      "formula": "pram",
      "formula_expression": "PRAM = oxygen_sat_points + suprasternal + scalene + air_entry + wheezing; Chalut 2000 caller-assigned points; oxygen_sat_points 0/1/2, suprasternal 0/2, scalene 0/2, air_entry 0-3, wheezing 0-3; max 12",
      "max_score": 12,
      "score": 0
    }
  ]
}
```

## Response fields

- `formula` (string): pram
- `formula_expression` (string): Exact expression used
- `score` (integer): PRAM points 0-12
- `max_score` (integer): Always 12
- `components` (array): Per-item caller-assigned points
- `citation` (object): Chalut et al. J Pediatr 2000 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 0,
      "factor": "oxygen_sat_points",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "suprasternal",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "scalene",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "air_entry",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "wheezing",
      "points": 0,
      "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.",
  "citation": {
    "authors": "Chalut DS, Ducharme FM, Davis GM",
    "doi": "10.1067/mpd.2000.110562",
    "id": "chalut-2000",
    "pmid": "11113831",
    "source": "J Pediatr. 2000;137(6):762-768",
    "title": "The Preschool Respiratory Assessment Measure (PRAM): a responsive index of acute asthma severity"
  },
  "formula": "pram",
  "formula_expression": "PRAM = oxygen_sat_points + suprasternal + scalene + air_entry + wheezing; Chalut 2000 caller-assigned points; oxygen_sat_points 0/1/2, suprasternal 0/2, scalene 0/2, air_entry 0-3, wheezing 0-3; max 12",
  "max_score": 12,
  "score": 0
}
```

## Errors

- HTTP 400 `invalid_pram_item`: oxygen_sat_points 0-2, suprasternal 0 or 2, scalene 0 or 2, air_entry 0-3, and wheezing 0-3 (Chalut 2000). 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

- [Westley croup](https://magentlab.com/docs/westley-croup) — Sum the Westley 1978 croup clinical score from caller-assigned consciousness, cyanosis, stridor, air entry, and retractions (maximum 17).
- [GOLD spirometric grade](https://magentlab.com/docs/gold-copd) — Apply the 2017 GOLD executive summary spirometric classification: obstruction when post-bronchodilator FEV1/FVC is < 0.70, then GOLD grades 1-4 from FEV1 percent predicted.

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