# Ghanem 2012 Preoperative Mortality Predictor (PMP)

> Ghanem 2012 Preoperative Mortality Predictor (PMP) is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Computes the Ghanem 2012 Table 5 preoperative mortality risk score from up to 14 caller-assigned clinical flags, returning a numeric score (range −1 to 30) with an associated mortality probability band.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/pmp
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ghanem-2012-preoperative-mortality-predictor-pmp-f8badc3b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LjexBl_0hKQaQyeQdpA92

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ghanem-2012-preoperative-mortality-predictor-pmp-f8badc3b
```

Example prompt: Calculate the Ghanem 2012 preoperative mortality score for a 78-year-old inpatient who has sepsis, poor functional status requiring total ADL assistance, a pulmonary comorbidity, a bleeding disorder, and is not obese, has no DNR, no disseminated cancer, no cardiac, renal, or liver issues, not on chronic steroids, and no significant weight loss.

## When to prefer this

Use this endpoint when you need to programmatically compute the validated Ghanem 2012 Table 5 preoperative mortality score for a surgical patient and want a reliable, auditable arithmetic result without building the scoring logic yourself. Prefer it over manual calculation when integrating risk scores into clinical decision-support pipelines, EHR summarization agents, or pre-operative checklists where accuracy and reproducibility matter.

## Known failure modes

- Missing required query parameters (age or any boolean flag) returns a 400 error
- Age outside 18–120 range returns a validation error
- Boolean fields passed as non-boolean strings may cause a parse error
- Payment failure or missing x402 header returns a 402 Payment Required response
- Network timeout if the endpoint is temporarily unavailable

## How this service works

Ghanem 2012 Table 5 bedside preoperative mortality predictor. Inpatient 6, sepsis 4, poor functional status (total ADL assistance) 3, disseminated cancer 1, age (≥80 → 2; 70–79 → 1; 65–69 → 0.5; else 0), cardiac 5, pulmonary 3, renal 1, liver 1, chronic steroid 1, >10% weight loss 1, bleeding disorder 1, DNR 1, obesity −1. Range −1 to 30. Figure 3: <1% died in 0–5, 73% in 20–30. Not a go/no-go for surgery.

## Output

Returns the Ghanem 2012 Table 5 total PMP score (integer or half-point, range −1 to 30) along with the associated Figure 3 mortality probability band (e.g., <1% for scores 0–5, up to 73% for scores 20–30). Does not make a go/no-go surgical recommendation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "age",
      "inpatient",
      "sepsis",
      "poor_functional_status",
      "disseminated_cancer",
      "cardiac_comorbidity",
      "pulmonary_comorbidity",
      "renal_comorbidity",
      "liver_comorbidity",
      "steroid_chronic",
      "weight_loss_gt_10_percent",
      "bleeding_disorder",
      "dnr",
      "obesity"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Ghanem 2012 Table 5: ≥80 → 2; 70–79 → 1; 65–69 → 0.5; <65 → 0. Age 65 and 69 score 0.5; 70 and 79 score 1; 80 scores 2. Table 5 only (not the Discussion 1 / 1.5 / 2.5 wording)."
      },
      "dnr": {
       "type": "boolean",
       "description": "Do-not-resuscitate directive (Ghanem 2012 Table 5). true scores 1. magent does not read code-status orders."
      },
      "sepsis": {
       "type": "boolean",
       "description": "Preoperative sepsis as assigned by the caller (Ghanem 2012 Table 5). true scores 4. magent does not diagnose sepsis."
      },
      "obesity": {
       "type": "boolean",
       "description": "Obesity as assigned by the caller (Ghanem 2012 Table 5). true scores −1. magent does not compute BMI."
      },
      "inpatient": {
       "type": "boolean",
       "description": "Inpatient status (Ghanem 2012 Table 5). true scores 6. Caller-assigned; magent does not classify admission status."
      },
      "steroid_chronic": {
       "type": "boolean",
       "description": "Steroid for a chronic condition (Ghanem 2012 Table 5). true scores 1. magent does not read a medication list."
      },
      "bleeding_disorder": {
       "type": "boolean",
       "description": "Bleeding disorder as assigned by the caller (Ghanem 2012 Table 5). true scores 1. magent does not diagnose coagulopathy."
      },
      "liver_comorbidity": {
       "type": "boolean",
       "description": "Liver comorbidity as assigned by the caller (Ghane
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ghanem-2012-preoperative-mortality-predictor-pmp-f8badc3b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
