# Pediatric Crohn's Disease Activity Index (PCDAI)

PCDAI

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

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

## What it computes

Sum eleven caller-assigned Hyams 1991 PCDAI item points and return the published total (max 100). Does not return activity bands.

## When to use

When an agent has already assigned Hyams 1991 published point values for the eleven PCDAI items and needs the total, not a diagnosis, CDAI, SES-CD, PUCAI, hematocrit table, or later activity cutoffs.

## When not to use

- Not a medical device and not a diagnosis of Crohn's disease or a treatment order.
- Each of the eleven items is a caller-assigned published point value from Hyams 1991. magent does not examine the child or assign hematocrit age/sex tables.
- Pediatric Crohn's Disease Activity Index (PCDAI). Not the Best 1976 CDAI, not SES-CD, and not PUCAI.
- Hyams 1991 did not publish inactive, mild, or moderate cut scores. magent returns score and max_score only and does not apply later Hyams 2005 or other unofficial bands.

## Formula

```
PCDAI = abdominal_pain + stools + well_being + hematocrit + esr + albumin + weight + height + abdomen + perirectal + extra_intestinal; Hyams 1991 caller-assigned item points; hematocrit and esr 0, 2.5, or 5; remaining items 0, 5, or 10; max 100; no published activity bands
```

## Citation

