# Surgical Apgar Score Calculator (Gawande 2007)

> Surgical Apgar Score Calculator (Gawande 2007) 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 intraoperative Surgical Apgar Score (0–10) from estimated blood loss, lowest mean arterial pressure, and lowest heart rate, and flags scores ≤4 as high-risk

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/surgical_apgar
- 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/surgical-apgar-score-calculator-gawande-2007-189e001a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nq4lG6YISL-oLTWYrQ9dY

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 surgical-apgar-score-calculator-gawande-2007-189e001a
```

Example prompt: Calculate the Surgical Apgar Score for a patient who had an estimated blood loss of 750 mL, a lowest intraoperative MAP of 58 mmHg, and a lowest heart rate of 62 bpm — and let me know if the score is 4 or below.

## When to prefer this

Use this endpoint when you need a deterministic, citation-backed intraoperative risk score per the exact Gawande 2007 Table 1 arithmetic — not for Virginia Apgar newborn scoring, preoperative clearance assessment, or other perioperative risk tools like PESI or RCRI. Ideal when you have all three intraoperative values (EBL, lowest MAP, lowest HR) and need a reproducible, auditable computation.

## Known failure modes

- Missing required query parameters (ebl_ml, lowest_map_mm_hg, lowest_heart_rate_bpm) returns an error
- Values outside valid ranges (e.g. ebl_ml > 20000, MAP < 30, heart rate < 30 or > 220) may return validation errors
- Non-integer heart rate value rejected
- Payment not included or insufficient returns HTTP 402

## How this service works

Intraoperative Surgical Apgar (Gawande 2007 Table 1) from estimated blood loss, lowest mean arterial pressure, and lowest heart rate, summed to a 0–10 total. Returns score_le_4 because scores ≤4 were associated with 58.6% 30-day death or major complication in the validation cohort (9–10 associated with 3.6%). Deterministic published arithmetic with citation; not Virginia Apgar; not operative clearance.

## Output

Returns the total Surgical Apgar Score (0–10) composed of three subscores per Gawande 2007 Table 1, plus a boolean score_le_4 flag indicating whether the patient falls in the high-risk group (scores ≤4 were associated with 58.6% 30-day death or major complication in the validation cohort).

## 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": [
      "ebl_ml",
      "lowest_map_mm_hg",
      "lowest_heart_rate_bpm"
     ],
     "properties": {
      "ebl_ml": {
       "type": "number",
       "description": "Estimated intraoperative blood loss in mL (0.0-20000.0). Gawande 2007 Table 1: >1000 → 0, 601-1000 → 1, 101-600 → 2, ≤100 → 3."
      },
      "lowest_map_mm_hg": {
       "type": "number",
       "description": "Lowest intraoperative mean arterial pressure in mm Hg (30.0-180.0). Gawande 2007 Table 1: <40 → 0, 40-54 → 1, 55-69 → 2, ≥70 → 3."
      },
      "lowest_heart_rate_bpm": {
       "type": "integer",
       "description": "Lowest intraoperative heart rate in beats/min (integer 30-220). Gawande 2007 Table 1: >85 → 0, 76-85 → 1, 66-75 → 2, 56-65 → 3, ≤55 → 4."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/surgical_apgar",
  "count": 2,
  "items": [
   {
    "score": 9,
    "ebl_ml": 50,
    "formula": "surgical_apgar",
    "citation": {
     "id": "gawande-2007",
     "doi": "10.1016/j.jamcollsurg.2006.11.011",
     "pmid": "17254927",
     "title": "An Apgar score for surgery",
     "source": "J Am Coll Surg. 2007;204(2):201-208",
     "authors": "Gawande AA, Kwaan MR, Regenbogen SE, Lipsitz SA, Zinner MJ"
    },
    "max_score": 10,
    "components": [
     {
      "value": 50,
      "factor": "ebl_ml",
      "points": 3,
      "present": true
     },
     {
      "value": 80,
      "factor": "lowest_map_mm_hg",
      "points": 3,
      "present": true
     },
     {
      "value": 60,
      "factor": "lowest_heart_rate_bpm",
      "points": 3,
      "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.",
    "score_le_4": false,
    "lowest_map_mm_hg": 80,
    "formula_expression": "Surgical Apgar = ebl_points + lowest_map_points + lowest_hr_points; Gawande 2007 Table 1; max 10",
    "lowest_heart_rate_bpm": 60
   },
   {
    "score": 9,
    "ebl_ml": 50,
    "formula": "surgical_apgar",
    "citation": {
     "id": "gawande-2007",
     "doi": "10.1016/j.jamcollsurg.2006.11.011",
     "pmid": "17254927",
     "title": "An Apgar score for surgery",
     "source": "J Am Coll Surg. 2007;204(2):201-208",
     "authors": "Gawande AA, Kwaan MR, Regenbogen SE, Lipsitz SA, Zinner MJ"
    },
    "max_score": 10,
    "components": [
     {
      "value": 50,
      "factor": "ebl_ml",
      "points": 3,
      "present": true
     },
     {
      "value": 80,
      "factor": "lowest_map_mm_hg",
      "points": 3,
      "present": true
     },
     {
      "value": 60,
      "factor": "lowest_heart_rate_bpm",
      "points": 3,
      "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.",
    "score_le_4": false,
    "lowest_map_mm_hg": 80,
    "formula_expression": "Surgical Apgar = ebl_points + lowest_map_points + lowest_hr_points; Gawande 2007 Table 1; max 10",
    "lowest_heart_rate_bpm": 60
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/surgical-apgar-score-calculator-gawande-2007-189e001a/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)
