GI · LIVE
Pediatric ulcerative colitis activity index (PUCAI)
PUCAI
Sum six caller-assigned Turner 2007 PUCAI item points and return the published total (max 85) with activity band.
Markdown: /docs/pucai.md · Canonical: https://magentlab.com/docs/pucai
Not a medical device. Not a diagnosis or dosing recommendation.
What it computes
Sum six caller-assigned Turner 2007 PUCAI item points and return the published total (max 85) with activity band.
When to use
Returns the total and published activity band, not a diagnosis, adult Mayo score, or treatment order from caller-assigned Turner 2007 published point values for the six PUCAI items.
When not to use
- Not a medical device and not a diagnosis of ulcerative colitis or a treatment order.
- Each of the six items is a caller-assigned published point value from Turner 2007. Magent does not examine the child.
- Pediatric ulcerative colitis activity index (PUCAI). No age parameter. Not the adult Mayo score or UCDAI.
- Activity bands follow Turner 2007: <10 remission, 10-34 mild (10 and 34 are mild), 35-64 moderate (35 and 64 are moderate), ≥65 severe (65 is severe). Magent does not add unofficial adult cutoffs.
Formula
PUCAI = abdominal_pain + rectal_bleeding + stool_consistency_of_most + stools_per_24h + nocturnal_stools + activity_level; Turner 2007 caller-assigned item points; max 85; <10 remission, 10-34 mild, 35-64 moderate, ≥65 severe
Citation
- Authors
- Turner D, Otley AR, Mack D, et al.
- Source
- Gastroenterology. 2007;133(2):423-432
Worked example
All items 0
Given:
abdominal_pain=0activity_level=0nocturnal_stools=0rectal_bleeding=0stool_consistency_of_most=0stools_per_24h=0
- abdominal_pain 0 + rectal_bleeding 0 + stool_consistency_of_most 0 + stools_per_24h 0 + nocturnal_stools 0 + activity_level 0
- Score = 0 (max 85), activity_band remission
All items maximum
Given:
abdominal_pain=10activity_level=10nocturnal_stools=10rectal_bleeding=30stool_consistency_of_most=10stools_per_24h=15
- abdominal_pain 10 + rectal_bleeding 30 + stool_consistency_of_most 10 + stools_per_24h 15 + nocturnal_stools 10 + activity_level 10
- Score = 85 (max 85), activity_band severe
Also searched as
- PUCAI
- pediatric ulcerative colitis activity index
- Turner PUCAI
- pediatric UC activity
- PUCAI score
- ulcerative colitis children
- Turner 2007 PUCAI
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/pucai?abdominal_pain=0&rectal_bleeding=0&stool_consistency_of_most=0&stools_per_24h=0&nocturnal_stools=0&activity_level=0
Call
Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params
return HTTP 400 before any quote or charge.
curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/pucai?abdominal_pain=0&rectal_bleeding=0&stool_consistency_of_most=0&stools_per_24h=0&nocturnal_stools=0&activity_level=0"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
abdominal_pain |
integer | required | Caller-assigned Turner 2007 PUCAI abdominal pain points (integer 0, 5, or 10): 0 no pain; 5 pain can be ignored; 10 pain cannot be ignored. magent does not examine the child. |
rectal_bleeding |
integer | required | Caller-assigned Turner 2007 PUCAI rectal bleeding points (integer 0, 10, 20, or 30): 0 none; 10 small amount only, in less than 50% of stools; 20 small amount with most stools; 30 large amount (>50% of the stool content). magent does not examine the child. |
stool_consistency_of_most |
integer | required | Caller-assigned Turner 2007 PUCAI stool consistency of most stools points (integer 0, 5, or 10): 0 formed; 5 partially formed; 10 completely unformed. magent does not examine the child. |
stools_per_24h |
integer | required | Caller-assigned Turner 2007 PUCAI number of stools per 24 hours points (integer 0, 5, 10, or 15): 0 for 0-2 stools; 5 for 3-5; 10 for 6-8; 15 for >8. magent does not examine the child. |
nocturnal_stools |
integer | required | Caller-assigned Turner 2007 PUCAI nocturnal stools points (integer 0 or 10): 0 no; 10 yes (any episode causing wakening). magent does not examine the child. |
activity_level |
integer | required | Caller-assigned Turner 2007 PUCAI activity level points (integer 0, 5, or 10): 0 no limitation of activity; 5 occasional limitation of activity; 10 severe restricted activity. 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.
- 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 (fixture)
{
"items": [
{
"abdominal_pain": "0",
"activity_level": "0",
"nocturnal_stools": "0",
"rectal_bleeding": "0",
"stool_consistency_of_most": "0",
"stools_per_24h": "0"
},
{
"abdominal_pain": "0",
"activity_level": "0",
"nocturnal_stools": "0",
"rectal_bleeding": "0",
"stool_consistency_of_most": "0",
"stools_per_24h": "0"
}
]
}
Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.
Example 200 (fixture)
{
"count": 2,
"path": "/api/calc/pucai",
"items": [
{
"components": [
{
"value": 0,
"factor": "abdominal_pain",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "rectal_bleeding",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "stool_consistency_of_most",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "stools_per_24h",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "nocturnal_stools",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "activity_level",
"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": "Turner D, Otley AR, Mack D, et al.",
"doi": "10.1053/j.gastro.2007.05.029",
"id": "turner-2007",
"pmid": "17681163",
"source": "Gastroenterology. 2007;133(2):423-432",
"title": "Development, validation, and evaluation of a pediatric ulcerative colitis activity index: a prospective multicenter study"
},
"formula": "pucai",
"formula_expression": "PUCAI = abdominal_pain + rectal_bleeding + stool_consistency_of_most + stools_per_24h + nocturnal_stools + activity_level; Turner 2007 caller-assigned item points; max 85; <10 remission, 10-34 mild, 35-64 moderate, ≥65 severe",
"max_score": 85,
"score": 0,
"abdominal_pain": 0,
"rectal_bleeding": 0,
"activity_band": "remission",
"activity_level": 0,
"nocturnal_stools": 0,
"stool_consistency_of_most": 0,
"stools_per_24h": 0
},
{
"components": [
{
"value": 0,
"factor": "abdominal_pain",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "rectal_bleeding",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "stool_consistency_of_most",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "stools_per_24h",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "nocturnal_stools",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "activity_level",
"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": "Turner D, Otley AR, Mack D, et al.",
"doi": "10.1053/j.gastro.2007.05.029",
"id": "turner-2007",
"pmid": "17681163",
"source": "Gastroenterology. 2007;133(2):423-432",
"title": "Development, validation, and evaluation of a pediatric ulcerative colitis activity index: a prospective multicenter study"
},
"formula": "pucai",
"formula_expression": "PUCAI = abdominal_pain + rectal_bleeding + stool_consistency_of_most + stools_per_24h + nocturnal_stools + activity_level; Turner 2007 caller-assigned item points; max 85; <10 remission, 10-34 mild, 35-64 moderate, ≥65 severe",
"max_score": 85,
"score": 0,
"abdominal_pain": 0,
"rectal_bleeding": 0,
"activity_band": "remission",
"activity_level": 0,
"nocturnal_stools": 0,
"stool_consistency_of_most": 0,
"stools_per_24h": 0
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | pucai |
formula_expression |
string | Exact expression used |
score |
integer | PUCAI points 0-85 |
max_score |
integer | Always 85 |
activity_band |
string | Turner 2007 band: remission (<10), mild (10-34), moderate (35-64), or severe (≥65). Score 10 is mild; 34 is mild; 35 is moderate; 64 is moderate; 65 is severe. Not a diagnosis and not an adult Mayo cutoff. |
abdominal_pain |
integer | Caller-assigned abdominal pain points 0, 5, or 10 |
rectal_bleeding |
integer | Caller-assigned rectal bleeding points 0, 10, 20, or 30 |
stool_consistency_of_most |
integer | Caller-assigned stool consistency of most stools points 0, 5, or 10 |
stools_per_24h |
integer | Caller-assigned stools per 24 hours points 0, 5, 10, or 15 |
nocturnal_stools |
integer | Caller-assigned nocturnal stools points 0 or 10 |
activity_level |
integer | Caller-assigned activity level points 0, 5, or 10 |
components |
array | Per-item caller-assigned points |
citation |
object | Turner et al. Gastroenterology 2007 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"value": 0,
"factor": "abdominal_pain",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "rectal_bleeding",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "stool_consistency_of_most",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "stools_per_24h",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "nocturnal_stools",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "activity_level",
"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": "Turner D, Otley AR, Mack D, et al.",
"doi": "10.1053/j.gastro.2007.05.029",
"id": "turner-2007",
"pmid": "17681163",
"source": "Gastroenterology. 2007;133(2):423-432",
"title": "Development, validation, and evaluation of a pediatric ulcerative colitis activity index: a prospective multicenter study"
},
"formula": "pucai",
"formula_expression": "PUCAI = abdominal_pain + rectal_bleeding + stool_consistency_of_most + stools_per_24h + nocturnal_stools + activity_level; Turner 2007 caller-assigned item points; max 85; <10 remission, 10-34 mild, 35-64 moderate, ≥65 severe",
"max_score": 85,
"score": 0,
"abdominal_pain": 0,
"rectal_bleeding": 0,
"activity_band": "remission",
"activity_level": 0,
"nocturnal_stools": 0,
"stool_consistency_of_most": 0,
"stools_per_24h": 0
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_pucai |
each PUCAI item must be a published point value from Turner 2007. Returned before settlement; you are not charged. |
| 400 | invalid_items |
POST body must be a JSON object with only an items array Returned before settlement; you are not charged. |
| 400 | invalid_item_count |
items must be an array of 1 to 25 objects Returned before settlement; you are not charged. |
| 400 | invalid_item |
each items entry must be a JSON object Returned before settlement; you are not charged. |
Related tools
- Forrest — Return the Forrest 1974 endoscopic lesion class (ia, ib, iia, iib, iic, or iii) and published description from a caller-assigned token.
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. Unpaid valid requests return HTTP 402 with a base64
PAYMENT-REQUIRED
header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake
and shared payment errors: Payments.
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.