Overview
- Category
- Health
- API mode
not_available- Processing
- client-side
- Privacy
- no-data-stored
Public descriptor
The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.
GET /api/v1/tools/cha2ds2-vasc-calculator
Execute availability
This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.
POST /api/v1/tools/cha2ds2-vasc-calculator/execute
Authentication is not issued during the preview. A bearer API key is planned for execution after launch.
Input schema
object object; additional properties are not accepted.
heart_failure· string · required-
Enter congestive heart failure. Accepted values:
no, yes. hypertension· string · required-
Enter hypertension. Accepted values:
no, yes. age· number · required- Enter age.
diabetes· string · required-
Enter diabetes. Accepted values:
no, yes. stroke· string · required-
Enter prior stroke/tia. Accepted values:
no, yes. vascular· string · required-
Enter vascular disease. Accepted values:
no, yes. sex· string · required-
Enter sex category used by score. Accepted values:
female, male.
{
"type": "object",
"properties": {
"heart_failure": {
"type": "string",
"description": "Enter congestive heart failure.",
"enum": [
"no",
"yes"
]
},
"hypertension": {
"type": "string",
"description": "Enter hypertension.",
"enum": [
"no",
"yes"
]
},
"age": {
"type": "number",
"description": "Enter age."
},
"diabetes": {
"type": "string",
"description": "Enter diabetes.",
"enum": [
"no",
"yes"
]
},
"stroke": {
"type": "string",
"description": "Enter prior stroke/tia.",
"enum": [
"no",
"yes"
]
},
"vascular": {
"type": "string",
"description": "Enter vascular disease.",
"enum": [
"no",
"yes"
]
},
"sex": {
"type": "string",
"description": "Enter sex category used by score.",
"enum": [
"female",
"male"
]
}
},
"required": [
"heart_failure",
"hypertension",
"age",
"diabetes",
"stroke",
"vascular",
"sex"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
score· number- CHA₂DS₂-VASc score produced by the tool.
components· array- Scored components produced by the tool.
interpretation· string- Interpretation boundary produced by the tool.
{
"type": "object",
"properties": {
"score": {
"type": "number",
"description": "CHA₂DS₂-VASc score produced by the tool."
},
"components": {
"type": "array",
"description": "Scored components produced by the tool."
},
"interpretation": {
"type": "string",
"description": "Interpretation boundary produced by the tool."
}
},
"additionalProperties": false
}
CHA2DS2-VASc Calculator worked example
The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.
curl -X POST "https://utilitypages.org/api/v1/tools/cha2ds2-vasc-calculator/execute" \
-H "Content-Type: application/json" \
-d '{
"heart_failure": "no",
"hypertension": "yes",
"age": 68,
"diabetes": "no",
"stroke": "no",
"vascular": "no",
"sex": "female"
}'
{
"ok": true,
"data": {
"slug": "cha2ds2-vasc-calculator",
"result": {
"values": {
"score": 3,
"components": [
{
"factor": "Hypertension",
"points": 1
},
{
"factor": "Age 65–74",
"points": 1
},
{
"factor": "Sex category point",
"points": 1
}
],
"interpretation": "Clinical interpretation depends on validated context and current guidance."
},
"display": {
"display": "3"
},
"warnings": [],
"assumptions": [],
"steps": []
}
},
"meta": [],
"request_id": "req_example_123"
}
Errors
api_not_launched· 503- Returned by the current launch gate for every execute request.
invalid_json· 400- Returned when an enabled execute request does not contain valid JSON.
validation_failed· 422- Returned when a request does not satisfy the input schema.
browser_interaction_required· 422- Returned for browser capability tools instead of inventing a server-side result.
tool_not_found· 404- Returned when a requested descriptor slug does not exist.
execution_failed· 503- Returned when an enabled server-side execution cannot complete.