{
  "x402Version": 2,
  "id": 39156,
  "slug": "39156",
  "resource": "https://api.magentlab.com/api/calc/hope",
  "description": "Pasquier 2018 HOPE survival probability after ECLS for hypothermic cardiac arrest from sex (published male coefficient, not race), asphyxia, age, potassium, CPR duration, and temperature. Returns logit, estimated_survival_percent from the unrounded logit, and Table 2 HOPE >= 10% flag. Not an ECLS or rewarming order. magent does not cannulate.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "items": [
              {
                "age": 40,
                "asphyxia": false,
                "cpr_duration_min": 30,
                "potassium_mmol_l": 4,
                "sex": "female",
                "temperature_c": 28
              },
              {
                "age": 40,
                "asphyxia": false,
                "cpr_duration_min": 30,
                "potassium_mmol_l": 4,
                "sex": "female",
                "temperature_c": 28
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "age_years": 40,
                "asphyxia": false,
                "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"
                },
                "cpr_duration_min": 30,
                "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.",
                "estimated_survival_percent": 83.14,
                "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)",
                "hope_ge_10_percent": true,
                "logit": 1.6,
                "potassium_mmol_l": 4,
                "sex": "female",
                "temperature_c": 28
              },
              {
                "age_years": 40,
                "asphyxia": false,
                "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"
                },
                "cpr_duration_min": 30,
                "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.",
                "estimated_survival_percent": 83.14,
                "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)",
                "hope_ge_10_percent": true,
                "logit": 1.6,
                "potassium_mmol_l": 4,
                "sex": "female",
                "temperature_c": 28
              }
            ],
            "path": "/api/calc/hope"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "age": {
                          "description": "Age in years, integer 0-100. Pasquier 2018 coefficient -0.0191 per year. magent does not read an identity document.",
                          "type": "integer"
                        },
                        "asphyxia": {
                          "description": "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.",
                          "type": "boolean"
                        },
                        "cpr_duration_min": {
                          "description": "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.",
                          "type": "number"
                        },
                        "potassium_mmol_l": {
                          "description": "Serum potassium in mmol/L (0.5-20). Enters as log2. Must be greater than 0. Caller-supplied; magent does not assay potassium.",
                          "type": "number"
                        },
                        "sex": {
                          "description": "Sex used as the published Pasquier 2018 male coefficient (male = 1, female = 0). Not race. magent does not examine the patient.",
                          "enum": [
                            "female",
                            "male"
                          ],
                          "type": "string"
                        },
                        "temperature_c": {
                          "description": "Core temperature in C (10-37). Linear and squared Pasquier 2018 terms. Caller-supplied; magent does not measure temperature or convert Fahrenheit.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "age",
                        "sex",
                        "asphyxia",
                        "cpr_duration_min",
                        "potassium_mmol_l",
                        "temperature_c"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "hope",
    "hypothermia",
    "cardiac-arrest",
    "ecls",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T04:37:19.865Z",
  "quality": {
    "calls30d": 5,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-13T04:37:19.722Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "age": 40,
                  "asphyxia": false,
                  "cpr_duration_min": 30,
                  "potassium_mmol_l": 4,
                  "sex": "female",
                  "temperature_c": 28
                },
                {
                  "age": 40,
                  "asphyxia": false,
                  "cpr_duration_min": 30,
                  "potassium_mmol_l": 4,
                  "sex": "female",
                  "temperature_c": 28
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "age_years": 40,
                  "asphyxia": false,
                  "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"
                  },
                  "cpr_duration_min": 30,
                  "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.",
                  "estimated_survival_percent": 83.14,
                  "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)",
                  "hope_ge_10_percent": true,
                  "logit": 1.6,
                  "potassium_mmol_l": 4,
                  "sex": "female",
                  "temperature_c": 28
                },
                {
                  "age_years": 40,
                  "asphyxia": false,
                  "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"
                  },
                  "cpr_duration_min": 30,
                  "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.",
                  "estimated_survival_percent": 83.14,
                  "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)",
                  "hope_ge_10_percent": true,
                  "logit": 1.6,
                  "potassium_mmol_l": 4,
                  "sex": "female",
                  "temperature_c": 28
                }
              ],
              "path": "/api/calc/hope"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "age": {
                            "description": "Age in years, integer 0-100. Pasquier 2018 coefficient -0.0191 per year. magent does not read an identity document.",
                            "type": "integer"
                          },
                          "asphyxia": {
                            "description": "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.",
                            "type": "boolean"
                          },
                          "cpr_duration_min": {
                            "description": "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.",
                            "type": "number"
                          },
                          "potassium_mmol_l": {
                            "description": "Serum potassium in mmol/L (0.5-20). Enters as log2. Must be greater than 0. Caller-supplied; magent does not assay potassium.",
                            "type": "number"
                          },
                          "sex": {
                            "description": "Sex used as the published Pasquier 2018 male coefficient (male = 1, female = 0). Not race. magent does not examine the patient.",
                            "enum": [
                              "female",
                              "male"
                            ],
                            "type": "string"
                          },
                          "temperature_c": {
                            "description": "Core temperature in C (10-37). Linear and squared Pasquier 2018 terms. Caller-supplied; magent does not measure temperature or convert Fahrenheit.",
                            "type": "number"
                          }
                        },
                        "required": [
                          "age",
                          "sex",
                          "asphyxia",
                          "cpr_duration_min",
                          "potassium_mmol_l",
                          "temperature_c"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}