# Revised Cardiac Risk Index (RCRI) Calculator

> Revised Cardiac Risk Index (RCRI) Calculator is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Computes the Lee 1999 Revised Cardiac Risk Index score (0–6) and risk class (I–IV) from six binary clinical factors for perioperative cardiac risk estimation.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/rcri?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/revised-cardiac-risk-index-rcri-calculator-c2c40ee5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4HcBpv_Enh47KtQPVcdYs

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 revised-cardiac-risk-index-rcri-calculator-c2c40ee5
```

Example prompt: Calculate the Revised Cardiac Risk Index for a patient who is having intrathoracic surgery, has a history of myocardial infarction and congestive heart failure, no cerebrovascular disease, is on insulin for diabetes, and has a preoperative creatinine of 2.4 mg/dL.

## When to prefer this

Use this endpoint when you need a fast, deterministic, citeable perioperative cardiac risk score following the published Lee 1999 RCRI algorithm. Prefer it over general clinical AI when reproducibility and alignment with a specific validated index is required, such as for documentation, auditing, or EHR integration.

## Known failure modes

- Missing any of the six required boolean query parameters returns a validation error
- Non-boolean values for flag parameters cause a schema error
- Network or payment (x402) failure prevents score retrieval

## How this service works

Deterministic published-formula arithmetic plus ICD-10-CM, RxNorm, and LOINC. Pay in USDC on Base via x402.

## Output

Returns the numeric RCRI score (0–6, one point per positive factor) and the corresponding risk class (I–IV) based on the Lee 1999 derivation, along with the six individual factor values used in the calculation. Does not provide operative clearance.

## 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": [
      "high_risk_surgery",
      "ischemic_heart_disease",
      "congestive_heart_failure",
      "cerebrovascular_disease",
      "insulin_diabetes",
      "creatinine_gt_2"
     ],
     "properties": {
      "creatinine_gt_2": {
       "type": "boolean",
       "description": "Preoperative serum creatinine >2.0 mg/dL (Lee 1999). true or false."
      },
      "insulin_diabetes": {
       "type": "boolean",
       "description": "Preoperative insulin therapy for diabetes (Lee 1999). true or false."
      },
      "high_risk_surgery": {
       "type": "boolean",
       "description": "Intraperitoneal, intrathoracic, or suprainguinal vascular surgery (Lee 1999). true or false."
      },
      "ischemic_heart_disease": {
       "type": "boolean",
       "description": "History of myocardial infarction, positive exercise test, current chest pain from ischemia, nitrate use, or Q waves (Lee 1999). true or false."
      },
      "cerebrovascular_disease": {
       "type": "boolean",
       "description": "History of stroke or TIA (Lee 1999). true or false."
      },
      "congestive_heart_failure": {
       "type": "boolean",
       "description": "History of heart failure, pulmonary edema, PND, rales, S3, or chest radiograph with vascular redistribution (Lee 1999). true or false."
      }
     }
    }
   },
   "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/rcri",
  "count": 2,
  "items": [
   {
    "score": 0,
    "formula": "rcri",
    "citation": {
     "id": "lee-1999",
     "doi": "10.1161/01.CIR.100.10.1043",
     "title": "Derivation and prospective validation of a simple index for prediction of cardiac risk of major noncardiac surgery",
     "source": "Circulation. 1999;100(10):1043-1049",
     "authors": "Lee TH, Marcantonio ER, Mangione CM, et al."
    },
    "max_score": 6,
    "components": [
     {
      "factor": "high_risk_surgery",
      "points": 0,
      "present": false
     },
     {
      "factor": "ischemic_heart_disease",
      "points": 0,
      "present": false
     },
     {
      "factor": "congestive_heart_failure",
      "points": 0,
      "present": false
     },
     {
      "factor": "cerebrovascular_disease",
      "points": 0,
      "present": false
     },
     {
      "factor": "insulin_diabetes",
      "points": 0,
      "present": false
     },
     {
      "factor": "creatinine_gt_2",
      "points": 0,
      "present": false
     }
    ],
    "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.",
    "rcri_class": "I",
    "formula_expression": "RCRI = high_risk_surgery + ischemic_heart_disease + congestive_heart_failure + cerebrovascular_disease + insulin_diabetes + creatinine_gt_2; each 1; max 6"
   },
   {
    "score": 0,
    "formula": "rcri",
    "citation": {
     "id": "lee-1999",
     "doi": "10.1161/01.CIR.100.10.1043",
     "title": "Derivation and prospective validation of a simple index for prediction of cardiac risk of major noncardiac surgery",
     "source": "Circulation. 1999;100(10):1043-1049",
     "authors": "Lee TH, Marcantonio ER, Mangione CM, et al."
    },
    "max_score": 6,
    "components": [
     {
      "factor": "high_risk_surgery",
      "points": 0,
      "present": false
     },
     {
      "factor": "ischemic_heart_disease",
      "points": 0,
      "present": false
     },
     {
      "factor": "congestive_heart_failure",
      "points": 0,
      "present": false
     },
     {
      "factor": "cerebrovascular_disease",
      "points": 0,
      "present": false
     },
     {
      "factor": "insulin_diabetes",
      "points": 0,
      "present": false
     },
     {
      "factor": "creatinine_gt_2",
      "points": 0,
      "present": 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/revised-cardiac-risk-index-rcri-calculator-c2c40ee5/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)
