MAGENT

Emergency · LIVE

Surgical Apgar score (Gawande)

Surgical Apgar

Compute the Gawande 2007 intraoperative Surgical Apgar score from estimated blood loss, lowest mean arterial pressure, and lowest heart rate.

LIVE $0.005 USDC GET /api/calc/surgical_apgar

Markdown: /docs/surgical-apgar.md · Canonical: https://magentlab.com/docs/surgical-apgar

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

What it computes

Compute the Gawande 2007 intraoperative Surgical Apgar score from estimated blood loss, lowest mean arterial pressure, and lowest heart rate.

When to use

When an agent needs the published intraoperative Surgical Apgar total and must not substitute Virginia Apgar or treat the score as operative clearance.

When not to use

  • Not a medical device and not an operative-clearance, cancellation, or monitoring order. magent does not observe the operation.
  • This is the Gawande 2007 intraoperative Surgical Apgar (Table 1) only. It is not the Virginia Apgar newborn score.
  • Estimated blood loss, lowest MAP, and lowest heart rate are caller-supplied intraoperative values. magent does not read an anesthesia record.
  • score_le_4 follows the validation-cohort association of scores ≤4 with 58.6% 30-day death or major complication (9–10 with 3.6%). It is not an operative-clearance decision.

Formula

Surgical Apgar = ebl_points + lowest_map_points + lowest_hr_points; Gawande 2007 Table 1; max 10

Citation

Title
An Apgar score for surgery
Authors
Gawande AA, Kwaan MR, Regenbogen SE, Lipsitz SA, Zinner MJ
Source
J Am Coll Surg. 2007;204(2):201-208
DOI
10.1016/j.jamcollsurg.2006.11.011

Worked example

EBL 50 mL, lowest MAP 80, lowest HR 60

Given: ebl_ml=50lowest_heart_rate_bpm=60lowest_map_mm_hg=80

  1. EBL 50 → 3; lowest MAP 80 → 3; lowest HR 60 → 3
  2. Score = 9 (max 10); score_le_4 = false

EBL 1500 mL, lowest MAP 35, lowest HR 90

Given: ebl_ml=1500lowest_heart_rate_bpm=90lowest_map_mm_hg=35

  1. EBL 1500 → 0; lowest MAP 35 → 0; lowest HR 90 → 0
  2. Score = 0 (max 10); score_le_4 = true

Also searched as

  • surgical apgar
  • gawande
  • intraoperative
  • surgical apgar score
  • Gawande Apgar
  • intraoperative apgar
  • SAS surgery

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/surgical_apgar?ebl_ml=50&lowest_map_mm_hg=80&lowest_heart_rate_bpm=60

Full URL: https://api.magentlab.com/api/calc/surgical_apgar?ebl_ml=50&lowest_map_mm_hg=80&lowest_heart_rate_bpm=60

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/surgical_apgar?ebl_ml=50&lowest_map_mm_hg=80&lowest_heart_rate_bpm=60"

Parameters

Name Type Required Description
ebl_ml number required 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 number required 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 integer required 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.

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.

POST /api/calc/surgical_apgar Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "items": [
    {
      "ebl_ml": "50",
      "lowest_heart_rate_bpm": "60",
      "lowest_map_mm_hg": "80"
    },
    {
      "ebl_ml": "50",
      "lowest_heart_rate_bpm": "60",
      "lowest_map_mm_hg": "80"
    }
  ]
}

Open bulk paywall →

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

Response

Field Type Description
formula string surgical_apgar
formula_expression string Exact expression used
score integer Surgical Apgar points 0-10
max_score integer Always 10
score_le_4 boolean true when score is ≤4. Gawande 2007 validation cohort associated scores ≤4 with 58.6% 30-day death or major complication, and scores 9-10 with 3.6%. Not an operative-clearance decision.
ebl_ml number Estimated blood loss used, mL
lowest_map_mm_hg number Lowest intraoperative MAP used, mm Hg
lowest_heart_rate_bpm integer Lowest intraoperative heart rate used, bpm
components array Per-factor points
citation object Gawande 2007 J Am Coll Surg citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

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

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_ebl_ml ebl_ml must be a number from 0 to 20000. Returned before settlement; you are not charged.
400 invalid_map_mm_hg map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged.
400 invalid_heart_rate heart_rate_bpm must be an integer from 30 to 220 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

  • Apgar score — Compute the Apgar newborn evaluation score as the sum of five caller-assigned 0-2 signs.
  • RCRI — Sum the six Lee 1999 revised cardiac risk index factors and return class I–IV.
  • MAP — Compute conventional estimated mean arterial pressure from cuff systolic and diastolic pressures.

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