[Development and validation of a pediatric Crohn's disease activity index](https://doi.org/10.1097/00005176-199105000-00001)
Hyams JS, Ferry GD, Mandel FS, et al.
J Pediatr Gastroenterol Nutr. 1991;12(4):439-447
DOI: [10.1097/00005176-199105000-00001](https://doi.org/10.1097/00005176-199105000-00001)

## Worked example

### All eleven items 0

Given: `abdomen=0, abdominal_pain=0, albumin=0, esr=0, extra_intestinal=0, height=0, hematocrit=0, perirectal=0, stools=0, weight=0, well_being=0`

1. abdominal_pain 0 + stools 0 + well_being 0 + hematocrit 0 + esr 0 + albumin 0 + weight 0 + height 0 + abdomen 0 + perirectal 0 + extra_intestinal 0
2. Score = 0 (max 100). No activity band.


### Published theoretical maximum

Given: `abdomen=10, abdominal_pain=10, albumin=10, esr=5, extra_intestinal=10, height=10, hematocrit=5, perirectal=10, stools=10, weight=10, well_being=10`

1. abdominal_pain 10 + stools 10 + well_being 10 + hematocrit 5 + esr 5 + albumin 10 + weight 10 + height 10 + abdomen 10 + perirectal 10 + extra_intestinal 10
2. Score = 100 (max 100). No activity band.


## Also searched as

- PCDAI
- pediatric Crohn's disease activity index
- Hyams PCDAI
- pediatric Crohn activity
- PCDAI score
- Crohn's disease children
- Hyams 1991 PCDAI
- pediatric Crohn index

## Parameters

- `abdominal_pain` (integer, required): Caller-assigned Hyams 1991 PCDAI abdominal pain points (integer 0, 5, or 10): 0 none; 5 mild (brief, does not interfere with activities); 10 moderate/severe (daily, longer lasting, affects activities, nocturnal). magent does not examine the child.
- `stools` (integer, required): Caller-assigned Hyams 1991 PCDAI stools per day points (integer 0, 5, or 10): 0 for 0-1 liquid stools, no blood; 5 for up to 2 semi-formed with small blood, or 2-5 liquid; 10 for gross bleeding, or ≥6 liquid, or nocturnal diarrhea. magent does not examine the child.
- `well_being` (integer, required): Caller-assigned Hyams 1991 PCDAI patient functioning / general well-being points (integer 0, 5, or 10): 0 no limitation of activities, well; 5 occasional difficulty in maintaining age-appropriate activities; 10 frequent limitation of activities, very poor. magent does not examine the child.
- `hematocrit` (number, required): Caller-assigned Hyams 1991 PCDAI hematocrit points (number 0, 2.5, or 5). The paper's age- and sex-specific hematocrit table is applied by the caller. magent does not assign that table. magent does not examine the child.
- `esr` (number, required): Caller-assigned Hyams 1991 PCDAI erythrocyte sedimentation rate points (number 0, 2.5, or 5): 0 for ESR <20 mm/h; 2.5 for 20-50; 5 for >50. magent does not assay ESR. magent does not examine the child.
- `albumin` (integer, required): Caller-assigned Hyams 1991 PCDAI albumin points (integer 0, 5, or 10): 0 for albumin ≥3.5 g/dL; 5 for 3.1-3.4; 10 for ≤3.0. magent does not assay albumin. magent does not examine the child.
- `weight` (integer, required): Caller-assigned Hyams 1991 PCDAI weight points (integer 0, 5, or 10): 0 weight gain or voluntary stable/loss; 5 involuntary stable or weight loss 1-9%; 10 weight loss ≥10%. magent does not examine the child.
- `height` (integer, required): Caller-assigned Hyams 1991 PCDAI height points (integer 0, 5, or 10): at diagnosis 0 <1 channel decrease, 5 ≥1 and <2 channel decrease, 10 ≥2 channel decrease; at follow-up 0 height velocity ≥-1 SD, 5 <-1 SD and >-2 SD, 10 ≤-2 SD. magent does not measure height. magent does not examine the child.
- `abdomen` (integer, required): Caller-assigned Hyams 1991 PCDAI abdomen points (integer 0, 5, or 10): 0 no tenderness, no mass; 5 tenderness, or mass without tenderness; 10 tenderness, involuntary guarding, definite mass. magent does not examine the child.
- `perirectal` (integer, required): Caller-assigned Hyams 1991 PCDAI perirectal disease points (integer 0, 5, or 10): 0 none, asymptomatic tags; 5 1-2 indolent fistula, scant drainage, no tenderness; 10 active fistula, drainage, tenderness, or abscess. magent does not examine the child.
- `extra_intestinal` (integer, required): Caller-assigned Hyams 1991 PCDAI extra-intestinal manifestation points (integer 0, 5, or 10): 0 none; 5 one; 10 two or more (fever ≥38.5°C for 3 days over the past week, arthritis, uveitis, erythema nodosum, pyoderma gangrenosum). magent does not examine the child.

## 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/pcdai`
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": [
    {
      "abdomen": "0",
      "abdominal_pain": "0",
      "albumin": "0",
      "esr": "0",
      "extra_intestinal": "0",
      "height": "0",
      "hematocrit": "0",
      "perirectal": "0",
      "stools": "0",
      "weight": "0",
      "well_being": "0"
    },
    {
      "abdomen": "0",
      "abdominal_pain": "0",
      "albumin": "0",
      "esr": "0",
      "extra_intestinal": "0",
      "height": "0",
      "hematocrit": "0",
      "perirectal": "0",
      "stools": "0",
      "weight": "0",
      "well_being": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/pcdai",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "abdominal_pain",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "stools",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "well_being",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "hematocrit",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "esr",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "albumin",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "weight",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "height",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "abdomen",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "perirectal",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "extra_intestinal",
          "points": 0,
          "present": true
        }
      ],
      "weight": 0,
      "height": 0,
      "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": "Hyams JS, Ferry GD, Mandel FS, et al.",
        "doi": "10.1097/00005176-199105000-00001",
        "id": "hyams-1991",
        "pmid": "1678008",
        "source": "J Pediatr Gastroenterol Nutr. 1991;12(4):439-447",
        "title": "Development and validation of a pediatric Crohn's disease activity index"
      },
      "formula": "pcdai",
      "formula_expression": "PCDAI = abdominal_pain + stools + well_being + hematocrit + esr + albumin + weight + height + abdomen + perirectal + extra_intestinal; Hyams 1991 caller-assigned item points; hematocrit and esr 0, 2.5, or 5; remaining items 0, 5, or 10; max 100; no published activity bands",
      "max_score": 100,
      "score": 0,
      "abdominal_pain": 0,
      "well_being": 0,
      "abdomen": 0,
      "albumin": 0,
      "esr": 0,
      "extra_intestinal": 0,
      "hematocrit": 0,
      "perirectal": 0,
      "stools": 0
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "abdominal_pain",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "stools",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "well_being",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "hematocrit",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "esr",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "albumin",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "weight",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "height",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "abdomen",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "perirectal",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "extra_intestinal",
          "points": 0,
          "present": true
        }
      ],
      "weight": 0,
      "height": 0,
      "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": "Hyams JS, Ferry GD, Mandel FS, et al.",
        "doi": "10.1097/00005176-199105000-00001",
        "id": "hyams-1991",
        "pmid": "1678008",
        "source": "J Pediatr Gastroenterol Nutr. 1991;12(4):439-447",
        "title": "Development and validation of a pediatric Crohn's disease activity index"
      },
      "formula": "pcdai",
      "formula_expression": "PCDAI = abdominal_pain + stools + well_being + hematocrit + esr + albumin + weight + height + abdomen + perirectal + extra_intestinal; Hyams 1991 caller-assigned item points; hematocrit and esr 0, 2.5, or 5; remaining items 0, 5, or 10; max 100; no published activity bands",
      "max_score": 100,
      "score": 0,
      "abdominal_pain": 0,
      "well_being": 0,
      "abdomen": 0,
      "albumin": 0,
      "esr": 0,
      "extra_intestinal": 0,
      "hematocrit": 0,
      "perirectal": 0,
      "stools": 0
    }
  ]
}
```

## Response fields

- `formula` (string): pcdai
- `formula_expression` (string): Exact expression used
- `score` (number): Hyams 1991 PCDAI points 0-100. Half-points (2.5) occur when hematocrit or esr is 2.5.
- `max_score` (integer): Always 100
- `abdominal_pain` (integer): Caller-assigned abdominal pain points 0, 5, or 10
- `stools` (integer): Caller-assigned stools points 0, 5, or 10
- `well_being` (integer): Caller-assigned well-being points 0, 5, or 10
- `hematocrit` (number): Caller-assigned hematocrit points 0, 2.5, or 5
- `esr` (number): Caller-assigned ESR points 0, 2.5, or 5
- `albumin` (integer): Caller-assigned albumin points 0, 5, or 10
- `weight` (integer): Caller-assigned weight points 0, 5, or 10
- `height` (integer): Caller-assigned height points 0, 5, or 10
- `abdomen` (integer): Caller-assigned abdomen points 0, 5, or 10
- `perirectal` (integer): Caller-assigned perirectal points 0, 5, or 10
- `extra_intestinal` (integer): Caller-assigned extra-intestinal points 0, 5, or 10
- `components` (array): Per-item caller-assigned points
- `citation` (object): Hyams et al. J Pediatr Gastroenterol Nutr 1991 citation
- `disclaimer` (string): Not a medical device

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 0,
      "factor": "abdominal_pain",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "stools",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "well_being",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "hematocrit",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "esr",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "albumin",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "weight",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "height",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "abdomen",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "perirectal",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "extra_intestinal",
      "points": 0,
      "present": true
    }
  ],
  "weight": 0,
  "height": 0,
  "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": "Hyams JS, Ferry GD, Mandel FS, et al.",
    "doi": "10.1097/00005176-199105000-00001",
    "id": "hyams-1991",
    "pmid": "1678008",
    "source": "J Pediatr Gastroenterol Nutr. 1991;12(4):439-447",
    "title": "Development and validation of a pediatric Crohn's disease activity index"
  },
  "formula": "pcdai",
  "formula_expression": "PCDAI = abdominal_pain + stools + well_being + hematocrit + esr + albumin + weight + height + abdomen + perirectal + extra_intestinal; Hyams 1991 caller-assigned item points; hematocrit and esr 0, 2.5, or 5; remaining items 0, 5, or 10; max 100; no published activity bands",
  "max_score": 100,
  "score": 0,
  "abdominal_pain": 0,
  "well_being": 0,
  "abdomen": 0,
  "albumin": 0,
  "esr": 0,
  "extra_intestinal": 0,
  "hematocrit": 0,
  "perirectal": 0,
  "stools": 0
}
```

