Emergency · LIVE
Nama 2022 BRUE risk probabilities
BRUE 2.0
Compute the Nama 2022 Supplemental Table 7 logistic probabilities of a serious underlying diagnosis and of event recurrence from age in days, similar-event history, abnormal medical history, prematurity, event clusters, color change, abnormal respiratory pattern, and tone change.
Markdown: /docs/brue-2.md · Canonical: https://magentlab.com/docs/brue-2
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute the Nama 2022 Supplemental Table 7 logistic probabilities of a serious underlying diagnosis and of event recurrence from age in days, similar-event history, abnormal medical history, prematurity, event clusters, color change, abnormal respiratory pattern, and tone change.
When to use
When an agent already has a brief resolved unexplained event and needs the published Nama 2022 probabilities. Do not invent an admission cutoff. magent does not examine the infant.
When not to use
- Not a medical device. Not a diagnosis.
- Nama 2022 Supplemental Table 7 logistic models only. magent does not apply a definition box and does not invent an admission cutoff.
- The caller assigns that the infant already meets a brief resolved unexplained event and assigns every flag. magent does not examine the infant or take a history.
- Age is 0-364 days. Recurrence in the derivation cohort was during the index emergency or hospital visit.
- Abnormal respiratory pattern and tone change have negative recurrence coefficients as published. Nama 2022 publishes no low or high percent cutoff.
Formula
Ls = -3.75 + 0.56*history_of_similar_event + 0.65*abnormal_medical_history + 0.0025*age_days; Lr = -2.44 + 0.46*prematurity + 0.58*history_of_similar_event + 1.17*history_of_event_clusters + 0.36*color_change - 0.32*abnormal_respiratory_pattern - 0.31*tone_change (Nama 2022 Supplemental Table 7); estimated_serious_diagnosis_percent = 100 * exp(Ls) / (1 + exp(Ls)); estimated_event_recurrence_percent = 100 * exp(Lr) / (1 + exp(Lr))
Citation
- Authors
- Nama N, Hall M, Neuman M, et al.
- Source
- Hosp Pediatr. 2022;12(9):772-785
Worked example
Age 90 days, all flags false
Given:
abnormal_medical_history=falseabnormal_respiratory_pattern=falseage_days=90color_change=falsehistory_of_event_clusters=falsehistory_of_similar_event=falseprematurity=falsetone_change=false
- Ls = -3.75 + 0.0025×90 = -3.525
- estimated_serious_diagnosis_percent = 100 × e^(-3.525) / (1 + e^(-3.525))
- Lr = -2.44 with all recurrence flags false
- estimated_event_recurrence_percent from the unrounded logit
Age 0 days, all flags false
Given:
abnormal_medical_history=falseabnormal_respiratory_pattern=falseage_days=0color_change=falsehistory_of_event_clusters=falsehistory_of_similar_event=falseprematurity=falsetone_change=false
- Ls = -3.75 + 0.0025×0 = -3.75
- Lr = -2.44
Age 90 days, prior similar event
Given:
abnormal_medical_history=falseabnormal_respiratory_pattern=falseage_days=90color_change=falsehistory_of_event_clusters=falsehistory_of_similar_event=trueprematurity=falsetone_change=false
- Ls = -3.75 + 0.56 + 0.0025×90 = -2.965
- Lr = -2.44 + 0.58 = -1.86
Age 90 days, abnormal medical history
Given:
abnormal_medical_history=trueabnormal_respiratory_pattern=falseage_days=90color_change=falsehistory_of_event_clusters=falsehistory_of_similar_event=falseprematurity=falsetone_change=false
- Ls = -3.75 + 0.65 + 0.0025×90 = -2.875
- Lr = -2.44; abnormal medical history is not in the recurrence model
Age 90 days, event clusters
Given:
abnormal_medical_history=falseabnormal_respiratory_pattern=falseage_days=90color_change=falsehistory_of_event_clusters=truehistory_of_similar_event=falseprematurity=falsetone_change=false
- Ls is unchanged from age 90 with other flags false
- Lr = -2.44 + 1.17 = -1.27
Also searched as
- BRUE 2.0
- Nama 2022 BRUE
- brief resolved unexplained event risk
- serious diagnosis after BRUE
- BRUE recurrence probability
- Nama Hospital Pediatrics BRUE
- infant BRUE logistic risk
- BRUE event recurrence
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/brue_2?age_days=90&history_of_similar_event=false&abnormal_medical_history=false&prematurity=false&history_of_event_clusters=false&color_change=false&abnormal_respiratory_pattern=false&tone_change=false
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/brue_2?age_days=90&history_of_similar_event=false&abnormal_medical_history=false&prematurity=false&history_of_event_clusters=false&color_change=false&abnormal_respiratory_pattern=false&tone_change=false"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
age_days |
integer | required | Age in days (0-364). Nama 2022 Supplemental Table 7 serious-diagnosis model: +0.0025 per day. Recurrence model does not use age. magent does not examine the infant. |
history_of_similar_event |
boolean | required | History of a similar event before the index presentation (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Serious-diagnosis +0.56; recurrence +0.58. magent does not examine the infant. |
abnormal_medical_history |
boolean | required | Abnormal medical history such as previous hospitalization or an underlying medical condition (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Serious-diagnosis +0.65. Recurrence model does not use this flag. |
prematurity |
boolean | required | Prematurity as published: born <32 weeks, or born between 32 and 38 weeks and corrected to <45 weeks (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence +0.46. |
history_of_event_clusters |
boolean | required | History of multiple events or event clusters before presentation (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence +1.17. |
color_change |
boolean | required | Color change (cyanosis or pallor) during the event (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence +0.36. magent does not examine the infant. |
abnormal_respiratory_pattern |
boolean | required | Abnormal respiratory pattern (absent, decreased, or irregular breathing) during the event (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence -0.32. |
tone_change |
boolean | required | Marked change in tone (hypertonia or hypotonia) during the event (Nama 2022 Supplemental Table 7). true or false as assigned by the caller. Recurrence -0.31. |
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": [
{
"abnormal_medical_history": "false",
"abnormal_respiratory_pattern": "false",
"age_days": "90",
"color_change": "false",
"history_of_event_clusters": "false",
"history_of_similar_event": "false",
"prematurity": "false",
"tone_change": "false"
},
{
"abnormal_medical_history": "false",
"abnormal_respiratory_pattern": "false",
"age_days": "90",
"color_change": "false",
"history_of_event_clusters": "false",
"history_of_similar_event": "false",
"prematurity": "false",
"tone_change": "false"
}
]
}
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/brue_2",
"items": [
{
"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": "Nama N, Hall M, Neuman M, et al.",
"doi": "10.1542/hpeds.2022-006637",
"id": "nama-2022",
"pmid": "35965279",
"source": "Hosp Pediatr. 2022;12(9):772-785",
"title": "Risk Prediction After a Brief Resolved Unexplained Event"
},
"formula": "brue_2",
"formula_expression": "Ls = -3.75 + 0.56*history_of_similar_event + 0.65*abnormal_medical_history + 0.0025*age_days; Lr = -2.44 + 0.46*prematurity + 0.58*history_of_similar_event + 1.17*history_of_event_clusters + 0.36*color_change - 0.32*abnormal_respiratory_pattern - 0.31*tone_change (Nama 2022 Supplemental Table 7); estimated_serious_diagnosis_percent = 100 * exp(Ls) / (1 + exp(Ls)); estimated_event_recurrence_percent = 100 * exp(Lr) / (1 + exp(Lr))",
"abnormal_medical_history": false,
"abnormal_respiratory_pattern": false,
"age_days": 90,
"color_change": false,
"estimated_event_recurrence_percent": 8.02,
"estimated_serious_diagnosis_percent": 2.86,
"event_recurrence_logit": -2.44,
"history_of_event_clusters": false,
"history_of_similar_event": false,
"prematurity": false,
"serious_diagnosis_logit": -3.525,
"tone_change": 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": "Nama N, Hall M, Neuman M, et al.",
"doi": "10.1542/hpeds.2022-006637",
"id": "nama-2022",
"pmid": "35965279",
"source": "Hosp Pediatr. 2022;12(9):772-785",
"title": "Risk Prediction After a Brief Resolved Unexplained Event"
},
"formula": "brue_2",
"formula_expression": "Ls = -3.75 + 0.56*history_of_similar_event + 0.65*abnormal_medical_history + 0.0025*age_days; Lr = -2.44 + 0.46*prematurity + 0.58*history_of_similar_event + 1.17*history_of_event_clusters + 0.36*color_change - 0.32*abnormal_respiratory_pattern - 0.31*tone_change (Nama 2022 Supplemental Table 7); estimated_serious_diagnosis_percent = 100 * exp(Ls) / (1 + exp(Ls)); estimated_event_recurrence_percent = 100 * exp(Lr) / (1 + exp(Lr))",
"abnormal_medical_history": false,
"abnormal_respiratory_pattern": false,
"age_days": 90,
"color_change": false,
"estimated_event_recurrence_percent": 8.02,
"estimated_serious_diagnosis_percent": 2.86,
"event_recurrence_logit": -2.44,
"history_of_event_clusters": false,
"history_of_similar_event": false,
"prematurity": false,
"serious_diagnosis_logit": -3.525,
"tone_change": false
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | brue_2 |
formula_expression |
string | Nama 2022 Supplemental Table 7 logistic expressions |
age_days |
integer | Input age in days (0-364) |
history_of_similar_event |
boolean | Caller-assigned similar-event history before the index presentation |
abnormal_medical_history |
boolean | Caller-assigned abnormal medical history |
prematurity |
boolean | Caller-assigned published prematurity flag |
history_of_event_clusters |
boolean | Caller-assigned history of multiple events or event clusters |
color_change |
boolean | Caller-assigned cyanosis or pallor during the event |
abnormal_respiratory_pattern |
boolean | Caller-assigned absent, decreased, or irregular breathing during the event |
tone_change |
boolean | Caller-assigned marked tone change during the event |
serious_diagnosis_logit |
number | Nama 2022 Supplemental Table 7 serious-diagnosis linear predictor Ls, 4 decimal places |
estimated_serious_diagnosis_percent |
number | 100 * exp(Ls) / (1 + exp(Ls)) from the unrounded logit, 2 decimal places. A probability, not an admission cutoff. |
event_recurrence_logit |
number | Nama 2022 Supplemental Table 7 event-recurrence linear predictor Lr, 4 decimal places |
estimated_event_recurrence_percent |
number | 100 * exp(Lr) / (1 + exp(Lr)) from the unrounded logit, 2 decimal places. Recurrence in the derivation cohort was during the index visit. A probability, not an admission cutoff. |
citation |
object | Nama et al. Hosp Pediatr 2022 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"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": "Nama N, Hall M, Neuman M, et al.",
"doi": "10.1542/hpeds.2022-006637",
"id": "nama-2022",
"pmid": "35965279",
"source": "Hosp Pediatr. 2022;12(9):772-785",
"title": "Risk Prediction After a Brief Resolved Unexplained Event"
},
"formula": "brue_2",
"formula_expression": "Ls = -3.75 + 0.56*history_of_similar_event + 0.65*abnormal_medical_history + 0.0025*age_days; Lr = -2.44 + 0.46*prematurity + 0.58*history_of_similar_event + 1.17*history_of_event_clusters + 0.36*color_change - 0.32*abnormal_respiratory_pattern - 0.31*tone_change (Nama 2022 Supplemental Table 7); estimated_serious_diagnosis_percent = 100 * exp(Ls) / (1 + exp(Ls)); estimated_event_recurrence_percent = 100 * exp(Lr) / (1 + exp(Lr))",
"abnormal_medical_history": false,
"abnormal_respiratory_pattern": false,
"age_days": 90,
"color_change": false,
"estimated_event_recurrence_percent": 8.02,
"estimated_serious_diagnosis_percent": 2.86,
"event_recurrence_logit": -2.44,
"history_of_event_clusters": false,
"history_of_similar_event": false,
"prematurity": false,
"serious_diagnosis_logit": -3.525,
"tone_change": false
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_brue_2 |
BRUE 2.0 needs the published infant event criteria as true or false or the paper's tokens. 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
- BRUE — Apply the Tieder 2016 AAP BRUE definition and return feature_count (0-4) and whether the published definition box holds (brue).
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.
Stdio MCP: /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.