MAGENT

Neurology · LIVE

PASCAL classification

PASCAL

Apply the Kent 2021 PASCAL classification (Table 1) from a caller-assigned RoPE total and large-shunt plus atrial-septal-aneurysm flags, and return probable, possible, or unlikely PFO-related stroke likelihood.

LIVE $0.005 USDC GET /api/calc/pascal

Markdown: /docs/pascal.md · Canonical: https://magentlab.com/docs/pascal

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

What it computes

Apply the Kent 2021 PASCAL classification (Table 1) from a caller-assigned RoPE total and large-shunt plus atrial-septal-aneurysm flags, and return probable, possible, or unlikely PFO-related stroke likelihood.

When to use

When an agent already has a caller-assigned RoPE total (0-10) and caller-assigned large-shunt and ASA flags after cryptogenic stroke with PFO, and must not invent a closure order, recompute RoPE, or apply ESUS.

When not to use

  • Not a medical device. Not a PFO diagnosis and not a closure or device-indication order.
  • rope_score is the caller-assigned Kent 2013 RoPE total (0-10). magent does not recompute RoPE; use the related rope tool for that index.
  • large_shunt and atrial_septal_aneurysm are caller-assigned. magent does not read echocardiography and does not echo those flags.
  • This is Kent 2021 PASCAL, not RoPE itself and not the Hart 2014 ESUS construct.
  • Pooled-trial ages were 18-60 years. That eligibility is a limitation, not an HTTP 400; RoPE already encodes age.

Formula

high_rope iff rope_score >= 7; high_risk_pfo iff large_shunt or atrial_septal_aneurysm; probable iff both; possible iff exactly one; unlikely iff neither (Kent 2021 Table 1 PASCAL). magent does not recompute RoPE

Citation

Title
Heterogeneity of Treatment Effects in an Analysis of Pooled Individual Patient Data From Randomized Trials of Device Closure of Patent Foramen Ovale After Stroke
Authors
Kent DM, Saver JL, Kasner SE, Nelson J, Carroll JD, Chatellier G, Derumeaux G, Furlan AJ, Herrmann HC, Jüni P, Kim JS, Koethe B, Lee PH, Lefebvre B, Mattle HP, Meier B, Reisman M, Smalling RW, Soendergaard L, Song JK, Mas JL, Thaler DE
Source
JAMA. 2021;326(22):2277-2286
DOI
10.1001/jama.2021.20956

Worked example

RoPE 8 with large shunt

Given: atrial_septal_aneurysm=falselarge_shunt=truerope_score=8

  1. rope_score 8 is >= 7 → high_rope true
  2. large_shunt true and atrial_septal_aneurysm false → high_risk_pfo true
  3. both true → pascal_class probable

RoPE 7 with ASA, no large shunt

Given: atrial_septal_aneurysm=truelarge_shunt=falserope_score=7

  1. rope_score 7 is >= 7 → high_rope true (Table 1 uses ≥7, not >7)
  2. atrial_septal_aneurysm true → high_risk_pfo true
  3. pascal_class probable

High RoPE without a high-risk PFO feature

Given: atrial_septal_aneurysm=falselarge_shunt=falserope_score=8

  1. rope_score 8 is >= 7 → high_rope true
  2. neither large_shunt nor ASA → high_risk_pfo false
  3. exactly one → pascal_class possible

Also searched as

  • PASCAL classification
  • PFO-Associated Stroke Causal Likelihood
  • Kent PASCAL
  • high-risk PFO
  • RoPE score PASCAL
  • patent foramen ovale causal likelihood
  • Kent 2021 PASCAL
  • large shunt ASA PFO
  • PFO-related stroke likelihood

Try

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

/api/calc/pascal?rope_score=8&large_shunt=true&atrial_septal_aneurysm=false

Full URL: https://api.magentlab.com/api/calc/pascal?rope_score=8&large_shunt=true&atrial_septal_aneurysm=false

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/pascal?rope_score=8&large_shunt=true&atrial_septal_aneurysm=false"

Parameters

