Neurology · LIVE
PHASES aneurysm rupture score (Greving 2014)
PHASES
Sum Greving 2014 PHASES points (population, hypertension, age, size, earlier SAH, site; max 22) and return the published grouped 5-year rupture risk percent.
Markdown: /docs/phases.md · Canonical: https://magentlab.com/docs/phases
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Sum Greving 2014 PHASES points (population, hypertension, age, size, earlier SAH, site; max 22) and return the published grouped 5-year rupture risk percent.
When to use
When an agent already has caller-assigned PHASES factors for an unruptured intracranial aneurysm and needs the published 5-year rupture-risk percent, not a treatment order or PHASES of care.
When not to use
- Not a medical device, not a diagnosis of rupture, and not a treatment, clipping, or coiling order.
- Not PHASES of care. Geographic population is caller-assigned (north_america_europe, japanese, or finnish as in Greving 2014). magent does not assign ancestry.
- Size bands and site groups follow Greving 2014 only (ica 0; mca 2; aca_pcom_posterior 4). magent does not read imaging.
- five_year_rupture_risk_percent is the paper's grouped table (score ≤2 → 0.4%; 3 → 0.7%; 4 → 0.9%; 5 → 1.3%; 6 → 1.7%; 7 → 2.4%; 8 → 3.2%; 9 → 4.3%; 10 → 5.3%; 11 → 7.2%; ≥12 → 17.8%). Scores 0 and 1 use the ≤2 row. The paper does not split ≥12 further.
Formula
PHASES = population (north_america_europe 0, japanese 3, finnish 5) + hypertension 1 + age>=70 1 + size (<7.0 0, 7.0-9.9 3, 10.0-19.9 6, >=20.0 10) + earlier_sah 1 + site (ica 0, mca 2, aca_pcom_posterior 4); max 22
Citation
- Authors
- Greving JP, Wermer MJH, Brown RD Jr, et al.
- Source
- Lancet Neurol. 2014;13(1):59-66
Worked example
North America/Europe, small ICA aneurysm
Given:
age=50aneurysm_mm=5earlier_sah=falsehypertension=falsepopulation=north_america_europesite=ica
- population north_america_europe 0; hypertension false 0; age 50 (<70) 0; aneurysm_mm 5 (<7.0) 0; earlier_sah false 0; site ica 0
- Score = 0 (max 22); five_year_rupture_risk_percent 0.4 (Greving 2014 ≤2 row)
Japanese population, otherwise the same small ICA aneurysm
Given:
age=50aneurysm_mm=5earlier_sah=falsehypertension=falsepopulation=japanesesite=ica
- japanese 3; remaining factors 0
- Score = 3; five_year_rupture_risk_percent 0.7
Also searched as
- PHASES score
- Greving PHASES
- aneurysm rupture risk
- unruptured intracranial aneurysm
- PHASES aneurysm
- 5-year aneurysm rupture
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/phases?population=north_america_europe&hypertension=false&age=50&aneurysm_mm=5&earlier_sah=false&site=ica
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/phases?population=north_america_europe&hypertension=false&age=50&aneurysm_mm=5&earlier_sah=false&site=ica"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
population |
string | required | Caller-assigned Greving 2014 geographic study population: north_america_europe (0; North America and Europe other than Finland), japanese (3), or finnish (5). magent does not assign ancestry. |
hypertension |
boolean | required | Caller-assigned history of hypertension (Greving 2014). true scores 1. magent does not take a blood-pressure reading. |
age |
integer | required | Age in years (integer 18-120). <70 scores 0; ≥70 scores 1 (Greving 2014). |
aneurysm_mm |
number | required | Caller-assigned maximum aneurysm diameter in millimetres (1.0-50.0). <7.0 scores 0; 7.0-9.9 scores 3; 10.0-19.9 scores 6; ≥20.0 scores 10. magent does not read imaging. |
earlier_sah |
boolean | required | Earlier subarachnoid hemorrhage from another aneurysm (Greving 2014). true scores 1. Not a diagnosis of current rupture. |
site |
string | required | Caller-assigned aneurysm site as grouped in Greving 2014: ica (0), mca (2), or aca_pcom_posterior (4; anterior cerebral, anterior communicating, posterior communicating, or posterior circulation). magent does not read 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.
- 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": [
{
"age": "50",
"aneurysm_mm": "5",
"earlier_sah": "false",
"hypertension": "false",
"population": "north_america_europe",
"site": "ica"
},
{
"age": "50",
"aneurysm_mm": "5",
"earlier_sah": "false",
"hypertension": "false",
"population": "north_america_europe",
"site": "ica"
}
]
}
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/phases",
"items": [
{
"components": [
{
"value": "north_america_europe",
"factor": "population",
"points": 0,
"present": true
},
{
"factor": "hypertension",
"points": 0,
"present": false
},
{
"value": 50,
"factor": "age",
"points": 0,
"present": false
},
{
"value": 5.0,
"factor": "aneurysm_mm",
"points": 0,
"present": true
},
{
"factor": "earlier_sah",
"points": 0,
"present": false
},
{
"value": "ica",
"factor": "site",
"points": 0,
"present": true
}
],
"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": "Greving JP, Wermer MJH, Brown RD Jr, et al.",
"doi": "10.1016/S1474-4422(13)70263-1",
"id": "greving-2014",
"pmid": "24290159",
"source": "Lancet Neurol. 2014;13(1):59-66",
"title": "Development of the PHASES score for prediction of risk of rupture of intracranial aneurysms: a pooled analysis of six prospective cohort studies"
},
"formula": "phases",
"formula_expression": "PHASES = population (north_america_europe 0, japanese 3, finnish 5) + hypertension 1 + age>=70 1 + size (<7.0 0, 7.0-9.9 3, 10.0-19.9 6, >=20.0 10) + earlier_sah 1 + site (ica 0, mca 2, aca_pcom_posterior 4); max 22",
"age_years": 50,
"max_score": 22,
"score": 0,
"site": "ica",
"aneurysm_mm": 5.0,
"five_year_rupture_risk_percent": 0.4,
"population": "north_america_europe"
},
{
"components": [
{
"value": "north_america_europe",
"factor": "population",
"points": 0,
"present": true
},
{
"factor": "hypertension",
"points": 0,
"present": false
},
{
"value": 50,
"factor": "age",
"points": 0,
"present": false
},
{
"value": 5.0,
"factor": "aneurysm_mm",
"points": 0,
"present": true
},
{
"factor": "earlier_sah",
"points": 0,
"present": false
},
{
"value": "ica",
"factor": "site",
"points": 0,
"present": true
}
],
"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": "Greving JP, Wermer MJH, Brown RD Jr, et al.",
"doi": "10.1016/S1474-4422(13)70263-1",
"id": "greving-2014",
"pmid": "24290159",
"source": "Lancet Neurol. 2014;13(1):59-66",
"title": "Development of the PHASES score for prediction of risk of rupture of intracranial aneurysms: a pooled analysis of six prospective cohort studies"
},
"formula": "phases",
"formula_expression": "PHASES = population (north_america_europe 0, japanese 3, finnish 5) + hypertension 1 + age>=70 1 + size (<7.0 0, 7.0-9.9 3, 10.0-19.9 6, >=20.0 10) + earlier_sah 1 + site (ica 0, mca 2, aca_pcom_posterior 4); max 22",
"age_years": 50,
"max_score": 22,
"score": 0,
"site": "ica",
"aneurysm_mm": 5.0,
"five_year_rupture_risk_percent": 0.4,
"population": "north_america_europe"
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | phases |
formula_expression |
string | Exact expression used |
score |
integer | PHASES points 0-22 |
max_score |
integer | 22 |
five_year_rupture_risk_percent |
number | Greving 2014 grouped 5-year rupture risk percent (≤2 → 0.4 through ≥12 → 17.8). Not a treatment order. |
population |
string | Caller-assigned population token used for scoring |
age_years |
integer | Age used for the ≥70 criterion |
aneurysm_mm |
number | Aneurysm diameter in millimetres used for size points |
site |
string | Caller-assigned site token used for scoring |
components |
array | Per-factor PHASES points |
citation |
object | Greving et al. Lancet Neurol 2014 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"value": "north_america_europe",
"factor": "population",
"points": 0,
"present": true
},
{
"factor": "hypertension",
"points": 0,
"present": false
},
{
"value": 50,
"factor": "age",
"points": 0,
"present": false
},
{
"value": 5.0,
"factor": "aneurysm_mm",
"points": 0,
"present": true
},
{
"factor": "earlier_sah",
"points": 0,
"present": false
},
{
"value": "ica",
"factor": "site",
"points": 0,
"present": true
}
],
"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": "Greving JP, Wermer MJH, Brown RD Jr, et al.",
"doi": "10.1016/S1474-4422(13)70263-1",
"id": "greving-2014",
"pmid": "24290159",
"source": "Lancet Neurol. 2014;13(1):59-66",
"title": "Development of the PHASES score for prediction of risk of rupture of intracranial aneurysms: a pooled analysis of six prospective cohort studies"
},
"formula": "phases",
"formula_expression": "PHASES = population (north_america_europe 0, japanese 3, finnish 5) + hypertension 1 + age>=70 1 + size (<7.0 0, 7.0-9.9 3, 10.0-19.9 6, >=20.0 10) + earlier_sah 1 + site (ica 0, mca 2, aca_pcom_posterior 4); max 22",
"age_years": 50,
"max_score": 22,
"score": 0,
"site": "ica",
"aneurysm_mm": 5.0,
"five_year_rupture_risk_percent": 0.4,
"population": "north_america_europe"
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_phases_population |
population must be north_america_europe, japanese, or finnish (Greving 2014 PHASES). Returned before settlement; you are not charged. |
| 400 | invalid_phases_size |
aneurysm_mm must be a number from 1.0 to 50.0 (Greving 2014 PHASES). Returned before settlement; you are not charged. |
| 400 | invalid_phases_site |
site must be ica, mca, or aca_pcom_posterior (Greving 2014 PHASES). Returned before settlement; you are not charged. |
| 400 | invalid_age |
age must be an integer from 18 to 120 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
- 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.
- Modified Fisher — Return the Frontera 2006 modified Fisher CT grade 0-4 from a caller-assigned grade, with the published grade description.
- Ottawa SAH Rule — Apply the Perry 2013 Ottawa SAH Rule and return whether investigation is indicated from age and five caller-assigned high-risk findings.
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.