# Korabathina 2012 PAPi Calculator

> Korabathina 2012 PAPi 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-09-15).

Calculates the Pulmonary Artery Pulsatility Index (PAPi) from PA systolic, PA diastolic, and right atrial pressure, returning the ratio and its ROC band classification

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/papi
- 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/korabathina-2012-papi-calculator-0a4ce4c2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XPJws--n-VXw6_eW2NPsM

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 korabathina-2012-papi-calculator-0a4ce4c2
```

Example prompt: Calculate the PAPi using Korabathina 2012 for a patient with PA systolic 45 mm Hg, PA diastolic 20 mm Hg, and right atrial pressure 8 mm Hg — I need the ratio and which ROC band it falls in.

## When to prefer this

Use this endpoint when you need a deterministic, formula-faithful implementation of the Korabathina 2012 PAPi calculation with explicit ROC band classification, particularly in automated clinical data pipelines, EHR integrations, or research workflows where reproducibility of the published formula (no RAP=1 substitution, equality at 0.9 maps to <=0.9) is essential. Prefer it over manual calculation to avoid arithmetic errors in critical care or prior-authorization documentation contexts.

## Known failure modes

- RAP value of 0 returns an error (division by zero; no RAP=1 substitution is made)
- PA diastolic >= PA systolic returns an error or nonsensical result
- Values outside valid ranges (PA systolic 10-150, PA diastolic 1-80, RAP 1-40) may be rejected
- Missing required query parameters returns a validation error
- Non-numeric inputs for any parameter cause a 400-level error

## How this service works

Korabathina 2012 pulmonary artery pulsatility index from PA systolic (mm Hg), PA diastolic (mm Hg), and RAP (mm Hg): PAPi = (PAS − PAD) / RAP. Returns papi to two decimals and the paper ROC band (<=0.9 or >0.9) from the unrounded ratio. Equality at 0.9 is <=0.9. RAP 0 is invalid (no RAP=1 substitution). Not a medical device, RV-failure diagnosis, or device threshold.

## Output

Returns the PAPi value rounded to two decimal places (calculated as (PA systolic − PA diastolic) / RAP) and the Korabathina 2012 ROC band classification: <=0.9 or >0.9, based on the unrounded ratio. RAP of 0 is rejected as invalid.

## 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": [
      "pa_systolic_mm_hg",
      "pa_diastolic_mm_hg",
      "ra_mm_hg"
     ],
     "properties": {
      "ra_mm_hg": {
       "type": "number",
       "description": "Right atrial pressure in mm Hg (1-40). RAP 0 is invalid; Korabathina 2012 did not substitute RAP=1."
      },
      "pa_systolic_mm_hg": {
       "type": "number",
       "description": "Pulmonary artery systolic pressure in mm Hg (10-150). Invasive catheter number; this tool does not read waveforms."
      },
      "pa_diastolic_mm_hg": {
       "type": "number",
       "description": "Pulmonary artery diastolic pressure in mm Hg (1-80). Must be less than PA systolic."
      }
     }
    }
   },
   "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/papi",
  "count": 2,
  "items": [
   {
    "band": ">0.9",
    "papi": 3,
    "formula": "papi",
    "citation": {
     "id": "korabathina-2012",
     "doi": "10.1002/ccd.23309",
     "pmid": "21954053",
     "title": "The pulmonary artery pulsatility index identifies severe right ventricular dysfunction in acute inferior myocardial infarction.",
     "source": "Catheter Cardiovasc Interv. 2012;80(4):593-600",
     "authors": "Korabathina R, Heffernan KS, Paruchuri V, et al."
    },
    "ra_mm_hg": 6,
    "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.",
    "pa_systolic_mm_hg": 30,
    "formula_expression": "papi = (pa_systolic_mm_hg - pa_diastolic_mm_hg) / ra_mm_hg",
    "pa_diastolic_mm_hg": 12
   },
   {
    "band": ">0.9",
    "papi": 3,
    "formula": "papi",
    "citation": {
     "id": "korabathina-2012",
     "doi": "10.1002/ccd.23309",
     "pmid": "21954053",
     "title": "The pulmonary artery pulsatility index identifies severe right ventricular dysfunction in acute inferior myocardial infarction.",
     "source": "Catheter Cardiovasc Interv. 2012;80(4):593-600",
     "authors": "Korabathina R, Heffernan KS, Paruchuri V, et al."
    },
    "ra_mm_hg": 6,
    "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.",
    "pa_systolic_mm_hg": 30,
    "formula_expression": "papi = (pa_systolic_mm_hg - pa_diastolic_mm_hg) / ra_mm_hg",
    "pa_diastolic_mm_hg": 12
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/korabathina-2012-papi-calculator-0a4ce4c2/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)