## Errors

- HTTP 400 `invalid_pcdai`: PCDAI items must be Hyams 1991 caller-assigned points: abdominal_pain, stools, well_being, albumin, weight, height, abdomen, perirectal, and extra_intestinal each 0, 5, or 10; hematocrit and esr each 0, 2.5, or 5. 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

- [CDAI](https://magentlab.com/docs/cdai) — Compute the Best 1976 Crohn's disease activity index from eight caller-assigned variables and return the rounded integer score. Does not return later trial activity bands.
- [SES-CD](https://magentlab.com/docs/ses-cd) — Sum four caller-assigned Daperno 2004 SES-CD integers (ulcers, ulcerated_surface, affected_surface, narrowings; each 0-3) in each of five ileocolonic segments (ileum, right_colon, transverse_colon, left_colon, rectum) and return the total (max 60). Does not return activity bands.
- [PUCAI](https://magentlab.com/docs/pucai) — Sum six caller-assigned Turner 2007 PUCAI item points and return the published total (max 85) with activity band.
- [HBI](https://magentlab.com/docs/harvey-bradshaw) — Sum Harvey 1980 simple-index items (previous-day well-being, abdominal pain, liquid stools, abdominal mass, and one point per listed complication) and return the total. Does not return later remission or activity bands.

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