# ARC-HBR high bleeding risk

ARC-HBR

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/arc_hbr`
HTML: https://magentlab.com/docs/arc-hbr
Markdown: https://magentlab.com/docs/arc-hbr.md

Not a medical device. Not a diagnosis, dose, or listing recommendation.

## What it computes

Apply Urban 2019 Academic Research Consortium high bleeding risk (ARC-HBR) Table 3 and return whether caller-assigned major and minor criteria meet high bleeding risk at PCI (≥1 major or ≥2 minor).

## When to use

When an agent has caller-assigned ARC-HBR Table 3 flags at PCI and needs the published binary high-bleeding-risk result, not a weighted point score, not a DAPT duration order, and not HAS-BLED or CRUSADE.

## When not to use

- Not a medical device. Not a bleeding diagnosis. magent does not assay labs, measure eGFR or hemoglobin, count platelets, or read NIHSS.
- Binary HBR per Urban 2019 Table 3 (≥1 major or ≥2 minor). The paper states data are not available for a weighted point score; magent does not invent 0.5-point scores or BARC 3 or 5 percentages.
- Anticipated long-term oral anticoagulation excludes vascular-protection doses (paper footnote); that exclusion is a limitation, not a separate param.
- Mild anemia is caller-assigned (hemoglobin 11–12.9 g/dL in men or 11–11.9 g/dL in women). magent does not take sex or hemoglobin numbers.
- Major and minor pairs cannot both be true for CKD, anemia, spontaneous bleeding, or ischemic stroke (HTTP 400 invalid_arc_hbr).
- Not a DAPT duration order and not HAS-BLED or CRUSADE.

## Formula

```
high_bleeding_risk iff major_count >= 1 or minor_count >= 2 (Urban 2019 Table 3). Binary HBR; not a weighted point score. Majors: anticipated_long_term_oac, severe_or_esrd_ckd, hemoglobin_lt_11, spontaneous_bleed_major, thrombocytopenia_lt_100, chronic_bleeding_diathesis, cirrhosis_with_portal_hypertension, active_malignancy_12mo, previous_spontaneous_ich, traumatic_ich_12mo, bavm, moderate_severe_ischemic_stroke_6mo, nondeferrable_major_surgery_dapt, recent_major_surgery_or_trauma_30d. Minors: age_ge_75, moderate_ckd, mild_anemia, spontaneous_bleed_minor, long_term_nsaid_or_steroid, any_ischemic_stroke_not_major
```

## Citation

[Defining High Bleeding Risk in Patients Undergoing Percutaneous Coronary Intervention: A Consensus Document From the Academic Research Consortium for High Bleeding Risk](https://doi.org/10.1161/CIRCULATIONAHA.119.040167)
Urban P, Mehran R, Colleran R, Angiolillo DJ, Byrne RA, Capodanno D, Cuisset T, Cutlip D, Eerdmans P, Eikelboom J, Farb A, Gibson CM, Gregson J, Haude M, James SK, Kim HS, Kimura T, Konishi A, Laschinger J, Leon MB, Magee PFA, Price MJ, Salett E, Schulz C, Valgimigli M, Varenne O, Yeh RW, Krucoff MW
Circulation. 2019;140(3):240-261
DOI: [10.1161/CIRCULATIONAHA.119.040167](https://doi.org/10.1161/CIRCULATIONAHA.119.040167)

## Worked example

### Age ≥75 only is one minor, not HBR

Given: `active_malignancy_12mo=false, age_ge_75=true, anticipated_long_term_oac=false, any_ischemic_stroke_not_major=false, bavm=false, chronic_bleeding_diathesis=false, cirrhosis_with_portal_hypertension=false, hemoglobin_lt_11=false, long_term_nsaid_or_steroid=false, mild_anemia=false, moderate_ckd=false, moderate_severe_ischemic_stroke_6mo=false, nondeferrable_major_surgery_dapt=false, previous_spontaneous_ich=false, recent_major_surgery_or_trauma_30d=false, severe_or_esrd_ckd=false, spontaneous_bleed_major=false, spontaneous_bleed_minor=false, thrombocytopenia_lt_100=false, traumatic_ich_12mo=false`

1. age_ge_75 is true (Urban 2019 Table 3 minor)
2. No major criterion is present; minor_count is 1
3. high_bleeding_risk is false (HBR requires ≥1 major or ≥2 minor)


### Two minor criteria meet HBR

Given: `active_malignancy_12mo=false, age_ge_75=true, anticipated_long_term_oac=false, any_ischemic_stroke_not_major=false, bavm=false, chronic_bleeding_diathesis=false, cirrhosis_with_portal_hypertension=false, hemoglobin_lt_11=false, long_term_nsaid_or_steroid=true, mild_anemia=false, moderate_ckd=false, moderate_severe_ischemic_stroke_6mo=false, nondeferrable_major_surgery_dapt=false, previous_spontaneous_ich=false, recent_major_surgery_or_trauma_30d=false, severe_or_esrd_ckd=false, spontaneous_bleed_major=false, spontaneous_bleed_minor=false, thrombocytopenia_lt_100=false, traumatic_ich_12mo=false`

1. age_ge_75 and long_term_nsaid_or_steroid are true
2. major_count 0 and minor_count 2
3. high_bleeding_risk is true


### One major criterion meets HBR

Given: `active_malignancy_12mo=false, age_ge_75=false, anticipated_long_term_oac=true, any_ischemic_stroke_not_major=false, bavm=false, chronic_bleeding_diathesis=false, cirrhosis_with_portal_hypertension=false, hemoglobin_lt_11=false, long_term_nsaid_or_steroid=false, mild_anemia=false, moderate_ckd=false, moderate_severe_ischemic_stroke_6mo=false, nondeferrable_major_surgery_dapt=false, previous_spontaneous_ich=false, recent_major_surgery_or_trauma_30d=false, severe_or_esrd_ckd=false, spontaneous_bleed_major=false, spontaneous_bleed_minor=false, thrombocytopenia_lt_100=false, traumatic_ich_12mo=false`

1. anticipated_long_term_oac is true (Urban 2019 Table 3 major)
2. major_count 1 and minor_count 0
3. high_bleeding_risk is true


### One major plus two minors is HBR

Given: `active_malignancy_12mo=false, age_ge_75=true, anticipated_long_term_oac=true, any_ischemic_stroke_not_major=false, bavm=false, chronic_bleeding_diathesis=false, cirrhosis_with_portal_hypertension=false, hemoglobin_lt_11=false, long_term_nsaid_or_steroid=true, mild_anemia=false, moderate_ckd=false, moderate_severe_ischemic_stroke_6mo=false, nondeferrable_major_surgery_dapt=false, previous_spontaneous_ich=false, recent_major_surgery_or_trauma_30d=false, severe_or_esrd_ckd=false, spontaneous_bleed_major=false, spontaneous_bleed_minor=false, thrombocytopenia_lt_100=false, traumatic_ich_12mo=false`

1. anticipated_long_term_oac plus age_ge_75 and long_term_nsaid_or_steroid
2. major_count 1 and minor_count 2
3. high_bleeding_risk is true


## Also searched as

- ARC-HBR
- Academic Research Consortium high bleeding risk
- Urban 2019 high bleeding risk
- PCI bleeding risk criteria
- ARC high bleeding risk
- high bleeding risk PCI
- HBR consensus PCI

## Parameters

- `anticipated_long_term_oac` (boolean, required): Anticipated use of long-term oral anticoagulation as assigned by the caller (Urban 2019 Table 3 major). Paper footnote excludes vascular-protection doses; that exclusion is a limitation, not a separate param. true or false. magent does not prescribe anticoagulation.
- `severe_or_esrd_ckd` (boolean, required): Severe or end-stage CKD (eGFR <30 mL/min) as assigned by the caller (Urban 2019 Table 3 major). Mutually exclusive with moderate_ckd. true or false. magent does not assay creatinine or compute eGFR.
- `hemoglobin_lt_11` (boolean, required): Hemoglobin <11 g/dL as assigned by the caller (Urban 2019 Table 3 major). Mutually exclusive with mild_anemia. true or false. magent does not assay hemoglobin.
- `spontaneous_bleed_major` (boolean, required): Spontaneous bleeding requiring hospitalization or transfusion in the past 6 months, or recurrent at any time, as assigned by the caller (Urban 2019 Table 3 major). Mutually exclusive with spontaneous_bleed_minor. true or false.
- `thrombocytopenia_lt_100` (boolean, required): Baseline platelet count <100×10^9/L before PCI as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not assay platelets.
- `chronic_bleeding_diathesis` (boolean, required): Chronic bleeding diathesis as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not diagnose a coagulopathy.
- `cirrhosis_with_portal_hypertension` (boolean, required): Liver cirrhosis with portal hypertension as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not diagnose cirrhosis.
- `active_malignancy_12mo` (boolean, required): Active malignancy (excluding nonmelanoma skin cancer) as assigned by the caller: diagnosis within 12 months and/or ongoing treatment (Urban 2019 Table 3 major). true or false. magent does not diagnose cancer.
- `previous_spontaneous_ich` (boolean, required): Previous spontaneous intracranial hemorrhage at any time as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not read imaging.
- `traumatic_ich_12mo` (boolean, required): Previous traumatic intracranial hemorrhage within the past 12 months as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not read imaging.
- `bavm` (boolean, required): Brain arteriovenous malformation as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not read imaging.
- `moderate_severe_ischemic_stroke_6mo` (boolean, required): Moderate or severe ischemic stroke (NIHSS ≥5 on presentation) within the past 6 months as assigned by the caller (Urban 2019 Table 3 major). Mutually exclusive with any_ischemic_stroke_not_major. true or false. magent does not assign NIHSS.
- `nondeferrable_major_surgery_dapt` (boolean, required): Nondeferrable major surgery on DAPT as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not schedule surgery.
- `recent_major_surgery_or_trauma_30d` (boolean, required): Recent major surgery or major trauma within 30 days before PCI as assigned by the caller (Urban 2019 Table 3 major). true or false. magent does not date the event.
- `age_ge_75` (boolean, required): Age ≥75 years as assigned by the caller (Urban 2019 Table 3 minor). true or false. magent does not take a numeric age.
- `moderate_ckd` (boolean, required): Moderate CKD (eGFR 30–59 mL/min) as assigned by the caller (Urban 2019 Table 3 minor). Mutually exclusive with severe_or_esrd_ckd. true or false. magent does not assay creatinine or compute eGFR.
- `mild_anemia` (boolean, required): Mild anemia (hemoglobin 11–12.9 g/dL in men or 11–11.9 g/dL in women) as assigned by the caller (Urban 2019 Table 3 minor). Mutually exclusive with hemoglobin_lt_11. true or false. magent does not take sex or hemoglobin numbers.
- `spontaneous_bleed_minor` (boolean, required): Spontaneous bleeding requiring hospitalization or transfusion within the past 12 months that does not meet the major criterion, as assigned by the caller (Urban 2019 Table 3 minor). Mutually exclusive with spontaneous_bleed_major. true or false.
- `long_term_nsaid_or_steroid` (boolean, required): Long-term oral NSAID or steroid use (planned daily intake ≥4 days per week) as assigned by the caller (Urban 2019 Table 3 minor). true or false. magent does not prescribe NSAIDs or steroids.
- `any_ischemic_stroke_not_major` (boolean, required): Any ischemic stroke at any time that does not meet the major stroke criterion, as assigned by the caller (Urban 2019 Table 3 minor). Mutually exclusive with moderate_severe_ischemic_stroke_6mo. true or false. magent does not assign NIHSS.

## 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.

Method: `POST /api/calc/arc_hbr`
Max items: 25
Price: unit_amount + extra_item_amount * (n - 1) (unit 5000 atomic, extra 2000 atomic)
Status: PREVIEW

- 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:

```json
{
  "items": [
    {
      "active_malignancy_12mo": "false",
      "age_ge_75": "true",
      "anticipated_long_term_oac": "false",
      "any_ischemic_stroke_not_major": "false",
      "bavm": "false",
      "chronic_bleeding_diathesis": "false",
      "cirrhosis_with_portal_hypertension": "false",
      "hemoglobin_lt_11": "false",
      "long_term_nsaid_or_steroid": "false",
      "mild_anemia": "false",
      "moderate_ckd": "false",
      "moderate_severe_ischemic_stroke_6mo": "false",
      "nondeferrable_major_surgery_dapt": "false",
      "previous_spontaneous_ich": "false",
      "recent_major_surgery_or_trauma_30d": "false",
      "severe_or_esrd_ckd": "false",
      "spontaneous_bleed_major": "false",
      "spontaneous_bleed_minor": "false",
      "thrombocytopenia_lt_100": "false",
      "traumatic_ich_12mo": "false"
    },
    {
      "active_malignancy_12mo": "false",
      "age_ge_75": "true",
      "anticipated_long_term_oac": "false",
      "any_ischemic_stroke_not_major": "false",
      "bavm": "false",
      "chronic_bleeding_diathesis": "false",
      "cirrhosis_with_portal_hypertension": "false",
      "hemoglobin_lt_11": "false",
      "long_term_nsaid_or_steroid": "false",
      "mild_anemia": "false",
      "moderate_ckd": "false",
      "moderate_severe_ischemic_stroke_6mo": "false",
      "nondeferrable_major_surgery_dapt": "false",
      "previous_spontaneous_ich": "false",
      "recent_major_surgery_or_trauma_30d": "false",
      "severe_or_esrd_ckd": "false",
      "spontaneous_bleed_major": "false",
      "spontaneous_bleed_minor": "false",
      "thrombocytopenia_lt_100": "false",
      "traumatic_ich_12mo": "false"
    }
  ]
}
```

Human paywall (two-item fixture): https://api.magentlab.com/paywall/bulk/arc-hbr

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/arc_hbr",
  "items": [
    {
      "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": "Urban P, Mehran R, Colleran R, Angiolillo DJ, Byrne RA, Capodanno D, Cuisset T, Cutlip D, Eerdmans P, Eikelboom J, Farb A, Gibson CM, Gregson J, Haude M, James SK, Kim HS, Kimura T, Konishi A, Laschinger J, Leon MB, Magee PFA, Price MJ, Salett E, Schulz C, Valgimigli M, Varenne O, Yeh RW, Krucoff MW",
        "doi": "10.1161/CIRCULATIONAHA.119.040167",
        "id": "urban-2019",
        "pmid": "31116032",
        "source": "Circulation. 2019;140(3):240-261",
        "title": "Defining High Bleeding Risk in Patients Undergoing Percutaneous Coronary Intervention: A Consensus Document From the Academic Research Consortium for High Bleeding Risk"
      },
      "formula": "arc_hbr",
      "formula_expression": "high_bleeding_risk iff major_count >= 1 or minor_count >= 2 (Urban 2019 Table 3). Binary HBR; not a weighted point score. Majors: anticipated_long_term_oac, severe_or_esrd_ckd, hemoglobin_lt_11, spontaneous_bleed_major, thrombocytopenia_lt_100, chronic_bleeding_diathesis, cirrhosis_with_portal_hypertension, active_malignancy_12mo, previous_spontaneous_ich, traumatic_ich_12mo, bavm, moderate_severe_ischemic_stroke_6mo, nondeferrable_major_surgery_dapt, recent_major_surgery_or_trauma_30d. Minors: age_ge_75, moderate_ckd, mild_anemia, spontaneous_bleed_minor, long_term_nsaid_or_steroid, any_ischemic_stroke_not_major",
      "criteria": [
        {
          "factor": "anticipated_long_term_oac",
          "met": false
        },
        {
          "factor": "severe_or_esrd_ckd",
          "met": false
        },
        {
          "factor": "hemoglobin_lt_11",
          "met": false
        },
        {
          "factor": "spontaneous_bleed_major",
          "met": false
        },
        {
          "factor": "thrombocytopenia_lt_100",
          "met": false
        },
        {
          "factor": "chronic_bleeding_diathesis",
          "met": false
        },
        {
          "factor": "cirrhosis_with_portal_hypertension",
          "met": false
        },
        {
          "factor": "active_malignancy_12mo",
          "met": false
        },
        {
          "factor": "previous_spontaneous_ich",
          "met": false
        },
        {
          "factor": "traumatic_ich_12mo",
          "met": false
        },
        {
          "factor": "bavm",
          "met": false
        },
        {
          "factor": "moderate_severe_ischemic_stroke_6mo",
          "met": false
        },
        {
          "factor": "nondeferrable_major_surgery_dapt",
          "met": false
        },
        {
          "factor": "recent_major_surgery_or_trauma_30d",
          "met": false
        },
        {
          "factor": "age_ge_75",
          "met": true
        },
        {
          "factor": "moderate_ckd",
          "met": false
        },
        {
          "factor": "mild_anemia",
          "met": false
        },
        {
          "factor": "spontaneous_bleed_minor",
          "met": false
        },
        {
          "factor": "long_term_nsaid_or_steroid",
          "met": false
        },
        {
          "factor": "any_ischemic_stroke_not_major",
          "met": false
        }
      ],
      "high_bleeding_risk": false,
      "major_count": 0,
      "minor_count": 1
    },
    {
      "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": "Urban P, Mehran R, Colleran R, Angiolillo DJ, Byrne RA, Capodanno D, Cuisset T, Cutlip D, Eerdmans P, Eikelboom J, Farb A, Gibson CM, Gregson J, Haude M, James SK, Kim HS, Kimura T, Konishi A, Laschinger J, Leon MB, Magee PFA, Price MJ, Salett E, Schulz C, Valgimigli M, Varenne O, Yeh RW, Krucoff MW",
        "doi": "10.1161/CIRCULATIONAHA.119.040167",
        "id": "urban-2019",
        "pmid": "31116032",
        "source": "Circulation. 2019;140(3):240-261",
        "title": "Defining High Bleeding Risk in Patients Undergoing Percutaneous Coronary Intervention: A Consensus Document From the Academic Research Consortium for High Bleeding Risk"
      },
      "formula": "arc_hbr",
      "formula_expression": "high_bleeding_risk iff major_count >= 1 or minor_count >= 2 (Urban 2019 Table 3). Binary HBR; not a weighted point score. Majors: anticipated_long_term_oac, severe_or_esrd_ckd, hemoglobin_lt_11, spontaneous_bleed_major, thrombocytopenia_lt_100, chronic_bleeding_diathesis, cirrhosis_with_portal_hypertension, active_malignancy_12mo, previous_spontaneous_ich, traumatic_ich_12mo, bavm, moderate_severe_ischemic_stroke_6mo, nondeferrable_major_surgery_dapt, recent_major_surgery_or_trauma_30d. Minors: age_ge_75, moderate_ckd, mild_anemia, spontaneous_bleed_minor, long_term_nsaid_or_steroid, any_ischemic_stroke_not_major",
      "criteria": [
        {
          "factor": "anticipated_long_term_oac",
          "met": false
        },
        {
          "factor": "severe_or_esrd_ckd",
          "met": false
        },
        {
          "factor": "hemoglobin_lt_11",
          "met": false
        },
        {
          "factor": "spontaneous_bleed_major",
          "met": false
        },
        {
          "factor": "thrombocytopenia_lt_100",
          "met": false
        },
        {
          "factor": "chronic_bleeding_diathesis",
          "met": false
        },
        {
          "factor": "cirrhosis_with_portal_hypertension",
          "met": false
        },
        {
          "factor": "active_malignancy_12mo",
          "met": false
        },
        {
          "factor": "previous_spontaneous_ich",
          "met": false
        },
        {
          "factor": "traumatic_ich_12mo",
          "met": false
        },
        {
          "factor": "bavm",
          "met": false
        },
        {
          "factor": "moderate_severe_ischemic_stroke_6mo",
          "met": false
        },
        {
          "factor": "nondeferrable_major_surgery_dapt",
          "met": false
        },
        {
          "factor": "recent_major_surgery_or_trauma_30d",
          "met": false
        },
        {
          "factor": "age_ge_75",
          "met": true
        },
        {
          "factor": "moderate_ckd",
          "met": false
        },
        {
          "factor": "mild_anemia",
          "met": false
        },
        {
          "factor": "spontaneous_bleed_minor",
          "met": false
        },
        {
          "factor": "long_term_nsaid_or_steroid",
          "met": false
        },
        {
          "factor": "any_ischemic_stroke_not_major",
          "met": false
        }
      ],
      "high_bleeding_risk": false,
      "major_count": 0,
      "minor_count": 1
    }
  ]
}
```

