Emergency · LIVE
Charlson comorbidity index (Charlson)
Charlson CCI
Sum the nineteen Charlson 1987 original comorbidity weights and return the published 1-year mortality group.
Markdown: /docs/charlson.md · Canonical: https://magentlab.com/docs/charlson
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Sum the nineteen Charlson 1987 original comorbidity weights and return the published 1-year mortality group.
When to use
When an agent needs the Charlson 1987 original weighted index from caller-assigned flags and must not invent Deyo, Quan, ICD mapping, or age points.
When not to use
- Not a medical device and not a diagnosis. magent does not assign comorbidities from a chart or ICD codes.
- This is the Charlson 1987 original weighted index only. It is not Deyo, not Quan, not ICD mapping, and not age-adjusted Charlson.
- The nineteen flags are independent. Overlapping pairs (for example both diabetes flags) are summed as published weights, not silently dropped.
- Age is not added. 1-year mortality groups follow Charlson 1987 (0 / 1–2 / 3–4 / ≥5) and are not a treatment order.
- LACE takes a caller-supplied Charlson integer; this tool computes that integer from flags.
Formula
CCI = myocardial_infarction 1 + congestive_heart_failure 1 + peripheral_vascular_disease 1 + cerebrovascular_disease 1 + dementia 1 + chronic_pulmonary_disease 1 + connective_tissue_disease 1 + peptic_ulcer_disease 1 + mild_liver_disease 1 + diabetes 1 + hemiplegia 2 + moderate_severe_renal_disease 2 + diabetes_end_organ 2 + any_tumor 2 + leukemia 2 + lymphoma 2 + moderate_severe_liver_disease 3 + metastatic_solid_tumor 6 + aids 6; Charlson 1987 original weighted index; max 37; 1-year mortality groups 0 / 1-2 / 3-4 / >=5; flags independent
Citation
- Authors
- Charlson ME, Pompei P, Ales KL, MacKenzie CR
- Source
- J Chronic Dis. 1987;40(5):373-383
Worked example
No comorbidities
Given:
aids=falseany_tumor=falsecerebrovascular_disease=falsechronic_pulmonary_disease=falsecongestive_heart_failure=falseconnective_tissue_disease=falsedementia=falsediabetes=falsediabetes_end_organ=falsehemiplegia=falseleukemia=falselymphoma=falsemetastatic_solid_tumor=falsemild_liver_disease=falsemoderate_severe_liver_disease=falsemoderate_severe_renal_disease=falsemyocardial_infarction=falsepeptic_ulcer_disease=falseperipheral_vascular_disease=false
- All 19 flags false
- score = 0
- charlson_band = score_0
Metastatic solid tumor only
Given:
aids=falseany_tumor=falsecerebrovascular_disease=falsechronic_pulmonary_disease=falsecongestive_heart_failure=falseconnective_tissue_disease=falsedementia=falsediabetes=falsediabetes_end_organ=falsehemiplegia=falseleukemia=falselymphoma=falsemetastatic_solid_tumor=truemild_liver_disease=falsemoderate_severe_liver_disease=falsemoderate_severe_renal_disease=falsemyocardial_infarction=falsepeptic_ulcer_disease=falseperipheral_vascular_disease=false
- metastatic_solid_tumor → 6
- score = 6
- charlson_band = score_ge_5
Also searched as
- Charlson comorbidity index
- CCI
- Charlson score
- Charlson 1987
- Charlson weighted index
- original Charlson index
- comorbidity index Charlson
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/charlson?myocardial_infarction=false&congestive_heart_failure=false&peripheral_vascular_disease=false&cerebrovascular_disease=false&dementia=false&chronic_pulmonary_disease=false&connective_tissue_disease=false&peptic_ulcer_disease=false&mild_liver_disease=false&diabetes=false&hemiplegia=false&moderate_severe_renal_disease=false&diabetes_end_organ=false&any_tumor=false&leukemia=false&lymphoma=false&moderate_severe_liver_disease=false&metastatic_solid_tumor=false&aids=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/charlson?myocardial_infarction=false&congestive_heart_failure=false&peripheral_vascular_disease=false&cerebrovascular_disease=false&dementia=false&chronic_pulmonary_disease=false&connective_tissue_disease=false&peptic_ulcer_disease=false&mild_liver_disease=false&diabetes=false&hemiplegia=false&moderate_severe_renal_disease=false&diabetes_end_organ=false&any_tumor=false&leukemia=false&lymphoma=false&moderate_severe_liver_disease=false&metastatic_solid_tumor=false&aids=false"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
myocardial_infarction |
boolean | required | Myocardial infarction as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose infarction. |
congestive_heart_failure |
boolean | required | Congestive heart failure as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose heart failure. |
peripheral_vascular_disease |
boolean | required | Peripheral vascular disease as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose vascular disease. |
cerebrovascular_disease |
boolean | required | Cerebrovascular disease as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose stroke or TIA. |
dementia |
boolean | required | Dementia as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose dementia. |
chronic_pulmonary_disease |
boolean | required | Chronic pulmonary disease as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose lung disease. |
connective_tissue_disease |
boolean | required | Connective tissue disease as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose connective-tissue disease. |
peptic_ulcer_disease |
boolean | required | Peptic ulcer disease as assigned by the caller (Charlson 1987). true scores 1. magent does not diagnose ulcer disease. |
mild_liver_disease |
boolean | required | Mild liver disease as assigned by the caller (Charlson 1987). true scores 1. magent does not grade liver disease. |
diabetes |
boolean | required | Diabetes without end-organ damage as assigned by the caller (Charlson 1987). true scores 1. Independent of diabetes_end_organ. magent does not diagnose diabetes. |
hemiplegia |
boolean | required | Hemiplegia as assigned by the caller (Charlson 1987). true scores 2. magent does not diagnose hemiplegia. |
moderate_severe_renal_disease |
boolean | required | Moderate or severe renal disease as assigned by the caller (Charlson 1987). true scores 2. magent does not grade kidney disease. |
diabetes_end_organ |
boolean | required | Diabetes with end-organ damage as assigned by the caller (Charlson 1987). true scores 2. Independent of diabetes. magent does not diagnose diabetes. |
any_tumor |
boolean | required | Any tumor (solid tumor without metastasis) as assigned by the caller (Charlson 1987). true scores 2. Independent of metastatic_solid_tumor. magent does not diagnose cancer. |
leukemia |
boolean | required | Leukemia as assigned by the caller (Charlson 1987). true scores 2. magent does not diagnose leukemia. |
lymphoma |
boolean | required | Lymphoma as assigned by the caller (Charlson 1987). true scores 2. magent does not diagnose lymphoma. |
moderate_severe_liver_disease |
boolean | required | Moderate or severe liver disease as assigned by the caller (Charlson 1987). true scores 3. Independent of mild_liver_disease. magent does not grade liver disease. |
metastatic_solid_tumor |
boolean | required | Metastatic solid tumor as assigned by the caller (Charlson 1987). true scores 6. Independent of any_tumor. magent does not diagnose cancer. |
aids |
boolean | required | AIDS as assigned by the caller (Charlson 1987). true scores 6. magent does not diagnose AIDS. |
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": [
{
"aids": "false",
"any_tumor": "false",
"cerebrovascular_disease": "false",
"chronic_pulmonary_disease": "false",
"congestive_heart_failure": "false",
"connective_tissue_disease": "false",
"dementia": "false",
"diabetes": "false",
"diabetes_end_organ": "false",
"hemiplegia": "false",
"leukemia": "false",
"lymphoma": "false",
"metastatic_solid_tumor": "false",
"mild_liver_disease": "false",
"moderate_severe_liver_disease": "false",
"moderate_severe_renal_disease": "false",
"myocardial_infarction": "false",
"peptic_ulcer_disease": "false",
"peripheral_vascular_disease": "false"
},
{
"aids": "false",
"any_tumor": "false",
"cerebrovascular_disease": "false",
"chronic_pulmonary_disease": "false",
"congestive_heart_failure": "false",
"connective_tissue_disease": "false",
"dementia": "false",
"diabetes": "false",
"diabetes_end_organ": "false",
"hemiplegia": "false",
"leukemia": "false",
"lymphoma": "false",
"metastatic_solid_tumor": "false",
"mild_liver_disease": "false",
"moderate_severe_liver_disease": "false",
"moderate_severe_renal_disease": "false",
"myocardial_infarction": "false",
"peptic_ulcer_disease": "false",
"peripheral_vascular_disease": "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/charlson",
"items": [
{
"components": [
{
"factor": "myocardial_infarction",
"points": 0,
"present": false
},
{
"factor": "congestive_heart_failure",
"points": 0,
"present": false
},
{
"factor": "peripheral_vascular_disease",
"points": 0,
"present": false
},
{
"factor": "cerebrovascular_disease",
"points": 0,
"present": false
},
{
"factor": "dementia",
"points": 0,
"present": false
},
{
"factor": "chronic_pulmonary_disease",
"points": 0,
"present": false
},
{
"factor": "connective_tissue_disease",
"points": 0,
"present": false
},
{
"factor": "peptic_ulcer_disease",
"points": 0,
"present": false
},
{
"factor": "mild_liver_disease",
"points": 0,
"present": false
},
{
"factor": "diabetes",
"points": 0,
"present": false
},
{
"factor": "hemiplegia",
"points": 0,
"present": false
},
{
"factor": "moderate_severe_renal_disease",
"points": 0,
"present": false
},
{
"factor": "diabetes_end_organ",
"points": 0,
"present": false
},
{
"factor": "any_tumor",
"points": 0,
"present": false
},
{
"factor": "leukemia",
"points": 0,
"present": false
},
{
"factor": "lymphoma",
"points": 0,
"present": false
},
{
"factor": "moderate_severe_liver_disease",
"points": 0,
"present": false
},
{
"factor": "metastatic_solid_tumor",
"points": 0,
"present": false
},
{
"factor": "aids",
"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": "Charlson ME, Pompei P, Ales KL, MacKenzie CR",
"doi": "10.1016/0021-9681(87)90171-8",
"id": "charlson-1987",
"pmid": "3558716",
"source": "J Chronic Dis. 1987;40(5):373-383",
"title": "A new method of classifying prognostic comorbidity in longitudinal studies: development and validation"
},
"formula": "charlson",
"formula_expression": "CCI = myocardial_infarction 1 + congestive_heart_failure 1 + peripheral_vascular_disease 1 + cerebrovascular_disease 1 + dementia 1 + chronic_pulmonary_disease 1 + connective_tissue_disease 1 + peptic_ulcer_disease 1 + mild_liver_disease 1 + diabetes 1 + hemiplegia 2 + moderate_severe_renal_disease 2 + diabetes_end_organ 2 + any_tumor 2 + leukemia 2 + lymphoma 2 + moderate_severe_liver_disease 3 + metastatic_solid_tumor 6 + aids 6; Charlson 1987 original weighted index; max 37; 1-year mortality groups 0 / 1-2 / 3-4 / >=5; flags independent",
"max_score": 37,
"score": 0,
"charlson_band": "score_0"
},
{
"components": [
{
"factor": "myocardial_infarction",
"points": 0,
"present": false
},
{
"factor": "congestive_heart_failure",
"points": 0,
"present": false
},
{
"factor": "peripheral_vascular_disease",
"points": 0,
"present": false
},
{
"factor": "cerebrovascular_disease",
"points": 0,
"present": false
},
{
"factor": "dementia",
"points": 0,
"present": false
},
{
"factor": "chronic_pulmonary_disease",
"points": 0,
"present": false
},
{
"factor": "connective_tissue_disease",
"points": 0,
"present": false
},
{
"factor": "peptic_ulcer_disease",
"points": 0,
"present": false
},
{
"factor": "mild_liver_disease",
"points": 0,
"present": false
},
{
"factor": "diabetes",
"points": 0,
"present": false
},
{
"factor": "hemiplegia",
"points": 0,
"present": false
},
{
"factor": "moderate_severe_renal_disease",
"points": 0,
"present": false
},
{
"factor": "diabetes_end_organ",
"points": 0,
"present": false
},
{
"factor": "any_tumor",
"points": 0,
"present": false
},
{
"factor": "leukemia",
"points": 0,
"present": false
},
{
"factor": "lymphoma",
"points": 0,
"present": false
},
{
"factor": "moderate_severe_liver_disease",
"points": 0,
"present": false
},
{
"factor": "metastatic_solid_tumor",
"points": 0,
"present": false
},
{
"factor": "aids",
"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": "Charlson ME, Pompei P, Ales KL, MacKenzie CR",
"doi": "10.1016/0021-9681(87)90171-8",
"id": "charlson-1987",
"pmid": "3558716",
"source": "J Chronic Dis. 1987;40(5):373-383",
"title": "A new method of classifying prognostic comorbidity in longitudinal studies: development and validation"
},
"formula": "charlson",
"formula_expression": "CCI = myocardial_infarction 1 + congestive_heart_failure 1 + peripheral_vascular_disease 1 + cerebrovascular_disease 1 + dementia 1 + chronic_pulmonary_disease 1 + connective_tissue_disease 1 + peptic_ulcer_disease 1 + mild_liver_disease 1 + diabetes 1 + hemiplegia 2 + moderate_severe_renal_disease 2 + diabetes_end_organ 2 + any_tumor 2 + leukemia 2 + lymphoma 2 + moderate_severe_liver_disease 3 + metastatic_solid_tumor 6 + aids 6; Charlson 1987 original weighted index; max 37; 1-year mortality groups 0 / 1-2 / 3-4 / >=5; flags independent",
"max_score": 37,
"score": 0,
"charlson_band": "score_0"
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | charlson |
formula_expression |
string | Exact expression used |
score |
integer | Charlson 1987 points 0-37 |
max_score |
integer | 37 |
charlson_band |
string | Charlson 1987 1-year mortality group: score_0 (0), score_1_2 (1-2), score_3_4 (3-4), or score_ge_5 (≥5). A group, not a diagnosis. |
components |
array | Per-flag points |
citation |
object | Charlson et al. J Chronic Dis 1987 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"factor": "myocardial_infarction",
"points": 0,
"present": false
},
{
"factor": "congestive_heart_failure",
"points": 0,
"present": false
},
{
"factor": "peripheral_vascular_disease",
"points": 0,
"present": false
},
{
"factor": "cerebrovascular_disease",
"points": 0,
"present": false
},
{
"factor": "dementia",
"points": 0,
"present": false
},
{
"factor": "chronic_pulmonary_disease",
"points": 0,
"present": false
},
{
"factor": "connective_tissue_disease",
"points": 0,
"present": false
},
{
"factor": "peptic_ulcer_disease",
"points": 0,
"present": false
},
{
"factor": "mild_liver_disease",
"points": 0,
"present": false
},
{
"factor": "diabetes",
"points": 0,
"present": false
},
{
"factor": "hemiplegia",
"points": 0,
"present": false
},
{
"factor": "moderate_severe_renal_disease",
"points": 0,
"present": false
},
{
"factor": "diabetes_end_organ",
"points": 0,
"present": false
},
{
"factor": "any_tumor",
"points": 0,
"present": false
},
{
"factor": "leukemia",
"points": 0,
"present": false
},
{
"factor": "lymphoma",
"points": 0,
"present": false
},
{
"factor": "moderate_severe_liver_disease",
"points": 0,
"present": false
},
{
"factor": "metastatic_solid_tumor",
"points": 0,
"present": false
},
{
"factor": "aids",
"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": "Charlson ME, Pompei P, Ales KL, MacKenzie CR",
"doi": "10.1016/0021-9681(87)90171-8",
"id": "charlson-1987",
"pmid": "3558716",
"source": "J Chronic Dis. 1987;40(5):373-383",
"title": "A new method of classifying prognostic comorbidity in longitudinal studies: development and validation"
},
"formula": "charlson",
"formula_expression": "CCI = myocardial_infarction 1 + congestive_heart_failure 1 + peripheral_vascular_disease 1 + cerebrovascular_disease 1 + dementia 1 + chronic_pulmonary_disease 1 + connective_tissue_disease 1 + peptic_ulcer_disease 1 + mild_liver_disease 1 + diabetes 1 + hemiplegia 2 + moderate_severe_renal_disease 2 + diabetes_end_organ 2 + any_tumor 2 + leukemia 2 + lymphoma 2 + moderate_severe_liver_disease 3 + metastatic_solid_tumor 6 + aids 6; Charlson 1987 original weighted index; max 37; 1-year mortality groups 0 / 1-2 / 3-4 / >=5; flags independent",
"max_score": 37,
"score": 0,
"charlson_band": "score_0"
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 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
- LACE — Sum van Walraven 2010 Table 3 LACE points from length of stay, acute (emergent) admission, a caller-supplied Charlson integer, and ED visits in the previous 6 months.
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.