# D'Amico 1998 clinically localized prostate cancer groups

D'Amico

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

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

## What it computes

Apply the D'Amico 1998 JAMA clinically localized three-group rule to caller-assigned clinical T (t1c, t2a, t2b, t2c), Gleason sum 2-10, and PSA ng/mL, and return risk low, intermediate, or high. Does not assay PSA, assign Gleason, or compute CAPRA or NCCN groups.

## When to use

When an agent already has a clinically localized prostate-cancer T stage in {t1c, t2a, t2b, t2c}, a Gleason sum, and a PSA, and needs the published D'Amico 1998 three-group box. magent does not assay PSA, assign Gleason, or assign TNM. Not CAPRA and not NCCN.

## When not to use

- Not a medical device and not a diagnosis of prostate cancer. magent does not assay PSA, assign Gleason, or assign TNM.
- D'Amico 1998 JAMA clinically localized groups only (abstract three-group rule). t_stage is limited to t1c, t2a, t2b, and t2c. T1a, T1b, and T3+ are out of scope.
- Not CAPRA. This tool does not implement Cooperberg 2005 CAPRA.
- Not NCCN risk groups. This tool does not implement NCCN very-low / favorable-intermediate / unfavorable-intermediate / very-high boxes.
- t_stage, gleason_score, and psa_ng_ml are caller-assigned. magent does not read slides, compute Grade Group / ISUP 2014, or assay PSA. High beats intermediate beats low (a T2c with PSA 5 Gleason 6 is high).

## Formula

```
D'Amico 1998 JAMA clinically localized groups: high if t_stage t2c OR psa_ng_ml > 20 OR gleason_score ≥ 8; else intermediate if t_stage t2b OR gleason_score == 7 OR (psa_ng_ml > 10 AND psa_ng_ml ≤ 20); else low if t_stage in {t1c, t2a} AND psa_ng_ml ≤ 10 AND gleason_score ≤ 6. Not CAPRA. Not NCCN. magent does not assay PSA or assign Gleason.
```

## Citation

