Emergency · LIVE
HOPE score (Pasquier 2018)
HOPE
Compute the Pasquier 2018 HOPE logistic survival probability after extracorporeal life support for hypothermic cardiac arrest from caller-assigned sex, asphyxia-related mechanism, age, potassium, CPR duration, and core temperature.
Markdown: /docs/hope.md · Canonical: https://magentlab.com/docs/hope
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute the Pasquier 2018 HOPE logistic survival probability after extracorporeal life support for hypothermic cardiac arrest from caller-assigned sex, asphyxia-related mechanism, age, potassium, CPR duration, and core temperature.
When to use
When an agent has Pasquier 2018 HOPE predictors and needs the published survival probability from the unrounded logit, not an ECLS cannulation or rewarming order and not a 2019-validation cutoff.
When not to use
- Not a medical device. Not a diagnosis. Not an ECLS cannulation order or a rewarming protocol. magent does not cannulate or examine the patient.
- Pasquier 2018 derivation logit only. magent does not apply 2019 external-validation cutoffs other than the derivation Table 2 HOPE >= 0.10 (10% survival probability) flag.
- Sex is the published male coefficient (male = 1, female = 0), not race.
- asphyxia is caller-assigned: head fully covered by water or snow AND cardiac arrest at extrication. magent does not classify the scene.
- Potassium, CPR duration, and temperature are caller-supplied. CPR duration must be greater than 0. magent does not assay potassium or time the arrest.
- estimated_survival_percent is a population probability from the unrounded logit, not an individual outcome.
Formula
logit = 2.44 - 1.55*male - 1.95*asphyxia - 0.0191*age - 2.07*log2(potassium_mmol_l) - 0.573*log2(cpr_duration_min) + 0.937*temperature_c - 0.0247*temperature_c^2; survival_probability = exp(logit)/(1+exp(logit)); estimated_survival_percent = 100 * survival_probability from the unrounded logit, 2 decimals; male is 1 if sex is male else 0; asphyxia is 1 if asphyxia-related (head fully covered by water or snow AND cardiac arrest at extrication) else 0; hope_ge_10_percent is true when survival_probability >= 0.10 (Pasquier 2018 Table 2)
Citation
- Authors
- Pasquier M, Hugli O, Paal P, Darocha T, Blancher M, Husby P, Silfvast T, Carron PN, Rousson V
- Source
- Resuscitation. 2018;126:58-64
Worked example
Female, no asphyxia, age 40, K 4.0, CPR 30 min, 28 C
Given:
age=40asphyxia=falsecpr_duration_min=30potassium_mmol_l=4.0sex=femaletemperature_c=28
- female → male = 0; asphyxia false → 0
- log2(4.0) = 2; CPR duration 30 min enters as log2(30)
- logit = 2.44 - 0.0191*40 - 2.07*2 - 0.573*log2(30) + 0.937*28 - 0.0247*28^2
- estimated_survival_percent = 100 * exp(logit)/(1+exp(logit)) from the unrounded logit
- hope_ge_10_percent is true when survival_probability >= 0.10 (Pasquier 2018 Table 2)
Male, otherwise the same row (published male coefficient)
Given:
age=40asphyxia=falsecpr_duration_min=30potassium_mmol_l=4.0sex=maletemperature_c=28
- male = 1 subtracts 1.55 from the female logit
- percent from the unrounded logit; sex is a published coefficient, not race
Also searched as
- HOPE score
- Pasquier HOPE
- hypothermic cardiac arrest survival
- ECLS hypothermia survival
- accidental hypothermia ECLS
- HOPE potassium CPR temperature
- Pasquier 2018 hypothermia logit
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/hope?age=40&sex=female&asphyxia=false&cpr_duration_min=30&potassium_mmol_l=4.0&temperature_c=28
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/hope?age=40&sex=female&asphyxia=false&cpr_duration_min=30&potassium_mmol_l=4.0&temperature_c=28"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
age |
integer | required | Age in years, integer 0-100. Pasquier 2018 coefficient -0.0191 per year. magent does not read an identity document. |
sex |
string | required · female, male | Sex used as the published Pasquier 2018 male coefficient (male = 1, female = 0). Not race. magent does not examine the patient. |
asphyxia |
boolean | required | true if the caller assigns an asphyxia-related mechanism: head fully covered by water or snow AND cardiac arrest at extrication (Pasquier 2018). true scores 1 in the logit; false scores 0. magent does not classify the scene. |
cpr_duration_min |
number | required | Duration of CPR in minutes from start of CPR to ECLS (1-480). Enters as log2. Must be greater than 0 (0 is invalid). Caller-supplied; magent does not time the arrest. |
potassium_mmol_l |
number | required | Serum potassium in mmol/L (0.5-20). Enters as log2. Must be greater than 0. Caller-supplied; magent does not assay potassium. |
temperature_c |
number | required | Core temperature in C (10-37). Linear and squared Pasquier 2018 terms. Caller-supplied; magent does not measure temperature or convert Fahrenheit. |
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": [
{
"age": "40",
"asphyxia": "false",
"cpr_duration_min": "30",
"potassium_mmol_l": "4.0",
"sex": "female",
"temperature_c": "28"
},
{
"age": "40",
"asphyxia": "false",
"cpr_duration_min": "30",
"potassium_mmol_l": "4.0",
"sex": "female",
"temperature_c": "28"
}
]
}
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/hope",
"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": "Pasquier M, Hugli O, Paal P, Darocha T, Blancher M, Husby P, Silfvast T, Carron PN, Rousson V",
"doi": "10.1016/j.resuscitation.2018.02.026",
"id": "pasquier-2018",
"pmid": "29481910",
"source": "Resuscitation. 2018;126:58-64",
"title": "Hypothermia outcome prediction after extracorporeal life support for hypothermic cardiac arrest patients: The HOPE score"
},
"formula": "hope",
"formula_expression": "logit = 2.44 - 1.55*male - 1.95*asphyxia - 0.0191*age - 2.07*log2(potassium_mmol_l) - 0.573*log2(cpr_duration_min) + 0.937*temperature_c - 0.0247*temperature_c^2; survival_probability = exp(logit)/(1+exp(logit)); estimated_survival_percent = 100 * survival_probability from the unrounded logit, 2 decimals; male is 1 if sex is male else 0; asphyxia is 1 if asphyxia-related (head fully covered by water or snow AND cardiac arrest at extrication) else 0; hope_ge_10_percent is true when survival_probability >= 0.10 (Pasquier 2018 Table 2)",
"age_years": 40,
"sex": "female",
"logit": 1.6,
"temperature_c": 28.0,
"potassium_mmol_l": 4.0,
"asphyxia": false,
"cpr_duration_min": 30.0,
"estimated_survival_percent": 83.14,
"hope_ge_10_percent": 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": "Pasquier M, Hugli O, Paal P, Darocha T, Blancher M, Husby P, Silfvast T, Carron PN, Rousson V",
"doi": "10.1016/j.resuscitation.2018.02.026",
"id": "pasquier-2018",
"pmid": "29481910",
"source": "Resuscitation. 2018;126:58-64",
"title": "Hypothermia outcome prediction after extracorporeal life support for hypothermic cardiac arrest patients: The HOPE score"
},
"formula": "hope",
"formula_expression": "logit = 2.44 - 1.55*male - 1.95*asphyxia - 0.0191*age - 2.07*log2(potassium_mmol_l) - 0.573*log2(cpr_duration_min) + 0.937*temperature_c - 0.0247*temperature_c^2; survival_probability = exp(logit)/(1+exp(logit)); estimated_survival_percent = 100 * survival_probability from the unrounded logit, 2 decimals; male is 1 if sex is male else 0; asphyxia is 1 if asphyxia-related (head fully covered by water or snow AND cardiac arrest at extrication) else 0; hope_ge_10_percent is true when survival_probability >= 0.10 (Pasquier 2018 Table 2)",
"age_years": 40,
"sex": "female",
"logit": 1.6,
"temperature_c": 28.0,
"potassium_mmol_l": 4.0,
"asphyxia": false,
"cpr_duration_min": 30.0,
"estimated_survival_percent": 83.14,
"hope_ge_10_percent": true
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | hope |
formula_expression |
string | Pasquier 2018 HOPE logit and survival probability |
age_years |
integer | Age in years used in the logit |
sex |
string | female or male |
asphyxia |
boolean | Caller-assigned asphyxia-related mechanism (head fully covered by water or snow AND cardiac arrest at extrication) |
potassium_mmol_l |
number | Serum potassium in mmol/L used in log2 |
cpr_duration_min |
number | CPR duration in minutes used in log2 |
temperature_c |
number | Core temperature in C used in the linear and squared terms |
logit |
number | Pasquier 2018 logit, 2 decimal places. Percent uses the unrounded logit. |
estimated_survival_percent |
number | 100 * exp(logit)/(1+exp(logit)) from the unrounded logit, 2 decimals. A population probability, not an ECLS order. |
hope_ge_10_percent |
boolean | true when survival_probability >= 0.10 (Pasquier 2018 Table 2 HOPE >= 0.10). Not a 2019-validation cutoff. |
citation |
object | Pasquier 2018 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": "Pasquier M, Hugli O, Paal P, Darocha T, Blancher M, Husby P, Silfvast T, Carron PN, Rousson V",
"doi": "10.1016/j.resuscitation.2018.02.026",
"id": "pasquier-2018",
"pmid": "29481910",
"source": "Resuscitation. 2018;126:58-64",
"title": "Hypothermia outcome prediction after extracorporeal life support for hypothermic cardiac arrest patients: The HOPE score"
},
"formula": "hope",
"formula_expression": "logit = 2.44 - 1.55*male - 1.95*asphyxia - 0.0191*age - 2.07*log2(potassium_mmol_l) - 0.573*log2(cpr_duration_min) + 0.937*temperature_c - 0.0247*temperature_c^2; survival_probability = exp(logit)/(1+exp(logit)); estimated_survival_percent = 100 * survival_probability from the unrounded logit, 2 decimals; male is 1 if sex is male else 0; asphyxia is 1 if asphyxia-related (head fully covered by water or snow AND cardiac arrest at extrication) else 0; hope_ge_10_percent is true when survival_probability >= 0.10 (Pasquier 2018 Table 2)",
"age_years": 40,
"sex": "female",
"logit": 1.6,
"temperature_c": 28.0,
"potassium_mmol_l": 4.0,
"asphyxia": false,
"cpr_duration_min": 30.0,
"estimated_survival_percent": 83.14,
"hope_ge_10_percent": true
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_hope |
HOPE needs Pasquier 2018 age, sex, asphyxia mechanism, CPR duration, potassium, and core temperature in published ranges. 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
- SAVE-score — Sum Schmidt 2015 Table 4 SAVE-score cells including the published constant −6 and return class I–V with hospital survival percents.
- GO-FAR — Sum the Ebell 2013 GO-FAR Table 3 integer score (beta × 10 rounded) from exclusive age and 12 caller-assigned prearrest flags, and return the published likelihood band for CPC 1 after in-hospital CPR.
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.