# San Francisco Syncope Rule (CHESS Score) Calculator

> San Francisco Syncope Rule (CHESS Score) 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 San Francisco Syncope Rule (CHESS) score from five clinical criteria to identify high-risk syncope patients, returning a criterion count (0–5) and rule-positive flag.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/sf_syncope
- 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/san-francisco-syncope-rule-chess-score-calculator-6d17621c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zAvAHcng30bivgxwcmNeo

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 san-francisco-syncope-rule-chess-score-calculator-6d17621c
```

Example prompt: Score this syncope patient on the San Francisco Syncope Rule: they have a history of CHF, hematocrit is 27%, ECG is abnormal, no shortness of breath, and systolic BP is 105 mm Hg.

## When to prefer this

Use this endpoint when you need a deterministic, citation-backed implementation of the San Francisco Syncope Rule (CHESS) for syncope risk stratification — particularly when building clinical decision support workflows, automating chart review, or auditing ED syncope management. Prefer this over general-purpose LLM reasoning for medical scoring because it guarantees adherence to the published Elesber/Quinn algorithm with traceable citation, not probabilistic generation. It is not a disposition protocol and should be used alongside clinical judgment.

## Known failure modes

- Missing required query parameters (chf, hematocrit_percent, abnormal_ecg, shortness_of_breath, systolic_bp_mm_hg) returns a validation error
- Hematocrit value outside accepted range (10–70%) returns an out-of-range error
- Systolic BP value outside accepted range (50–250 mm Hg) returns an out-of-range error
- Non-boolean values passed for boolean parameters return a type error
- Payment not included or insufficient USDC triggers a 402 Payment Required response

## How this service works

San Francisco Syncope Rule (CHESS) from history of CHF, hematocrit, abnormal ECG, shortness of breath, and systolic BP. Returns a 0-5 criterion count and rule-positive if any CHESS item is present. Deterministic published score with citation; not a disposition protocol.

## Output

Returns the total number of CHESS criteria met (integer 0–5) and a boolean rule-positive flag indicating whether any single criterion is present, which per the published rule identifies high-risk syncope. Individual criterion contributions are also available to explain which items scored positive.

## 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": [
      "chf",
      "hematocrit_percent",
      "abnormal_ecg",
      "shortness_of_breath",
      "systolic_bp_mm_hg"
     ],
     "properties": {
      "chf": {
       "type": "boolean",
       "description": "History of congestive heart failure (C). true or false."
      },
      "abnormal_ecg": {
       "type": "boolean",
       "description": "Abnormal ECG (E). true or false. Caller-assigned; magent does not read tracings."
      },
      "systolic_bp_mm_hg": {
       "type": "number",
       "description": "Systolic BP in mm Hg (50-250). Scores 1 when <90; 90 is negative."
      },
      "hematocrit_percent": {
       "type": "number",
       "description": "Hematocrit in percent (10-70). Scores 1 when <30; 30 is negative."
      },
      "shortness_of_breath": {
       "type": "boolean",
       "description": "Shortness of breath (S). 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/sf_syncope",
  "count": 2,
  "items": [
   {
    "score": 0,
    "formula": "sf_syncope",
    "citation": {
     "id": "quinn-2004",
     "doi": "10.1016/S0196-0644(03)00823-0",
     "title": "Derivation of the San Francisco Syncope Rule to predict patients with short-term serious outcomes",
     "source": "Ann Emerg Med. 2004;43(2):224-232",
     "authors": "Quinn JV, Stiell IG, McDermott DA, Sellers KL, Kohn MA, Wells GA"
    },
    "max_score": 5,
    "components": [
     {
      "factor": "chf",
      "points": 0,
      "present": false
     },
     {
      "value": 40,
      "factor": "hematocrit_lt_30",
      "points": 0,
      "present": false
     },
     {
      "factor": "abnormal_ecg",
      "points": 0,
      "present": false
     },
     {
      "factor": "shortness_of_breath",
      "points": 0,
      "present": false
     },
     {
      "value": 120,
      "factor": "systolic_bp_lt_90",
      "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.",
    "rule_positive": false,
    "systolic_bp_mm_hg": 120,
    "formula_expression": "CHESS = chf + hematocrit_lt_30 + abnormal_ecg + shortness_of_breath + systolic_bp_lt_90; rule-positive if score ≥ 1; max 5",
    "hematocrit_percent": 40
   },
   {
    "score": 0,
    "formula": "sf_syncope",
    "citation": {
     "id": "quinn-2004",
     "doi": "10.1016/S0196-0644(03)00823-0",
     "title": "Derivation of the San Francisco Syncope Rule to predict patients with short-term serious outcomes",
     "source": "Ann Emerg Med. 2004;43(2):224-232",
     "authors": "Quinn JV, Stiell IG, McDermott DA, Sellers KL, Kohn MA, Wells GA"
    },
    "max_score": 5,
    "components": [
     {
      "factor": "chf",
      "points": 0,
      "present": false
     },
     {
      "value": 40,
      "factor": "hematocrit_lt_30",
      "points": 0,
      "present": false
     },
     {
      "factor": "abnormal_ecg",
      "points": 0,
      "present": false
     },
     {
      "factor": "shortness_of_breath",
      "points": 0,
      "present": false
     },
     {
      "value": 120,
      "factor": "systolic_bp_lt_90",
      "points": 0,
      "present": false
     }
    ],
    "disclaimer": "Not a medical device. Deterministic published-formula or published-code 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/san-francisco-syncope-rule-chess-score-calculator-6d17621c/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)