[Biochemical outcome after radical prostatectomy, external beam radiation therapy, or interstitial radiation therapy for clinically localized prostate cancer](https://doi.org/10.1001/jama.280.11.969)
D'Amico AV, Whittington R, Malkowicz SB, Schultz D, Blank K, Broderick GA, Tomaszewski JE, Renshaw AA, Kaplan I, Beard CJ, Wein A
JAMA. 1998;280(11):969-974
DOI: [10.1001/jama.280.11.969](https://doi.org/10.1001/jama.280.11.969)

## Worked example

### T1c PSA 5 Gleason 6 is low

Given: `gleason_score=6, psa_ng_ml=5, t_stage=t1c`

1. t_stage t1c, psa_ng_ml 5, gleason_score 6
2. Not T2c, PSA not > 20, Gleason not ≥ 8; not T2b, Gleason not 7, PSA not > 10; T1c AND PSA ≤ 10 AND Gleason ≤ 6 → risk low


### T2c with PSA 5 Gleason 6 is high

Given: `gleason_score=6, psa_ng_ml=5, t_stage=t2c`

1. t_stage t2c, psa_ng_ml 5, gleason_score 6
2. T2c is high regardless of PSA or Gleason (high beats intermediate beats low)


## Also searched as

- D'Amico
- D'Amico risk classification
- D'Amico 1998
- clinically localized prostate cancer
- prostate cancer risk group
- D'Amico low intermediate high
- JAMA 1998 prostate risk

## Parameters

- `t_stage` (string, required): Clinical T as assigned by the caller (D'Amico 1998 clinically localized groups). t1c, t2a, t2b, or t2c. T1a, T1b, and T3+ are out of scope. magent does not assign TNM or read staging studies.
- `gleason_score` (integer, required): Gleason sum 2-10 as assigned by the caller (D'Amico 1998). Integer 2-10 only; reject 1, 11, and 6.5. Not Grade Group / ISUP 2014. magent does not assign Gleason or read slides.
- `psa_ng_ml` (number, required): Serum PSA in ng/mL as assayed by the caller (0.1-200). D'Amico 1998 uses ≤10, >10 and ≤20, and >20. magent does not assay PSA.

## 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/damico`
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": [
    {
      "gleason_score": "6",
      "psa_ng_ml": "5",
      "t_stage": "t1c"
    },
    {
      "gleason_score": "6",
      "psa_ng_ml": "5",
      "t_stage": "t1c"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/damico",
  "items": [
    {
      "components": [
        {
          "value": "t1c",
          "factor": "t_stage",
          "met": true
        },
        {
          "value": 6,
          "factor": "gleason_score",
          "met": true
        },
        {
          "value": 5.0,
          "factor": "psa_ng_ml",
          "met": true
        },
        {
          "factor": "low",
          "met": true
        },
        {
          "factor": "intermediate",
          "met": false
        },
        {
          "factor": "high",
          "met": 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": "D'Amico AV, Whittington R, Malkowicz SB, Schultz D, Blank K, Broderick GA, Tomaszewski JE, Renshaw AA, Kaplan I, Beard CJ, Wein A",
        "doi": "10.1001/jama.280.11.969",
        "id": "damico-1998",
        "pmid": "9749478",
        "source": "JAMA. 1998;280(11):969-974",
        "title": "Biochemical outcome after radical prostatectomy, external beam radiation therapy, or interstitial radiation therapy for clinically localized prostate cancer"
      },
      "formula": "damico",
      "formula_expression": "D'Amico 1998 JAMA clinically localized groups: high if t_stage t2c OR psa_ng_ml > 20 OR gleason_score ≥ 8; else intermediate if t_stage t2b OR gleason_score == 7 OR (psa_ng_ml > 10 AND psa_ng_ml ≤ 20); else low if t_stage in {t1c, t2a} AND psa_ng_ml ≤ 10 AND gleason_score ≤ 6. Not CAPRA. Not NCCN. magent does not assay PSA or assign Gleason.",
      "psa_ng_ml": 5.0,
      "t_stage": "t1c",
      "gleason_score": 6,
      "risk": "low"
    },
    {
      "components": [
        {
          "value": "t1c",
          "factor": "t_stage",
          "met": true
        },
        {
          "value": 6,
          "factor": "gleason_score",
          "met": true
        },
        {
          "value": 5.0,
          "factor": "psa_ng_ml",
          "met": true
        },
        {
          "factor": "low",
          "met": true
        },
        {
          "factor": "intermediate",
          "met": false
        },
        {
          "factor": "high",
          "met": 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": "D'Amico AV, Whittington R, Malkowicz SB, Schultz D, Blank K, Broderick GA, Tomaszewski JE, Renshaw AA, Kaplan I, Beard CJ, Wein A",
        "doi": "10.1001/jama.280.11.969",
        "id": "damico-1998",
        "pmid": "9749478",
        "source": "JAMA. 1998;280(11):969-974",
        "title": "Biochemical outcome after radical prostatectomy, external beam radiation therapy, or interstitial radiation therapy for clinically localized prostate cancer"
      },
      "formula": "damico",
      "formula_expression": "D'Amico 1998 JAMA clinically localized groups: high if t_stage t2c OR psa_ng_ml > 20 OR gleason_score ≥ 8; else intermediate if t_stage t2b OR gleason_score == 7 OR (psa_ng_ml > 10 AND psa_ng_ml ≤ 20); else low if t_stage in {t1c, t2a} AND psa_ng_ml ≤ 10 AND gleason_score ≤ 6. Not CAPRA. Not NCCN. magent does not assay PSA or assign Gleason.",
      "psa_ng_ml": 5.0,
      "t_stage": "t1c",
      "gleason_score": 6,
      "risk": "low"
    }
  ]
}
```

## Response fields

- `formula` (string): damico
- `formula_expression` (string): Published D'Amico 1998 JAMA clinically localized three-group rule
- `t_stage` (string): Caller-assigned clinical T used (t1c, t2a, t2b, or t2c)
- `gleason_score` (integer): Caller-assigned Gleason sum 2-10
- `psa_ng_ml` (number): Caller-assigned serum PSA in ng/mL
- `risk` (string): low, intermediate, or high (D'Amico 1998). High beats intermediate beats low. Not CAPRA. Not NCCN. Not a Grade Group.
- `components` (array): Tree rows for t_stage, gleason_score, psa_ng_ml, and exclusive low, intermediate, high with factor and met
- `citation` (object): D'Amico 1998 JAMA citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": "t1c",
      "factor": "t_stage",
      "met": true
    },
    {
      "value": 6,
      "factor": "gleason_score",
      "met": true
    },
    {
      "value": 5.0,
      "factor": "psa_ng_ml",
      "met": true
    },
    {
      "factor": "low",
      "met": true
    },
    {
      "factor": "intermediate",
      "met": false
    },
    {
      "factor": "high",
      "met": 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": "D'Amico AV, Whittington R, Malkowicz SB, Schultz D, Blank K, Broderick GA, Tomaszewski JE, Renshaw AA, Kaplan I, Beard CJ, Wein A",
    "doi": "10.1001/jama.280.11.969",
    "id": "damico-1998",
    "pmid": "9749478",
    "source": "JAMA. 1998;280(11):969-974",
    "title": "Biochemical outcome after radical prostatectomy, external beam radiation therapy, or interstitial radiation therapy for clinically localized prostate cancer"
  },
  "formula": "damico",
  "formula_expression": "D'Amico 1998 JAMA clinically localized groups: high if t_stage t2c OR psa_ng_ml > 20 OR gleason_score ≥ 8; else intermediate if t_stage t2b OR gleason_score == 7 OR (psa_ng_ml > 10 AND psa_ng_ml ≤ 20); else low if t_stage in {t1c, t2a} AND psa_ng_ml ≤ 10 AND gleason_score ≤ 6. Not CAPRA. Not NCCN. magent does not assay PSA or assign Gleason.",
  "psa_ng_ml": 5.0,
  "t_stage": "t1c",
  "gleason_score": 6,
  "risk": "low"
}
```

## Errors

- HTTP 400 `invalid_damico`: t_stage must be t1c, t2a, t2b, or t2c; gleason_score an integer 2–10; psa_ng_ml a number from 0.1 to 200 (D'Amico 1998 clinically localized groups). 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

- [UISS](https://magentlab.com/docs/uiss) — Apply the Zisman 2002 localized N0M0 three-group UISS algorithm to caller-assigned 1997 pathological T, Fuhrman grade, and ECOG PS and return low_risk, intermediate_risk, or high_risk. Does not compute a predicted 5-year disease-specific survival.
- [Fuhrman](https://magentlab.com/docs/fuhrman) — Echo the caller-assigned Fuhrman 1982 nuclear grade (1-4) with the published nuclear-feature description. magent does not read slides. Not WHO/ISUP 2016.
- [R.E.N.A.L. nephrometry](https://magentlab.com/docs/renal-nephrometry) — Sum the Kutikov 2009 R.E.N.A.L. nephrometry score for a renal mass from four caller-assigned published item points (radius, exophytic/endophytic, nearness, location) and return the integer total (4–12) plus anterior and hilar descriptors. Does not return complexity bands.

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