ACS · LIVE
PRECISE-DAPT (Costa 2017)
PRECISE-DAPT
Sum Costa 2017 Figure 1 PRECISE-DAPT nomogram points from age, caller-assigned creatinine clearance, hemoglobin, white-blood-cell count, and previous spontaneous bleeding, and return whether the total is in the published high-bleeding-risk stratum (score >=25).
Markdown: /docs/precise-dapt.md · Canonical: https://magentlab.com/docs/precise-dapt
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Sum Costa 2017 Figure 1 PRECISE-DAPT nomogram points from age, caller-assigned creatinine clearance, hemoglobin, white-blood-cell count, and previous spontaneous bleeding, and return whether the total is in the published high-bleeding-risk stratum (score >=25).
When to use
When an agent needs the published Costa 2017 PRECISE-DAPT integer after PCI and must not invent a dual antiplatelet duration, Yeh DAPT points, or extra cutoffs besides score >=25.
When not to use
- Not a medical device and not a prescription for dual antiplatelet therapy duration.
- Not a diagnosis. magent does not assay hemoglobin or WBC, does not compute Cockcroft-Gault, and does not take a bleeding history; creatinine clearance and previous spontaneous bleeding are caller-assigned.
- Not the Yeh 2016 DAPT score. PRECISE-DAPT is the Costa 2017 five-item out-of-hospital bleeding nomogram at the time of stenting.
- Table 1 truncations: age 50-90, hemoglobin 10-12 g/dL, CrCl capped at 100 mL/min, WBC 5-20 x10^3/uL. Values beyond those bounds use the truncated nomogram ends.
- high_bleeding_risk is true only when score >=25, the paper's high-risk stratum used to compare DAPT duration. This tool does not return quartile labels or TIMI bleeding percents.
Formula
PRECISE-DAPT = age_points + crcl_points + hemoglobin_points + wbc_points + previous_bleed_points (Costa 2017 Figure 1 nomogram; Table 1 truncated linear terms); age years truncated 50-90 (0 at <=50, 19 at >=90); caller-assigned CrCl mL/min truncated 0-100 (0 at >=100, 25 at 0; magent does not compute Cockcroft-Gault); hemoglobin g/dL truncated 10-12 (0 at >=12, 15 at <=10); WBC x10^3 cells/uL truncated 5-20 (0 at <=5, 15 at >=20); previous spontaneous bleeding 26 if true else 0; integer score is the rounded sum (0-100); high_bleeding_risk iff score >=25
Citation
- Authors
- Costa F, van Klaveren D, James S, et al
- Source
- Lancet. 2017;389(10073):1025-1034
Worked example
Lowest published nomogram anchors (score 0)
Given:
age=50crcl_ml_min=100hemoglobin_g_dl=12previous_spontaneous_bleeding=falsewbc_k_ul=5
- Age 50 is the lower truncation → 0; CrCl 100 mL/min is the upper truncation → 0; hemoglobin 12 g/dL → 0; WBC 5 → 0; no previous spontaneous bleeding → 0
- Rounded sum = 0 (max 100); high_bleeding_risk false
CrCl 0 mL/min only (score 25, high-risk cutoff)
Given:
age=50crcl_ml_min=0hemoglobin_g_dl=12previous_spontaneous_bleeding=falsewbc_k_ul=5
- Protective age, hemoglobin, WBC, and no prior bleed → 0; CrCl 0 → 25
- Rounded sum = 25 (max 100); high_bleeding_risk true
Also searched as
- PRECISE-DAPT
- PRECISE-DAPT score
- Costa 2017 bleeding score
- predicting bleeding complications DAPT
- stent DAPT bleeding score
- out-of-hospital DAPT bleeding
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/precise_dapt?age=50&crcl_ml_min=100&hemoglobin_g_dl=12&wbc_k_ul=5&previous_spontaneous_bleeding=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/precise_dapt?age=50&crcl_ml_min=100&hemoglobin_g_dl=12&wbc_k_ul=5&previous_spontaneous_bleeding=false"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
age |
integer | required | Age in years (18-120). Costa 2017 Table 1 truncates below 50 and above 90. Figure 1: <=50 scores 0; >=90 scores 19; linear between. Age 18 and age 50 both score 0. |
crcl_ml_min |
number | required | Creatinine clearance in mL/min (0-300) as assigned by the caller. Costa 2017 Figure 1 uses CrCl, not raw creatinine. magent does not compute Cockcroft-Gault. Truncated above 100: >=100 scores 0; 0 mL/min scores 25; linear between. |
hemoglobin_g_dl |
number | required | Hemoglobin in g/dL (4-22). Table 1 truncates above 12 and below 10. Figure 1: >=12.0 scores 0; <=10.0 scores 15; linear between. magent does not assay hemoglobin. |
wbc_k_ul |
number | required | White-blood-cell count in x10^3 cells per uL, same as x10^9/L (0.1-100). Table 1 truncates below 5 and above 20. Figure 1: <=5 scores 0; >=20 scores 15; linear between. magent does not assay WBC. |
previous_spontaneous_bleeding |
boolean | required | Previous spontaneous bleeding as assigned by the caller (Costa 2017). true scores 26; false scores 0. magent does not take a bleeding history. |
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",
"crcl_ml_min": "100",
"hemoglobin_g_dl": "12",
"previous_spontaneous_bleeding": "false",
"wbc_k_ul": "5"
},
{
"age": "50",
"crcl_ml_min": "100",
"hemoglobin_g_dl": "12",
"previous_spontaneous_bleeding": "false",
"wbc_k_ul": "5"
}
]
}
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/precise_dapt",
"items": [
{
"components": [
{
"value": 50,
"factor": "age",
"points": 0.0,
"present": false
},
{
"value": 100.0,
"factor": "crcl_ml_min",
"points": 0.0,
"present": false
},
{
"value": 12.0,
"factor": "hemoglobin_g_dl",
"points": 0.0,
"present": false
},
{
"value": 5.0,
"factor": "wbc_k_ul",
"points": 0.0,
"present": false
},
{
"factor": "previous_spontaneous_bleeding",
"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.",
"age_years": 50,
"citation": {
"authors": "Costa F, van Klaveren D, James S, et al",
"doi": "10.1016/S0140-6736(17)30397-5",
"id": "costa-2017",
"pmid": "28290994",
"source": "Lancet. 2017;389(10073):1025-1034",
"title": "Derivation and validation of the predicting bleeding complications in patients undergoing stent implantation and subsequent dual antiplatelet therapy (PRECISE-DAPT) score: a pooled analysis of individual-patient datasets from clinical trials"
},
"formula": "precise_dapt",
"formula_expression": "PRECISE-DAPT = age_points + crcl_points + hemoglobin_points + wbc_points + previous_bleed_points (Costa 2017 Figure 1 nomogram; Table 1 truncated linear terms); age years truncated 50-90 (0 at <=50, 19 at >=90); caller-assigned CrCl mL/min truncated 0-100 (0 at >=100, 25 at 0; magent does not compute Cockcroft-Gault); hemoglobin g/dL truncated 10-12 (0 at >=12, 15 at <=10); WBC x10^3 cells/uL truncated 5-20 (0 at <=5, 15 at >=20); previous spontaneous bleeding 26 if true else 0; integer score is the rounded sum (0-100); high_bleeding_risk iff score >=25",
"max_score": 100,
"score": 0,
"high_bleeding_risk": false,
"hemoglobin_g_dl": 12.0,
"wbc_k_ul": 5.0,
"crcl_ml_min": 100.0,
"previous_spontaneous_bleeding": false
},
{
"components": [
{
"value": 50,
"factor": "age",
"points": 0.0,
"present": false
},
{
"value": 100.0,
"factor": "crcl_ml_min",
"points": 0.0,
"present": false
},
{
"value": 12.0,
"factor": "hemoglobin_g_dl",
"points": 0.0,
"present": false
},
{
"value": 5.0,
"factor": "wbc_k_ul",
"points": 0.0,
"present": false
},
{
"factor": "previous_spontaneous_bleeding",
"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.",
"age_years": 50,
"citation": {
"authors": "Costa F, van Klaveren D, James S, et al",
"doi": "10.1016/S0140-6736(17)30397-5",
"id": "costa-2017",
"pmid": "28290994",
"source": "Lancet. 2017;389(10073):1025-1034",
"title": "Derivation and validation of the predicting bleeding complications in patients undergoing stent implantation and subsequent dual antiplatelet therapy (PRECISE-DAPT) score: a pooled analysis of individual-patient datasets from clinical trials"
},
"formula": "precise_dapt",
"formula_expression": "PRECISE-DAPT = age_points + crcl_points + hemoglobin_points + wbc_points + previous_bleed_points (Costa 2017 Figure 1 nomogram; Table 1 truncated linear terms); age years truncated 50-90 (0 at <=50, 19 at >=90); caller-assigned CrCl mL/min truncated 0-100 (0 at >=100, 25 at 0; magent does not compute Cockcroft-Gault); hemoglobin g/dL truncated 10-12 (0 at >=12, 15 at <=10); WBC x10^3 cells/uL truncated 5-20 (0 at <=5, 15 at >=20); previous spontaneous bleeding 26 if true else 0; integer score is the rounded sum (0-100); high_bleeding_risk iff score >=25",
"max_score": 100,
"score": 0,
"high_bleeding_risk": false,
"hemoglobin_g_dl": 12.0,
"wbc_k_ul": 5.0,
"crcl_ml_min": 100.0,
"previous_spontaneous_bleeding": false
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | precise_dapt |
formula_expression |
string | Exact expression used |
score |
integer | Rounded Costa 2017 Figure 1 nomogram total (0-100) |
max_score |
integer | 100 |
high_bleeding_risk |
boolean | true iff score >=25, the Costa 2017 high-risk stratum used to compare DAPT duration. No other cutoffs. |
age_years |
integer | Age used |
crcl_ml_min |
number | Caller-assigned creatinine clearance, mL/min |
hemoglobin_g_dl |
number | Hemoglobin used, g/dL |
wbc_k_ul |
number | WBC used, x10^3 cells per uL |
previous_spontaneous_bleeding |
boolean | Caller-assigned previous spontaneous bleeding |
components |
array | Per-factor Figure 1 points |
citation |
object | Costa et al. Lancet 2017 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"value": 50,
"factor": "age",
"points": 0.0,
"present": false
},
{
"value": 100.0,
"factor": "crcl_ml_min",
"points": 0.0,
"present": false
},
{
"value": 12.0,
"factor": "hemoglobin_g_dl",
"points": 0.0,
"present": false
},
{
"value": 5.0,
"factor": "wbc_k_ul",
"points": 0.0,
"present": false
},
{
"factor": "previous_spontaneous_bleeding",
"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.",
"age_years": 50,
"citation": {
"authors": "Costa F, van Klaveren D, James S, et al",
"doi": "10.1016/S0140-6736(17)30397-5",
"id": "costa-2017",
"pmid": "28290994",
"source": "Lancet. 2017;389(10073):1025-1034",
"title": "Derivation and validation of the predicting bleeding complications in patients undergoing stent implantation and subsequent dual antiplatelet therapy (PRECISE-DAPT) score: a pooled analysis of individual-patient datasets from clinical trials"
},
"formula": "precise_dapt",
"formula_expression": "PRECISE-DAPT = age_points + crcl_points + hemoglobin_points + wbc_points + previous_bleed_points (Costa 2017 Figure 1 nomogram; Table 1 truncated linear terms); age years truncated 50-90 (0 at <=50, 19 at >=90); caller-assigned CrCl mL/min truncated 0-100 (0 at >=100, 25 at 0; magent does not compute Cockcroft-Gault); hemoglobin g/dL truncated 10-12 (0 at >=12, 15 at <=10); WBC x10^3 cells/uL truncated 5-20 (0 at <=5, 15 at >=20); previous spontaneous bleeding 26 if true else 0; integer score is the rounded sum (0-100); high_bleeding_risk iff score >=25",
"max_score": 100,
"score": 0,
"high_bleeding_risk": false,
"hemoglobin_g_dl": 12.0,
"wbc_k_ul": 5.0,
"crcl_ml_min": 100.0,
"previous_spontaneous_bleeding": false
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_precise_dapt |
PRECISE-DAPT needs Costa 2017 age, creatinine clearance, hemoglobin, WBC, and prior spontaneous bleeding in published ranges. 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
- DAPT score — Sum the Yeh 2016 DAPT prediction rule after PCI from exclusive age bands and eight caller-assigned flags and return the published high/low band.
- CRUSADE bleeding score — Compute the CRUSADE in-hospital major bleeding score from hematocrit, caller-assigned Cockcroft–Gault creatinine clearance, heart rate, sex, signs of CHF, prior vascular disease, diabetes, and systolic BP (Subherwal 2009 Table 4).
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.