## Response fields

- `formula` (string): arc_hbr
- `formula_expression` (string): Urban 2019 Table 3 binary ARC-HBR rule (≥1 major or ≥2 minor)
- `high_bleeding_risk` (boolean): true iff major_count >= 1 or minor_count >= 2. Binary HBR at PCI. Not a weighted point score and not a BARC 3 or 5 percentage.
- `major_count` (integer): Count of true Urban 2019 Table 3 major criteria (0-14)
- `minor_count` (integer): Count of true Urban 2019 Table 3 minor criteria (0-6)
- `criteria` (array): Per-criterion rows with factor and met for the 14 majors then 6 minors; met is true when that Table 3 finding is present
- `citation` (object): Urban 2019 Circulation ARC-HBR citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "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": "Urban P, Mehran R, Colleran R, Angiolillo DJ, Byrne RA, Capodanno D, Cuisset T, Cutlip D, Eerdmans P, Eikelboom J, Farb A, Gibson CM, Gregson J, Haude M, James SK, Kim HS, Kimura T, Konishi A, Laschinger J, Leon MB, Magee PFA, Price MJ, Salett E, Schulz C, Valgimigli M, Varenne O, Yeh RW, Krucoff MW",
    "doi": "10.1161/CIRCULATIONAHA.119.040167",
    "id": "urban-2019",
    "pmid": "31116032",
    "source": "Circulation. 2019;140(3):240-261",
    "title": "Defining High Bleeding Risk in Patients Undergoing Percutaneous Coronary Intervention: A Consensus Document From the Academic Research Consortium for High Bleeding Risk"
  },
  "formula": "arc_hbr",
  "formula_expression": "high_bleeding_risk iff major_count >= 1 or minor_count >= 2 (Urban 2019 Table 3). Binary HBR; not a weighted point score. Majors: anticipated_long_term_oac, severe_or_esrd_ckd, hemoglobin_lt_11, spontaneous_bleed_major, thrombocytopenia_lt_100, chronic_bleeding_diathesis, cirrhosis_with_portal_hypertension, active_malignancy_12mo, previous_spontaneous_ich, traumatic_ich_12mo, bavm, moderate_severe_ischemic_stroke_6mo, nondeferrable_major_surgery_dapt, recent_major_surgery_or_trauma_30d. Minors: age_ge_75, moderate_ckd, mild_anemia, spontaneous_bleed_minor, long_term_nsaid_or_steroid, any_ischemic_stroke_not_major",
  "criteria": [
    {
      "factor": "anticipated_long_term_oac",
      "met": false
    },
    {
      "factor": "severe_or_esrd_ckd",
      "met": false
    },
    {
      "factor": "hemoglobin_lt_11",
      "met": false
    },
    {
      "factor": "spontaneous_bleed_major",
      "met": false
    },
    {
      "factor": "thrombocytopenia_lt_100",
      "met": false
    },
    {
      "factor": "chronic_bleeding_diathesis",
      "met": false
    },
    {
      "factor": "cirrhosis_with_portal_hypertension",
      "met": false
    },
    {
      "factor": "active_malignancy_12mo",
      "met": false
    },
    {
      "factor": "previous_spontaneous_ich",
      "met": false
    },
    {
      "factor": "traumatic_ich_12mo",
      "met": false
    },
    {
      "factor": "bavm",
      "met": false
    },
    {
      "factor": "moderate_severe_ischemic_stroke_6mo",
      "met": false
    },
    {
      "factor": "nondeferrable_major_surgery_dapt",
      "met": false
    },
    {
      "factor": "recent_major_surgery_or_trauma_30d",
      "met": false
    },
    {
      "factor": "age_ge_75",
      "met": true
    },
    {
      "factor": "moderate_ckd",
      "met": false
    },
    {
      "factor": "mild_anemia",
      "met": false
    },
    {
      "factor": "spontaneous_bleed_minor",
      "met": false
    },
    {
      "factor": "long_term_nsaid_or_steroid",
      "met": false
    },
    {
      "factor": "any_ischemic_stroke_not_major",
      "met": false
    }
  ],
  "high_bleeding_risk": false,
  "major_count": 0,
  "minor_count": 1
}
```

## Errors

- HTTP 400 `invalid_flag`: boolean clinical flags must be true or false Returned before settlement; you are not charged.
- HTTP 400 `invalid_arc_hbr`: major and minor pairs cannot both be true for CKD, anemia, spontaneous bleeding, or ischemic stroke (Urban 2019 ARC-HBR Table 3). Returned before settlement; you are not charged.
- HTTP 400 `invalid_items`: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
- HTTP 400 `invalid_item_count`: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
- HTTP 400 `invalid_item`: each items entry must be a JSON object Returned before settlement; you are not charged.

Shared HTTP 402 and 503: https://magentlab.com/docs/payments

## Related tools

- [DAPT score](https://magentlab.com/docs/dapt) — 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.
- [HAS-BLED](https://magentlab.com/docs/has-bled) — Compute the HAS-BLED bleeding-risk score from discrete clinical flags.
- [CRUSADE bleeding score](https://magentlab.com/docs/crusade) — 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.

- GET the tool with Accept: application/json (do not send Accept: text/html unless you want the human paywall).
- HTTP 402 means you have not paid. Decode the base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote.
- Sign accepts[0] (exact, EIP-3009) with validBefore = now + maxTimeoutSeconds (600 seconds), or accepts[1] (batch-settlement deposit/voucher) on product GET. Ping and POST {items} stay exact. Magent retries transient facilitator 429/5xx before answering.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON of accepted and payload). Magent attaches canonical extensions.bazaar on CDP verify/settle; echoing 402 bazaar is optional.
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. exact settles before the tool. batch-settlement verifies (and deposit-settles) before the tool and commits the charge after HTTP 2xx. HTTP 503: retry the same PAYMENT-SIGNATURE. Mint a new exact nonce only after a new HTTP 402.

- offered `exact` on eip155:8453: Fixed-price USDC on Base. The buyer authorizes the advertised amount (EIP-3009). magent settles before the tool runs (paymentFlow upfront). extra.assetTransferMethod=eip3009 extra.paymentFlow=upfront.
- offered `batch-settlement` on eip155:8453: Payment-channel vouchers claimed later in batches. Exact stays accepts[0]. Same-path POST {items} is still exact. extra.assetTransferMethod=eip3009 extra.paymentFlow=authorization.

- not offered `upto`: Not offered. Usage-based: buyer authorizes a ceiling, seller settles the actual amount after work. Reserved for a future metered tool. Not for current calculators or code search.

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for GET unit plus $0.002 per extra item. That is not x402 batch-settlement (payment channels / vouchers).

Shared HTTP 402 and 503 table: https://magentlab.com/docs/payments

Stdio MCP (one process per host): https://magentlab.com/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.