Name Type Required Description
rope_score integer required Caller-assigned RoPE total integer 0-10 (Kent 2013 components already summed; related tool rope). magent does not recompute RoPE. high_rope is true when rope_score is 7 or greater (Kent 2021 Table 1 / NCBI reprint; not greater-than-7 only).
large_shunt boolean required Large-sized shunt as assigned by the caller (Kent 2021 Table 1 high-risk PFO feature). true or false. high_risk_pfo is true if this flag or atrial_septal_aneurysm is true. magent does not echo this flag and does not read echocardiography.
atrial_septal_aneurysm boolean required Atrial septal aneurysm (ASA) as assigned by the caller (Kent 2021 Table 1 high-risk PFO feature). true or false. high_risk_pfo is true if this flag or large_shunt is true. magent does not echo this flag and does not read echocardiography.

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/pascal 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": [
    {
      "atrial_septal_aneurysm": "false",
      "large_shunt": "true",
      "rope_score": "8"
    },
    {
      "atrial_septal_aneurysm": "false",
      "large_shunt": "true",
      "rope_score": "8"
    }
  ]
}

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/pascal",
  "items": [
    {
      "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": "Kent DM, Saver JL, Kasner SE, Nelson J, Carroll JD, Chatellier G, Derumeaux G, Furlan AJ, Herrmann HC, Jüni P, Kim JS, Koethe B, Lee PH, Lefebvre B, Mattle HP, Meier B, Reisman M, Smalling RW, Soendergaard L, Song JK, Mas JL, Thaler DE",
        "doi": "10.1001/jama.2021.20956",
        "id": "kent-2021",
        "pmid": "34905030",
        "source": "JAMA. 2021;326(22):2277-2286",
        "title": "Heterogeneity of Treatment Effects in an Analysis of Pooled Individual Patient Data From Randomized Trials of Device Closure of Patent Foramen Ovale After Stroke"
      },
      "formula": "pascal",
      "formula_expression": "high_rope iff rope_score >= 7; high_risk_pfo iff large_shunt or atrial_septal_aneurysm; probable iff both; possible iff exactly one; unlikely iff neither (Kent 2021 Table 1 PASCAL). magent does not recompute RoPE",
      "criteria": [
        {
          "value": 8,
          "factor": "high_rope",
          "met": true
        },
        {
          "factor": "high_risk_pfo",
          "met": true
        }
      ],
      "high_risk_pfo": true,
      "high_rope": true,
      "pascal_class": "probable",
      "rope_score": 8
    },
    {
      "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": "Kent DM, Saver JL, Kasner SE, Nelson J, Carroll JD, Chatellier G, Derumeaux G, Furlan AJ, Herrmann HC, Jüni P, Kim JS, Koethe B, Lee PH, Lefebvre B, Mattle HP, Meier B, Reisman M, Smalling RW, Soendergaard L, Song JK, Mas JL, Thaler DE",
        "doi": "10.1001/jama.2021.20956",
        "id": "kent-2021",
        "pmid": "34905030",
        "source": "JAMA. 2021;326(22):2277-2286",
        "title": "Heterogeneity of Treatment Effects in an Analysis of Pooled Individual Patient Data From Randomized Trials of Device Closure of Patent Foramen Ovale After Stroke"
      },
      "formula": "pascal",
      "formula_expression": "high_rope iff rope_score >= 7; high_risk_pfo iff large_shunt or atrial_septal_aneurysm; probable iff both; possible iff exactly one; unlikely iff neither (Kent 2021 Table 1 PASCAL). magent does not recompute RoPE",
      "criteria": [
        {
          "value": 8,
          "factor": "high_rope",
          "met": true
        },
        {
          "factor": "high_risk_pfo",
          "met": true
        }
      ],
      "high_risk_pfo": true,
      "high_rope": true,
      "pascal_class": "probable",
      "rope_score": 8
    }
  ]
}

Response

Field Type Description
formula string pascal
formula_expression string Kent 2021 Table 1 PASCAL classification
pascal_class string probable if high_rope and high_risk_pfo; possible if exactly one; unlikely if neither. Not a closure order.
high_rope boolean true when the caller-assigned rope_score is 7 or greater (not greater-than-7 only)
high_risk_pfo boolean true when large_shunt or atrial_septal_aneurysm is true (large-sized shunt and/or ASA). Input flags are not echoed.
rope_score integer Echo of the caller-assigned RoPE total 0-10. Not a RoPE recomputation.
criteria array Rows for high_rope (with rope_score value) and high_risk_pfo with factor and met
citation object Kent 2021 JAMA citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "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": "Kent DM, Saver JL, Kasner SE, Nelson J, Carroll JD, Chatellier G, Derumeaux G, Furlan AJ, Herrmann HC, Jüni P, Kim JS, Koethe B, Lee PH, Lefebvre B, Mattle HP, Meier B, Reisman M, Smalling RW, Soendergaard L, Song JK, Mas JL, Thaler DE",
    "doi": "10.1001/jama.2021.20956",
    "id": "kent-2021",
    "pmid": "34905030",
    "source": "JAMA. 2021;326(22):2277-2286",
    "title": "Heterogeneity of Treatment Effects in an Analysis of Pooled Individual Patient Data From Randomized Trials of Device Closure of Patent Foramen Ovale After Stroke"
  },
  "formula": "pascal",
  "formula_expression": "high_rope iff rope_score >= 7; high_risk_pfo iff large_shunt or atrial_septal_aneurysm; probable iff both; possible iff exactly one; unlikely iff neither (Kent 2021 Table 1 PASCAL). magent does not recompute RoPE",
  "criteria": [
    {
      "value": 8,
      "factor": "high_rope",
      "met": true
    },
    {
      "factor": "high_risk_pfo",
      "met": true
    }
  ],
  "high_risk_pfo": true,
  "high_rope": true,
  "pascal_class": "probable",
  "rope_score": 8
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_pascal rope_score must be an integer from 0 to 10 (Kent 2021 PASCAL; magent does not recompute RoPE). Returned before settlement; you are not charged.
400 invalid_flag boolean clinical flags must be true or false 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

  • ROPE — Compute the Kent 2013 Risk of Paradoxical Embolism (ROPE) index from Table 4 age decades and five caller-assigned vascular and infarct flags.
  • ESUS — Apply the Hart 2014 ESUS construct (Panel 2 criteria plus Panel 3 minimum diagnostic assessment) and return whether caller-assigned flags meet embolic stroke of undetermined source.
  • ABCD2 score — Compute the ABCD2 score as age, blood pressure, caller-assigned clinical features, symptom duration, and diabetes.

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. HTTP 402 never includes the tool JSON.
  • 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.