# CAHP score (Maupain 2016)

CAHP

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

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

## What it computes

Sum Maupain 2016 Figure 2 CAHP nomogram integer points from age, arrest location, initial rhythm, no-flow, low-flow, epinephrine tertile, and arterial pH, and return Table 3 low/medium/high strata.

## When to use

When an agent needs the published CAHP nomogram total after OHCA and must not invent a withdrawal-of-care order, extra mortality labels, or an epinephrine scale other than Table 2 tertiles.

## When not to use

- Not a medical device and not a diagnosis or withdrawal-of-care order.
- magent does not measure pH, collapse-to-BLS time, BLS-to-ROSC time, or epinephrine dose; those values and arrest location and initial rhythm are caller-assigned.
- Table 3 strata are low <150, medium 150-200, and high >200. The abstract also prints ≤150 / ≥200; 150 and 200 are medium.
- Figure 2B prints 88% poor outcome at total 177. This tool returns that printed percent only at 177 and does not invent other mortality labels.
- Epinephrine uses Table 2 tertiles (0 / 1-2 / ≥3 mg). Age, no-flow, low-flow, and pH follow the Figure 2 caption integers with linear nomogram ticks; values beyond age 10-100, no-flow 0-30 min, low-flow 0-60 min, and pH 6.5-7.5 use those truncated ends.

## Formula

```
CAHP = round(1.1*(age-10)) + 25 if arrest_at_home + 27 if not shockable_rhythm + round(2.8*no_flow_min) + round(0.8*low_flow_min) + epinephrine mg (0 → 0; 1-2 → 27; ≥3 → 43) + round(585-77*arterial_ph); Maupain 2016 Figure 2 nomogram integer points (caption: age 30 → 22, home → 25, non-shockable → 27, no-flow 5 min → 14, low-flow 10 min → 8, epinephrine 3 mg → 43, pH 7.10 → 38, total 177 → 88%); Table 3 low <150, medium 150-200, high >200 (150 and 200 are medium); max 411
```

## Citation

