Neurology · LIVE
FUNC score
Compute the Rost 2008 FUNC score from caller-assigned ICH volume, age, location, GCS, and pre-ICH cognitive impairment.
Markdown: /docs/func-score.md · Canonical: https://magentlab.com/docs/func-score
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute the Rost 2008 FUNC score from caller-assigned ICH volume, age, location, GCS, and pre-ICH cognitive impairment.
When to use
When an agent needs the published FUNC total and 90-day functional-independence band and must not invent volume, location, GCS, or pre-ICH cognition from a CT scan or chart narrative.
When not to use
- Not a diagnosis and not a withdrawal-of-care protocol.
- Companion to the Hemphill ICH Score (30-day mortality), not a replacement.
- The caller assigns ICH volume, location, GCS, and pre-ICH cognitive impairment. magent does not read a CT scan or examine the patient.
- Rost 2008 reported observed 90-day functional independence (Glasgow Outcome Scale ≥4) of 0% (FUNC 0-4), 29% (5-7), 48% (8), 75% (9-10), and 95% (FUNC 11) in the published band table. Those are cohort proportions, not a care recommendation.
- The JSON response is score, max_score 11, and func_band. It does not include a percent independence table.
Formula
FUNC = ich_volume + age + location + gcs + pre_ich_cognitive_impairment; volume <30 → 4, 30-60 → 2, >60 → 0; age <70 → 2, 70-79 → 1, >=80 → 0; lobar 2, deep 1, infratentorial 0; GCS >=9 → 2, <=8 → 0; pre-ICH cognitive impairment absent 1, present 0; max 11
Citation
- Title
- Prediction of functional outcome in patients with primary intracerebral hemorrhage: the FUNC score
- Authors
- Rost NS, Smith EE, Chang Y, et al.
- Source
- Stroke. 2008;39(8):2304-2309
Worked example
Lobar ICH, small volume, GCS 14
Given:
age=60gcs=14ich_volume_ml=15location=lobarpre_ich_cognitive_impairment=false
- Volume 15 mL is <30 → 4; age 60 is <70 → 2; location lobar → 2
- GCS 14 is ≥9 → 2; pre-ICH cognitive impairment absent → 1
- Score = 11 (max 11), func_band 11
Large infratentorial ICH, GCS 8, cognitive impairment
Given:
age=80gcs=8ich_volume_ml=70location=infratentorialpre_ich_cognitive_impairment=true
- Volume 70 mL is >60 → 0; age 80 is ≥80 → 0; location infratentorial → 0
- GCS 8 is ≤8 → 0; pre-ICH cognitive impairment present → 0
- Score = 0 (max 11), func_band 0-4
Also searched as
- FUNC score
- FUNC ICH score
- Rost FUNC
- ICH functional outcome score
- primary ICH FUNC
- Rost 2008 FUNC
- functional independence ICH score
- FUNC 90-day ICH
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/func_score?ich_volume_ml=15&age=60&location=lobar&gcs=14&pre_ich_cognitive_impairment=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/func_score?ich_volume_ml=15&age=60&location=lobar&gcs=14&pre_ich_cognitive_impairment=false"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ich_volume_ml |
number | required | ICH volume in mL (cm^3 in Rost 2008). Number from 0.1 to 300. <30 scores 4; 30-60 scores 2; >60 scores 0. magent does not measure volume from imaging. |
age |
integer | required | Age in years (18-120). <70 scores 2; 70-79 scores 1; ≥80 scores 0. |
location |
string | required | ICH location as assigned by the caller: lobar (2), deep (1), or infratentorial (0). magent does not read a CT scan. |
gcs |
integer | required | Caller-assigned GCS total (integer 3-15). ≥9 scores 2; ≤8 scores 0. magent does not compute GCS from eye, verbal, and motor here. |
pre_ich_cognitive_impairment |
boolean | required | Pre-ICH cognitive impairment as assigned by the caller. true or false. Absent (false) scores 1; present (true) scores 0. |
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": "60",
"gcs": "14",
"ich_volume_ml": "15",
"location": "lobar",
"pre_ich_cognitive_impairment": "false"
},
{
"age": "60",
"gcs": "14",
"ich_volume_ml": "15",
"location": "lobar",
"pre_ich_cognitive_impairment": "false"
}
]
}
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/func_score",
"items": [
{
"location": "lobar",
"components": [
{
"value": 15.0,
"factor": "ich_volume_ml",
"points": 4,
"present": true
},
{
"value": 60,
"factor": "age",
"points": 2,
"present": true
},
{
"value": "lobar",
"factor": "location",
"points": 2,
"present": true
},
{
"value": 14,
"factor": "gcs",
"points": 2,
"present": true
},
{
"value": false,
"factor": "pre_ich_cognitive_impairment",
"points": 1,
"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.",
"age_years": 60,
"citation": {
"authors": "Rost NS, Smith EE, Chang Y, et al.",
"doi": "10.1161/STROKEAHA.107.512202",
"id": "rost-2008",
"pmid": "18556582",
"source": "Stroke. 2008;39(8):2304-2309",
"title": "Prediction of functional outcome in patients with primary intracerebral hemorrhage: the FUNC score"
},
"formula": "func_score",
"formula_expression": "FUNC = ich_volume + age + location + gcs + pre_ich_cognitive_impairment; volume <30 → 4, 30-60 → 2, >60 → 0; age <70 → 2, 70-79 → 1, >=80 → 0; lobar 2, deep 1, infratentorial 0; GCS >=9 → 2, <=8 → 0; pre-ICH cognitive impairment absent 1, present 0; max 11",
"max_score": 11,
"score": 11,
"func_band": "11",
"gcs": 14,
"ich_volume_ml": 15.0,
"pre_ich_cognitive_impairment": false
},
{
"location": "lobar",
"components": [
{
"value": 15.0,
"factor": "ich_volume_ml",
"points": 4,
"present": true
},
{
"value": 60,
"factor": "age",
"points": 2,
"present": true
},
{
"value": "lobar",
"factor": "location",
"points": 2,
"present": true
},
{
"value": 14,
"factor": "gcs",
"points": 2,
"present": true
},
{
"value": false,
"factor": "pre_ich_cognitive_impairment",
"points": 1,
"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.",
"age_years": 60,
"citation": {
"authors": "Rost NS, Smith EE, Chang Y, et al.",
"doi": "10.1161/STROKEAHA.107.512202",
"id": "rost-2008",
"pmid": "18556582",
"source": "Stroke. 2008;39(8):2304-2309",
"title": "Prediction of functional outcome in patients with primary intracerebral hemorrhage: the FUNC score"
},
"formula": "func_score",
"formula_expression": "FUNC = ich_volume + age + location + gcs + pre_ich_cognitive_impairment; volume <30 → 4, 30-60 → 2, >60 → 0; age <70 → 2, 70-79 → 1, >=80 → 0; lobar 2, deep 1, infratentorial 0; GCS >=9 → 2, <=8 → 0; pre-ICH cognitive impairment absent 1, present 0; max 11",
"max_score": 11,
"score": 11,
"func_band": "11",
"gcs": 14,
"ich_volume_ml": 15.0,
"pre_ich_cognitive_impairment": false
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | func_score |
formula_expression |
string | Exact expression used |
score |
integer | Total points 0-11 |
max_score |
integer | Always 11 |
func_band |
string | Rost 2008 band: 0-4, 5-7, 8, 9-10, or 11 |
gcs |
integer | Caller-assigned GCS total used for the ≥9 / ≤8 split |
age_years |
integer | Age used for the <70 / 70-79 / ≥80 bands |
ich_volume_ml |
number | ICH volume in mL used for the <30 / 30-60 / >60 bands |
location |
string | Caller-assigned location: lobar, deep, or infratentorial |
pre_ich_cognitive_impairment |
boolean | Caller-assigned pre-ICH cognitive impairment flag |
components |
array | Per-item points |
citation |
object | Rost 2008 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"location": "lobar",
"components": [
{
"value": 15.0,
"factor": "ich_volume_ml",
"points": 4,
"present": true
},
{
"value": 60,
"factor": "age",
"points": 2,
"present": true
},
{
"value": "lobar",
"factor": "location",
"points": 2,
"present": true
},
{
"value": 14,
"factor": "gcs",
"points": 2,
"present": true
},
{
"value": false,
"factor": "pre_ich_cognitive_impairment",
"points": 1,
"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.",
"age_years": 60,
"citation": {
"authors": "Rost NS, Smith EE, Chang Y, et al.",
"doi": "10.1161/STROKEAHA.107.512202",
"id": "rost-2008",
"pmid": "18556582",
"source": "Stroke. 2008;39(8):2304-2309",
"title": "Prediction of functional outcome in patients with primary intracerebral hemorrhage: the FUNC score"
},
"formula": "func_score",
"formula_expression": "FUNC = ich_volume + age + location + gcs + pre_ich_cognitive_impairment; volume <30 → 4, 30-60 → 2, >60 → 0; age <70 → 2, 70-79 → 1, >=80 → 0; lobar 2, deep 1, infratentorial 0; GCS >=9 → 2, <=8 → 0; pre-ICH cognitive impairment absent 1, present 0; max 11",
"max_score": 11,
"score": 11,
"func_band": "11",
"gcs": 14,
"ich_volume_ml": 15.0,
"pre_ich_cognitive_impairment": false
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_ich_volume |
ich_volume_ml must be a number from 0.1 to 300. 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_func_location |
location must be lobar, deep, or infratentorial (Rost 2008). Returned before settlement; you are not charged. |
| 400 | invalid_gcs_total |
gcs must be an integer from 3 to 15. 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
- ICH Score — Compute the Hemphill 2001 ICH Score from caller-assigned GCS, age, infratentorial origin, ICH volume, and IVH.
- ABC/2 — Compute the Kothari 1996 ABC/2 ellipsoid ICH volume as (a_cm × b_cm × c_cm) / 2 from caller-supplied diameters in centimeters.
- Glasgow Coma Scale — Compute the Glasgow Coma Scale as the sum of caller-assigned eye, verbal, and motor integers. The 1974 or 1976 edition is required.
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.
- 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.