MAGENT

Neurology · LIVE

RCVS2 score (Rocha)

RCVS2

Sum the Rocha 2019 RCVS2 integer points (recurrent or single thunderclap headache, intracranial ICA involvement, vasoconstrictive trigger, female sex, subarachnoid hemorrhage) and return score -2 to 10 with the published against, equivocal, or supports band.

LIVE $0.005 USDC GET /api/calc/rcvs2

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

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

What it computes

Sum the Rocha 2019 RCVS2 integer points (recurrent or single thunderclap headache, intracranial ICA involvement, vasoconstrictive trigger, female sex, subarachnoid hemorrhage) and return score -2 to 10 with the published against, equivocal, or supports band.

When to use

When an agent already has caller-assigned Rocha 2019 RCVS2 items and needs the published point total and band, not a diagnosis of RCVS or PACNS, not angiogram reading, and not PACNS treatment advice.

When not to use

  • Not a medical device. Not a diagnosis of RCVS or PACNS. magent does not examine the patient.
  • magent does not read angiograms. intracranial_ica_involvement is a caller-assigned Rocha 2019 flag (true scores -2).
  • Recurrent and single thunderclap headache both score 5 as published; the paper does not split those patterns into different point values.
  • Bands follow Rocha 2019: score >=5 supports RCVS; <=2 against RCVS; 3-4 equivocal. Not PACNS treatment advice.

Formula

RCVS2 = thunderclap_headache (5 if recurrent or single) + intracranial_ica_involvement (-2) + vasoconstrictive_trigger (3) + female (1) + sah (1); Rocha 2019; range -2 to 10; >=5 supports RCVS, <=2 against, 3-4 equivocal

Citation

Title
RCVS2 score and diagnostic approach for reversible cerebral vasoconstriction syndrome
Authors
Rocha EA, Topcuoglu MA, Silva GS, Singhal AB
Source
Neurology. 2019;92(7):e639-e647
DOI
10.1212/WNL.0000000000006917

Worked example

Male, all flags false

Given: intracranial_ica_involvement=falsesah=falsesex=malethunderclap_headache=falsevasoconstrictive_trigger=false

  1. thunderclap_headache false → 0; intracranial_ica_involvement false → 0; vasoconstrictive_trigger false → 0; male → 0; sah false → 0
  2. score = 0 (max 10); band = against

Thunderclap, trigger, female, SAH, no intracranial ICA

Given: intracranial_ica_involvement=falsesah=truesex=femalethunderclap_headache=truevasoconstrictive_trigger=true

  1. thunderclap_headache true → 5; intracranial_ica_involvement false → 0; vasoconstrictive_trigger true → 3; female → 1; sah true → 1
  2. score = 10 (max 10); band = supports

Also searched as

  • RCVS2
  • RCVS2 score
  • reversible cerebral vasoconstriction syndrome score
  • Rocha RCVS2
  • thunderclap headache vasoconstriction
  • RCVS score
  • reversible cerebral vasoconstriction

Try

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

/api/calc/rcvs2?thunderclap_headache=false&intracranial_ica_involvement=false&vasoconstrictive_trigger=false&sex=male&sah=false

Full URL: https://api.magentlab.com/api/calc/rcvs2?thunderclap_headache=false&intracranial_ica_involvement=false&vasoconstrictive_trigger=false&sex=male&sah=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/rcvs2?thunderclap_headache=false&intracranial_ica_involvement=false&vasoconstrictive_trigger=false&sex=male&sah=false"

Parameters