[The CAHP (Cardiac Arrest Hospital Prognosis) score: a tool for risk stratification after out-of-hospital cardiac arrest](https://doi.org/10.1093/eurheartj/ehv556)
Maupain C, Bougouin W, Lamhaut L, et al.
Eur Heart J. 2016;37(42):3222-3231
DOI: [10.1093/eurheartj/ehv556](https://doi.org/10.1093/eurheartj/ehv556)

## Worked example

### Figure 2 caption (score 177, medium, 88%)

Given: `age=30, arrest_at_home=true, arterial_ph=7.10, epinephrine_mg=3, low_flow_min=10, no_flow_min=5, shockable_rhythm=false`

1. Age 30 → 22; arrest at home → 25; non-shockable → 27; no-flow 5 min → 14; low-flow 10 min → 8; epinephrine 3 mg → 43; pH 7.10 → 38
2. Total 22+25+27+14+8+43+38 = 177 (max 411); Table 3 medium (150-200); Figure 2B poor-outcome 88%


### Public shockable arrest, no epinephrine (score 30, low)

Given: `age=30, arrest_at_home=false, arterial_ph=7.50, epinephrine_mg=0, low_flow_min=0, no_flow_min=0, shockable_rhythm=true`

1. Age 30 → 22; public → 0; shockable → 0; no-flow 0 → 0; low-flow 0 → 0; epinephrine 0 → 0; pH 7.50 → 8
2. Total 30 (max 411); Table 3 low (<150)


## Also searched as

- CAHP
- CAHP score
- Cardiac Arrest Hospital Prognosis
- Maupain score
- OHCA prognosis score
- CAHP nomogram
- cardiac arrest hospital prognosis score

## Parameters

- `age` (integer, required): Age in years (18-120). Figure 2 caption: 30 years → 22. Linear nomogram: round(1.1*(age-10)); truncated below 10 and above 100.
- `arrest_at_home` (boolean, required): Cardiac arrest at home versus public, as assigned by the caller. true scores 25 (Figure 2 caption); false (public) scores 0.
- `shockable_rhythm` (boolean, required): Initial shockable rhythm (VF or pulseless VT) as assigned by the caller. true scores 0; false (non-shockable) scores 27 (Figure 2 caption).
- `no_flow_min` (integer, required): Collapse-to-BLS (no-flow) minutes (integer 0-90). Figure 2 caption: 5 min → 14. Linear nomogram: round(2.8*minutes); truncated above 30.
- `low_flow_min` (integer, required): BLS-to-ROSC (low-flow) minutes (integer 0-180). Figure 2 caption: 10 min → 8. Linear nomogram: round(0.8*minutes); truncated above 60.
- `epinephrine_mg` (integer, required): Total pre-ROSC epinephrine in mg (integer 0-30). Table 2 tertiles on the nomogram: 0 → 0; 1-2 → 27; ≥3 → 43 (Figure 2 caption 3 mg → 43).
- `arterial_ph` (number, required): Admission arterial pH (6.5-7.8). Figure 2 caption: 7.10 → 38. Linear nomogram: round(585-77*pH); truncated to 6.5-7.5. magent does not measure pH.

## 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/cahp`
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": "30",
      "arrest_at_home": "true",
      "arterial_ph": "7.10",
      "epinephrine_mg": "3",
      "low_flow_min": "10",
      "no_flow_min": "5",
      "shockable_rhythm": "false"
    },
    {
      "age": "30",
      "arrest_at_home": "true",
      "arterial_ph": "7.10",
      "epinephrine_mg": "3",
      "low_flow_min": "10",
      "no_flow_min": "5",
      "shockable_rhythm": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/cahp",
  "items": [
    {
      "components": [
        {
          "value": 30,
          "factor": "age",
          "points": 22,
          "present": true
        },
        {
          "factor": "arrest_at_home",
          "points": 25,
          "present": true
        },
        {
          "value": false,
          "factor": "shockable_rhythm",
          "points": 27,
          "present": true
        },
        {
          "value": 5,
          "factor": "no_flow_min",
          "points": 14,
          "present": true
        },
        {
          "value": 10,
          "factor": "low_flow_min",
          "points": 8,
          "present": true
        },
        {
          "value": 3,
          "factor": "epinephrine_mg",
          "points": 43,
          "present": true
        },
        {
          "value": 7.1,
          "factor": "arterial_ph",
          "points": 38,
          "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": "Maupain C, Bougouin W, Lamhaut L, et al.",
        "doi": "10.1093/eurheartj/ehv556",
        "id": "maupain-2016-cahp",
        "pmid": "26497161",
        "source": "Eur Heart J. 2016;37(42):3222-3231",
        "title": "The CAHP (Cardiac Arrest Hospital Prognosis) score: a tool for risk stratification after out-of-hospital cardiac arrest"
      },
      "formula": "cahp",
      "formula_expression": "CAHP = round(1.1*(age-10)) + 25 if arrest_at_home + 27 if not shockable_rhythm + round(2.8*no_flow_min) + round(0.8*low_flow_min) + epinephrine mg (0 → 0; 1-2 → 27; ≥3 → 43) + round(585-77*arterial_ph); Maupain 2016 Figure 2 nomogram integer points (caption: age 30 → 22, home → 25, non-shockable → 27, no-flow 5 min → 14, low-flow 10 min → 8, epinephrine 3 mg → 43, pH 7.10 → 38, total 177 → 88%); Table 3 low <150, medium 150-200, high >200 (150 and 200 are medium); max 411",
      "age_years": 30,
      "max_score": 411,
      "score": 177,
      "cahp_risk": "medium",
      "arrest_at_home": true,
      "arterial_ph": 7.1,
      "epinephrine_mg": 3,
      "low_flow_min": 10,
      "no_flow_min": 5,
      "shockable_rhythm": false,
      "nomogram_poor_outcome_percent": 88
    },
    {
      "components": [
        {
          "value": 30,
          "factor": "age",
          "points": 22,
          "present": true
        },
        {
          "factor": "arrest_at_home",
          "points": 25,
          "present": true
        },
        {
          "value": false,
          "factor": "shockable_rhythm",
          "points": 27,
          "present": true
        },
        {
          "value": 5,
          "factor": "no_flow_min",
          "points": 14,
          "present": true
        },
        {
          "value": 10,
          "factor": "low_flow_min",
          "points": 8,
          "present": true
        },
        {
          "value": 3,
          "factor": "epinephrine_mg",
          "points": 43,
          "present": true
        },
        {
          "value": 7.1,
          "factor": "arterial_ph",
          "points": 38,
          "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": "Maupain C, Bougouin W, Lamhaut L, et al.",
        "doi": "10.1093/eurheartj/ehv556",
        "id": "maupain-2016-cahp",
        "pmid": "26497161",
        "source": "Eur Heart J. 2016;37(42):3222-3231",
        "title": "The CAHP (Cardiac Arrest Hospital Prognosis) score: a tool for risk stratification after out-of-hospital cardiac arrest"
      },
      "formula": "cahp",
      "formula_expression": "CAHP = round(1.1*(age-10)) + 25 if arrest_at_home + 27 if not shockable_rhythm + round(2.8*no_flow_min) + round(0.8*low_flow_min) + epinephrine mg (0 → 0; 1-2 → 27; ≥3 → 43) + round(585-77*arterial_ph); Maupain 2016 Figure 2 nomogram integer points (caption: age 30 → 22, home → 25, non-shockable → 27, no-flow 5 min → 14, low-flow 10 min → 8, epinephrine 3 mg → 43, pH 7.10 → 38, total 177 → 88%); Table 3 low <150, medium 150-200, high >200 (150 and 200 are medium); max 411",
      "age_years": 30,
      "max_score": 411,
      "score": 177,
      "cahp_risk": "medium",
      "arrest_at_home": true,
      "arterial_ph": 7.1,
      "epinephrine_mg": 3,
      "low_flow_min": 10,
      "no_flow_min": 5,
      "shockable_rhythm": false,
      "nomogram_poor_outcome_percent": 88
    }
  ]
}
```

## Response fields

- `formula` (string): cahp
- `formula_expression` (string): Exact expression used
- `score` (integer): Figure 2 nomogram integer total
- `max_score` (integer): 411
- `cahp_risk` (string): Table 3 stratum: low if score <150, medium if 150-200, high if >200. 150 and 200 are medium.
- `nomogram_poor_outcome_percent` (integer): Figure 2B printed poor-outcome percent when the total is 177 (88). Omitted for other totals.
- `age_years` (integer): Age used
- `arrest_at_home` (boolean): Caller-assigned arrest at home
- `shockable_rhythm` (boolean): Caller-assigned initial shockable rhythm
- `no_flow_min` (integer): No-flow minutes used
- `low_flow_min` (integer): Low-flow minutes used
- `epinephrine_mg` (integer): Epinephrine mg used
- `arterial_ph` (number): Arterial pH used
- `components` (array): Per-factor Figure 2 points
- `citation` (object): Maupain et al. Eur Heart J 2016 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 30,
      "factor": "age",
      "points": 22,
      "present": true
    },
    {
      "factor": "arrest_at_home",
      "points": 25,
      "present": true
    },
    {
      "value": false,
      "factor": "shockable_rhythm",
      "points": 27,
      "present": true
    },
    {
      "value": 5,
      "factor": "no_flow_min",
      "points": 14,
      "present": true
    },
    {
      "value": 10,
      "factor": "low_flow_min",
      "points": 8,
      "present": true
    },
    {
      "value": 3,
      "factor": "epinephrine_mg",
      "points": 43,
      "present": true
    },
    {
      "value": 7.1,
      "factor": "arterial_ph",
      "points": 38,
      "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": "Maupain C, Bougouin W, Lamhaut L, et al.",
    "doi": "10.1093/eurheartj/ehv556",
    "id": "maupain-2016-cahp",
    "pmid": "26497161",
    "source": "Eur Heart J. 2016;37(42):3222-3231",
    "title": "The CAHP (Cardiac Arrest Hospital Prognosis) score: a tool for risk stratification after out-of-hospital cardiac arrest"
  },
  "formula": "cahp",
  "formula_expression": "CAHP = round(1.1*(age-10)) + 25 if arrest_at_home + 27 if not shockable_rhythm + round(2.8*no_flow_min) + round(0.8*low_flow_min) + epinephrine mg (0 → 0; 1-2 → 27; ≥3 → 43) + round(585-77*arterial_ph); Maupain 2016 Figure 2 nomogram integer points (caption: age 30 → 22, home → 25, non-shockable → 27, no-flow 5 min → 14, low-flow 10 min → 8, epinephrine 3 mg → 43, pH 7.10 → 38, total 177 → 88%); Table 3 low <150, medium 150-200, high >200 (150 and 200 are medium); max 411",
  "age_years": 30,
  "max_score": 411,
  "score": 177,
  "cahp_risk": "medium",
  "arrest_at_home": true,
  "arterial_ph": 7.1,
  "epinephrine_mg": 3,
  "low_flow_min": 10,
  "no_flow_min": 5,
  "shockable_rhythm": false,
  "nomogram_poor_outcome_percent": 88
}
```

## Errors

- HTTP 400 `invalid_cahp`: CAHP inputs must match Maupain 2016 age, arrest location, initial rhythm, no-flow and low-flow times, epinephrine dose, and arterial pH. 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

- [NEWS2](https://magentlab.com/docs/news2) — Compute the RCP 2017 National Early Warning Score 2 from respiratory rate, SpO2 (Scale 1 or Scale 2), supplemental oxygen, temperature, systolic BP, heart rate, and caller-assigned ACVPU.
- [SOFA](https://magentlab.com/docs/sofa) — Compute the Vincent 1996 SOFA score from PaO2/FiO2, platelets, bilirubin, MAP and adrenergic agents, GCS, and creatinine or urine output.
- [qSOFA](https://magentlab.com/docs/qsofa) — Compute the Sepsis-3 qSOFA score from respiratory rate, caller-assigned altered mentation, and systolic blood pressure.

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