# PSI/PORT Pneumonia Severity Index Calculator

> PSI/PORT Pneumonia Severity Index 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 Fine 1997 Pneumonia Severity Index (PSI/PORT) risk class (I–V) and Table 2 point total for community-acquired pneumonia severity stratification.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/psi_port
- 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/psi-port-pneumonia-severity-index-calculator-5a008629
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ctbQUY0DnELZV9uxG6Nf9

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 psi-port-pneumonia-severity-index-calculator-5a008629
```

Example prompt: Calculate the PSI/PORT pneumonia severity score for a 72-year-old male nursing home resident with CHF and no neoplastic, liver, cerebrovascular, or renal disease — his heart rate is 110 bpm, respiratory rate 22, systolic BP 95, temperature 38.2°C, arterial pH 7.38, BUN 25 mg/dL, sodium 138 mmol/L, glucose 120 mg/dL, hematocrit 38%, PaO2 75 mmHg, and no pleural effusion.

## When to prefer this

Choose this endpoint when you need a validated, algorithmic implementation of the Fine 1997 PSI/PORT score with full Table 2 point accounting — especially when your clinical decision support pipeline requires the numeric subtotal alongside the risk class, or when you need to confirm Step 1 Class I eligibility programmatically. Prefer it over SMART-COP (also available on this host) when the clinical question is mortality risk class rather than need for intensive respiratory or vasopressor support.

## Known failure modes

- Missing required query parameters (age, sex, vitals, labs, comorbidity flags) returns an error
- Out-of-range values for numeric fields (e.g. age <18 or >120, pH outside 6.80–7.80) may return validation errors
- Incorrect data types (e.g. non-boolean for comorbidity flags) cause parameter parsing failures
- Network or payment authorization failure returns HTTP 402 or 5xx

## How this service works

Fine 1997 Pneumonia Severity Index (PSI/PORT): Class I if age ≤50 and no neoplastic, liver, CHF, cerebrovascular, or renal disease, no AMS, HR <125, RR <30, SBP >=90, and temperature 35 to <40 C. Otherwise Table 2 points (age, or age-10 if female, plus comorbidity, vital-sign, and laboratory weights) map to classes II-V. Always returns the Table 2 total. Not a medical device and not a site-of-care decision.

## Output

Returns the PSI/PORT risk class (I through V) determined by Fine 1997 step-wise logic — Class I if age ≤50 with no qualifying comorbidities or abnormal vitals, otherwise Classes II–V based on Table 2 total point score — and always includes the Table 2 cumulative numeric point total. Not intended as a medical device or site-of-care decision tool.

## 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",
      "sex",
      "nursing_home",
      "neoplastic",
      "liver_disease",
      "chf",
      "cerebrovascular",
      "renal_disease",
      "altered_mental_status",
      "heart_rate_bpm",
      "respiratory_rate",
      "systolic_mm_hg",
      "temperature_c",
      "arterial_ph",
      "bun_mg_dl",
      "sodium_mmol_l",
      "glucose_mg_dl",
      "hematocrit_percent",
      "pao2_mm_hg",
      "pleural_effusion"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Table 2: men add the age integer; women add age − 10. Step 1 Class I requires age ≤50 (Fine: 50 years of age or younger)."
      },
      "chf": {
       "type": "boolean",
       "description": "Congestive heart failure as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +10 if true."
      },
      "sex": {
       "type": "string",
       "description": "Sex (female or male). Women subtract 10 from the age points."
      },
      "bun_mg_dl": {
       "type": "number",
       "description": "Blood urea nitrogen in mg/dL (1-200). Table 2 +20 when ≥30; 29.9 does not score. Not a Step 1 Class I item."
      },
      "neoplastic": {
       "type": "boolean",
       "description": "Neoplastic disease as assigned by the caller. true or false. Step 1 excludes Class I if true. Table 2 +30 if true."
      },
      "pao2_mm_hg": {
       "type": "number",
       "description": "Arterial PaO2 in mm Hg (20-700). Table 2 +10 when <60; 60 does not score. Not a Step 1 Class I item."
      },
      "arterial_ph": {
       "type": "number",
       "description": "Arterial pH (6.80-7.80). Table 2 +30 when <7.35; 7.35 does not score. Not a Step 1 Class I item."
      },
      "nursing_home": {
       "type": "boolean",
       "description": "Nursing home resident as assigned by the caller. true or false. Table 2 +10 if true. Not a Step
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/psi_port",
  "count": 2,
  "items": [
   {
    "score": 45,
    "formula": "psi_port",
    "citation": {
     "id": "fine-1997",
     "doi": "10.1056/NEJM199701233360402",
     "pmid": "8995086",
     "title": "A prediction rule to identify low-risk patients with community-acquired pneumonia",
     "source": "N Engl J Med. 1997;336(4):243-250",
     "authors": "Fine MJ, Auble TE, Yealy DM, et al."
    },
    "age_years": 45,
    "components": [
     {
      "value": 45,
      "factor": "age",
      "points": 45,
      "present": true
     },
     {
      "factor": "nursing_home",
      "points": 0,
      "present": false
     },
     {
      "factor": "neoplastic",
      "points": 0,
      "present": false
     },
     {
      "factor": "liver_disease",
      "points": 0,
      "present": false
     },
     {
      "factor": "chf",
      "points": 0,
      "present": false
     },
     {
      "factor": "cerebrovascular",
      "points": 0,
      "present": false
     },
     {
      "factor": "renal_disease",
      "points": 0,
      "present": false
     },
     {
      "factor": "altered_mental_status",
      "points": 0,
      "present": false
     },
     {
      "value": 16,
      "factor": "respiratory_rate_ge_30",
      "points": 0,
      "present": false
     },
     {
      "value": 120,
      "factor": "systolic_mm_hg_lt_90",
      "points": 0,
      "present": false
     },
     {
      "value": 37,
      "factor": "temperature_extreme",
      "points": 0,
      "present": false
     },
     {
      "value": 80,
      "factor": "heart_rate_ge_125",
      "points": 0,
      "present": false
     },
     {
      "value": 7.4,
      "factor": "arterial_ph_lt_7_35",
      "points": 0,
      "present": false
     },
     {
      "value": 14,
      "factor": "bun_ge_30",
      "points": 0,
      "present": false
     },
     {
      "value": 140,
      "factor": "sodium_lt_130",
      "points": 0,
      "present": false
     },
     {
      "value": 90,
      "factor": "glucose_ge_250",
      "points": 0,
      "present": false
     },
     {
      "value": 42,
      "factor": "hematocrit_lt_30",
      "points": 0,
      "present": false
     },
     {
      "value": 90,
      "factor": "pao2_lt_60",
      "points": 0,
      "present": false
     },
     {
      "factor": "pleural_effusion",
      "points": 0,
      "present": false
     }
    ],
    "disclaimer": "Not a medical device. Determinis
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/psi-port-pneumonia-severity-index-calculator-5a008629/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)