Name Type Required Description
thunderclap_headache boolean required Recurrent or single thunderclap headache as assigned by the caller (Rocha 2019). Both patterns score 5; the paper does not split them. true or false. magent does not take a headache history.
intracranial_ica_involvement boolean required Intracranial internal carotid artery involvement as assigned by the caller (Rocha 2019). true scores -2. magent does not read angiograms.
vasoconstrictive_trigger boolean required Identified vasoconstrictive trigger as assigned by the caller (Rocha 2019). true scores 3. magent does not take a trigger history.
sex string required · female, male female or male (Rocha 2019). Female scores 1; male scores 0.
sah boolean required Subarachnoid hemorrhage on imaging as assigned by the caller (Rocha 2019). true scores 1. magent does not interpret imaging.

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/rcvs2 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": [
    {
      "intracranial_ica_involvement": "false",
      "sah": "false",
      "sex": "male",
      "thunderclap_headache": "false",
      "vasoconstrictive_trigger": "false"
    },
    {
      "intracranial_ica_involvement": "false",
      "sah": "false",
      "sex": "male",
      "thunderclap_headache": "false",
      "vasoconstrictive_trigger": "false"
    }
  ]
}

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/rcvs2",
  "items": [
    {
      "band": "against",
      "components": [
        {
          "factor": "thunderclap_headache",
          "points": 0,
          "present": false
        },
        {
          "factor": "intracranial_ica_involvement",
          "points": 0,
          "present": false
        },
        {
          "factor": "vasoconstrictive_trigger",
          "points": 0,
          "present": false
        },
        {
          "value": "male",
          "factor": "sex",
          "points": 0,
          "present": false
        },
        {
          "factor": "sah",
          "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.",
      "citation": {
        "authors": "Rocha EA, Topcuoglu MA, Silva GS, Singhal AB",
        "doi": "10.1212/WNL.0000000000006917",
        "id": "rocha-2019",
        "pmid": "30635475",
        "source": "Neurology. 2019;92(7):e639-e647",
        "title": "RCVS2 score and diagnostic approach for reversible cerebral vasoconstriction syndrome"
      },
      "formula": "rcvs2",
      "formula_expression": "RCVS2 = thunderclap_headache (5 if recurrent or single) + intracranial_ica_involvement (-2) + vasoconstrictive_trigger (3) + female (1) + sah (1); Rocha 2019; range -2 to 10; >=5 supports RCVS, <=2 against, 3-4 equivocal",
      "max_score": 10,
      "score": 0
    },
    {
      "band": "against",
      "components": [
        {
          "factor": "thunderclap_headache",
          "points": 0,
          "present": false
        },
        {
          "factor": "intracranial_ica_involvement",
          "points": 0,
          "present": false
        },
        {
          "factor": "vasoconstrictive_trigger",
          "points": 0,
          "present": false
        },
        {
          "value": "male",
          "factor": "sex",
          "points": 0,
          "present": false
        },
        {
          "factor": "sah",
          "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.",
      "citation": {
        "authors": "Rocha EA, Topcuoglu MA, Silva GS, Singhal AB",
        "doi": "10.1212/WNL.0000000000006917",
        "id": "rocha-2019",
        "pmid": "30635475",
        "source": "Neurology. 2019;92(7):e639-e647",
        "title": "RCVS2 score and diagnostic approach for reversible cerebral vasoconstriction syndrome"
      },
      "formula": "rcvs2",
      "formula_expression": "RCVS2 = thunderclap_headache (5 if recurrent or single) + intracranial_ica_involvement (-2) + vasoconstrictive_trigger (3) + female (1) + sah (1); Rocha 2019; range -2 to 10; >=5 supports RCVS, <=2 against, 3-4 equivocal",
      "max_score": 10,
      "score": 0
    }
  ]
}

Response

Field Type Description
formula string rcvs2
formula_expression string Exact expression used
score integer RCVS2 points -2 to 10
max_score integer Always 10
band string Rocha 2019 band: supports when score >=5, against when <=2, equivocal when 3-4. Not a diagnosis and not PACNS treatment advice.
components array Per-factor points
citation object Rocha et al. Neurology 2019 citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "band": "against",
  "components": [
    {
      "factor": "thunderclap_headache",
      "points": 0,
      "present": false
    },
    {
      "factor": "intracranial_ica_involvement",
      "points": 0,
      "present": false
    },
    {
      "factor": "vasoconstrictive_trigger",
      "points": 0,
      "present": false
    },
    {
      "value": "male",
      "factor": "sex",
      "points": 0,
      "present": false
    },
    {
      "factor": "sah",
      "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.",
  "citation": {
    "authors": "Rocha EA, Topcuoglu MA, Silva GS, Singhal AB",
    "doi": "10.1212/WNL.0000000000006917",
    "id": "rocha-2019",
    "pmid": "30635475",
    "source": "Neurology. 2019;92(7):e639-e647",
    "title": "RCVS2 score and diagnostic approach for reversible cerebral vasoconstriction syndrome"
  },
  "formula": "rcvs2",
  "formula_expression": "RCVS2 = thunderclap_headache (5 if recurrent or single) + intracranial_ica_involvement (-2) + vasoconstrictive_trigger (3) + female (1) + sah (1); Rocha 2019; range -2 to 10; >=5 supports RCVS, <=2 against, 3-4 equivocal",
  "max_score": 10,
  "score": 0
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_rcvs2 RCVS2 inputs must be the five Rocha 2019 caller-assigned items (thunderclap headache, intracranial ICA involvement, vasoconstrictive trigger, sex, subarachnoid hemorrhage). 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

  • Hunt-Hess — Return the Hunt and Hess 1968 subarachnoid-hemorrhage surgical-risk grade from a caller-assigned grade 1-5, applying the paper's next-less-favorable bump when serious systemic disease is present.
  • Fisher — Return the Fisher 1980 original CT group 1-4 from a caller-assigned grade, with the published group description.

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.