# Salivary gland PORT survival (Jacobs 2022)

Salivary gland PORT survival (Jacobs 2022)

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

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

## What it computes

Compute the Jacobs 2022 Table 3 multivariable Cox linear predictor for overall survival after resection of major salivary gland cancer from age, sex, Charlson-Deyo score, involved gland, pathologic T stage, grade, margin, nodal-positivity ratio band, and PORT yes or no.

## When to use

When an agent already has those caller-assigned clinicopathologic values and needs the published linear predictor, not a 2-, 5-, or 10-year OS percent and not a radiation order.

## When not to use

- Not a medical device. Not a radiation, dose, or treatment order. magent does not compute Charlson-Deyo, assign grade, read margins, or count nodes.
- Major salivary gland cancers in the National Cancer Database. Not minor salivary gland tumors.
- Jacobs 2022 Table 3 prints multivariable HRs. magent uses β = ln(HR). The paper does not print baseline survival S0, so this tool emits the linear predictor only and does not invent 2-, 5-, or 10-year OS percents.
- T-stage main-effect HRs were printed as dashes because of the PORT×T-stage interaction. T-stage enters the linear predictor only through the T-specific PORT HR when PORT is true.
- Charlson-Deyo, grade, and nodal-positivity ratio each have one Table 3 HR. magent applies that HR per published step (0/1/2/≥3; low/intermediate/high; 0% / 0.1–10% / 10.1–49.9% / ≥50%). Per-band dummy HRs were not printed.
- The paper does not print a worked numeric example. The compiled example is Table 3 arithmetic on the locked age-65 male parotid T2 profile.

## Formula

```
lp = ln(age_hr_by_port)*(age/10) + ln(1.28)*male + ln(1.22)*charlson_deyo_step + ln(1.32)*submandibular + ln(0.72)*sublingual + ln(port_hr_by_t)*port + ln(1.29)*nodal_ratio_step + ln(1.34)*grade_step + ln(1.26)*positive_margin; Jacobs 2022 Table 3 multivariable HRs, β = ln(HR); age_hr is 1.52 without PORT and 1.37 with PORT (per 10 years); port_hr is 1.03/0.83/0.68/0.55 for pT1/pT2/pT3/pT4; charlson_deyo_step 0/1/2/3 for 0/1/2/ge_3; nodal_ratio_step 0/1/2/3 for 0 / 0.1-10 / 10.1-49.9 / ge_50; grade_step 0/1/2 for low/intermediate/high; T-stage main-effect HRs printed as dashes (PORT×T interaction); no printed S0; not 2-/5-/10-year OS percents; not a radiation order; magent does not compute Charlson-Deyo or count nodes
```

## Citation

[Prediction model to estimate overall survival benefit of postoperative radiotherapy for resected major salivary gland cancers](https://doi.org/10.1016/j.oraloncology.2022.105955)
Jacobs CD, Barak I, Jung SH, et al.
Oral Oncol. 2022;132:105955
DOI: [10.1016/j.oraloncology.2022.105955](https://doi.org/10.1016/j.oraloncology.2022.105955)

## Worked example

### Age 65, male, Charlson-Deyo 0, parotid, T2, low grade, negative margin, N+ 0%, PORT false

Given: `age=65, charlson_deyo=0, gland=parotid, grade=low, margin=negative, nodal_positivity_ratio=0, port=false, sex=male, t_stage=t2`

1. age 65 without PORT: ln(1.52)*(65/10); male ln(1.28); Charlson-Deyo 0, parotid, low grade, negative margin, nodal ratio 0 contribute 0
2. PORT false: T-stage-specific PORT HR is not applied (T-stage main-effect HRs were printed as dashes)
3. linear_predictor = risk_score, 6 decimals; not a survival percent


### Same profile with PORT true

Given: `age=65, charlson_deyo=0, gland=parotid, grade=low, margin=negative, nodal_positivity_ratio=0, port=true, sex=male, t_stage=t2`

1. same covariates except PORT true: age uses HR 1.37 per 10 years; pT2 PORT HR 0.83
2. linear_predictor is the Table 3 LP, 6 decimals; not a 2-/5-/10-year OS percent


## Also searched as

- salivary gland PORT survival
- Jacobs 2022 salivary PORT
- postoperative radiotherapy salivary gland
- major salivary gland PORT OS
- PORT benefit salivary cancer
- resected salivary gland overall survival
- Jacobs salivary gland prediction model

## Parameters

- `age` (integer, required): Age at diagnosis in years (integer 18-120). Jacobs 2022 Table 3: per 10 years, HR 1.52 without PORT and HR 1.37 with PORT. magent does not assign age.
- `sex` (string, required): Caller-assigned sex. Table 3: male versus female HR 1.28. magent does not assign sex.
- `charlson_deyo` (string, required): Caller-assigned Charlson-Deyo score as published (0, 1, 2, or ge_3). Table 3 prints a single HR 1.22; magent applies ln(1.22) per step 0/1/2/3. magent does not compute Charlson-Deyo.
- `gland` (string, required): Involved major salivary gland. Table 3 versus parotid: submandibular HR 1.32; sublingual HR 0.72. magent does not assign the primary site.
- `t_stage` (string, required): AJCC pathologic T stage (t1, t2, t3, or t4) as recorded. Table 3 PORT HRs: pT1 1.03, pT2 0.83, pT3 0.68, pT4 0.55. T-stage main-effect HRs were printed as dashes because of the PORT×T interaction; without PORT the T term is 0. magent does not assign T stage.
- `grade` (string, required): Caller-assigned grade (low, intermediate, or high). Table 3 prints a single HR 1.34; magent applies ln(1.34) per step from low. magent does not assign grade.
- `margin` (string, required): Surgical margin. Table 3: positive versus negative HR 1.26. magent does not read the pathology report.
- `nodal_positivity_ratio` (string, required): Caller-assigned nodal-positivity ratio band as published: 0 (0%), 0.1-10, 10.1-49.9, or ge_50 (≥50%). Table 3 prints a single HR 1.29; magent applies ln(1.29) per a priori band step 0/1/2/3. magent does not count nodes.
- `port` (boolean, required): true if postoperative radiotherapy was given, false if not. Selects the Table 3 age HR and the T-stage-specific PORT HR. Not a radiation order.

## 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/sg_port`
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": [
    {
      "age": "65",
      "charlson_deyo": "0",
      "gland": "parotid",
      "grade": "low",
      "margin": "negative",
      "nodal_positivity_ratio": "0",
      "port": "false",
      "sex": "male",
      "t_stage": "t2"
    },
    {
      "age": "65",
      "charlson_deyo": "0",
      "gland": "parotid",
      "grade": "low",
      "margin": "negative",
      "nodal_positivity_ratio": "0",
      "port": "false",
      "sex": "male",
      "t_stage": "t2"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/sg_port",
  "items": [
    {
      "port": false,
      "age": 65,
      "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": "Jacobs CD, Barak I, Jung SH, et al.",
        "doi": "10.1016/j.oraloncology.2022.105955",
        "id": "jacobs-2022-sg-port",
        "pmid": "35752134",
        "source": "Oral Oncol. 2022;132:105955",
        "title": "Prediction model to estimate overall survival benefit of postoperative radiotherapy for resected major salivary gland cancers"
      },
      "formula": "sg_port",
      "formula_expression": "lp = ln(age_hr_by_port)*(age/10) + ln(1.28)*male + ln(1.22)*charlson_deyo_step + ln(1.32)*submandibular + ln(0.72)*sublingual + ln(port_hr_by_t)*port + ln(1.29)*nodal_ratio_step + ln(1.34)*grade_step + ln(1.26)*positive_margin; Jacobs 2022 Table 3 multivariable HRs, β = ln(HR); age_hr is 1.52 without PORT and 1.37 with PORT (per 10 years); port_hr is 1.03/0.83/0.68/0.55 for pT1/pT2/pT3/pT4; charlson_deyo_step 0/1/2/3 for 0/1/2/ge_3; nodal_ratio_step 0/1/2/3 for 0 / 0.1-10 / 10.1-49.9 / ge_50; grade_step 0/1/2 for low/intermediate/high; T-stage main-effect HRs printed as dashes (PORT×T interaction); no printed S0; not 2-/5-/10-year OS percents; not a radiation order; magent does not compute Charlson-Deyo or count nodes",
      "sex": "male",
      "grade": "low",
      "linear_predictor": 2.968477,
      "t_stage": "t2",
      "risk_score": 2.968477,
      "margin": "negative",
      "charlson_deyo": "0",
      "gland": "parotid",
      "nodal_positivity_ratio": "0"
    },
    {
      "port": false,
      "age": 65,
      "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": "Jacobs CD, Barak I, Jung SH, et al.",
        "doi": "10.1016/j.oraloncology.2022.105955",
        "id": "jacobs-2022-sg-port",
        "pmid": "35752134",
        "source": "Oral Oncol. 2022;132:105955",
        "title": "Prediction model to estimate overall survival benefit of postoperative radiotherapy for resected major salivary gland cancers"
      },
      "formula": "sg_port",
      "formula_expression": "lp = ln(age_hr_by_port)*(age/10) + ln(1.28)*male + ln(1.22)*charlson_deyo_step + ln(1.32)*submandibular + ln(0.72)*sublingual + ln(port_hr_by_t)*port + ln(1.29)*nodal_ratio_step + ln(1.34)*grade_step + ln(1.26)*positive_margin; Jacobs 2022 Table 3 multivariable HRs, β = ln(HR); age_hr is 1.52 without PORT and 1.37 with PORT (per 10 years); port_hr is 1.03/0.83/0.68/0.55 for pT1/pT2/pT3/pT4; charlson_deyo_step 0/1/2/3 for 0/1/2/ge_3; nodal_ratio_step 0/1/2/3 for 0 / 0.1-10 / 10.1-49.9 / ge_50; grade_step 0/1/2 for low/intermediate/high; T-stage main-effect HRs printed as dashes (PORT×T interaction); no printed S0; not 2-/5-/10-year OS percents; not a radiation order; magent does not compute Charlson-Deyo or count nodes",
      "sex": "male",
      "grade": "low",
      "linear_predictor": 2.968477,
      "t_stage": "t2",
      "risk_score": 2.968477,
      "margin": "negative",
      "charlson_deyo": "0",
      "gland": "parotid",
      "nodal_positivity_ratio": "0"
    }
  ]
}
```

## Response fields

- `formula` (string): sg_port
- `formula_expression` (string): Jacobs 2022 Table 3 Cox linear predictor from ln(HR)
- `age` (integer): Input age in years
- `sex` (string): female or male
- `charlson_deyo` (string): 0, 1, 2, or ge_3
- `gland` (string): parotid, submandibular, or sublingual
- `t_stage` (string): t1, t2, t3, or t4
- `grade` (string): low, intermediate, or high
- `margin` (string): negative or positive
- `nodal_positivity_ratio` (string): 0, 0.1-10, 10.1-49.9, or ge_50
- `port` (boolean): PORT yes (true) or no (false)
- `linear_predictor` (number): Jacobs 2022 Table 3 Cox linear predictor, 6 decimals. Not a survival percent.
- `risk_score` (number): Same value as linear_predictor (unscaled Cox LP). Not a survival percent.
- `citation` (object): Jacobs 2022 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "port": false,
  "age": 65,
  "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": "Jacobs CD, Barak I, Jung SH, et al.",
    "doi": "10.1016/j.oraloncology.2022.105955",
    "id": "jacobs-2022-sg-port",
    "pmid": "35752134",
    "source": "Oral Oncol. 2022;132:105955",
    "title": "Prediction model to estimate overall survival benefit of postoperative radiotherapy for resected major salivary gland cancers"
  },
  "formula": "sg_port",
  "formula_expression": "lp = ln(age_hr_by_port)*(age/10) + ln(1.28)*male + ln(1.22)*charlson_deyo_step + ln(1.32)*submandibular + ln(0.72)*sublingual + ln(port_hr_by_t)*port + ln(1.29)*nodal_ratio_step + ln(1.34)*grade_step + ln(1.26)*positive_margin; Jacobs 2022 Table 3 multivariable HRs, β = ln(HR); age_hr is 1.52 without PORT and 1.37 with PORT (per 10 years); port_hr is 1.03/0.83/0.68/0.55 for pT1/pT2/pT3/pT4; charlson_deyo_step 0/1/2/3 for 0/1/2/ge_3; nodal_ratio_step 0/1/2/3 for 0 / 0.1-10 / 10.1-49.9 / ge_50; grade_step 0/1/2 for low/intermediate/high; T-stage main-effect HRs printed as dashes (PORT×T interaction); no printed S0; not 2-/5-/10-year OS percents; not a radiation order; magent does not compute Charlson-Deyo or count nodes",
  "sex": "male",
  "grade": "low",
  "linear_predictor": 2.968477,
  "t_stage": "t2",
  "risk_score": 2.968477,
  "margin": "negative",
  "charlson_deyo": "0",
  "gland": "parotid",
  "nodal_positivity_ratio": "0"
}
```

## Errors

- HTTP 400 `invalid_sg_port`: Salivary-gland PORT survival inputs must match Jacobs 2022 age, sex, Charlson-Deyo score, gland, pathologic T stage, grade, margin, nodal-positivity ratio, and PORT. 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

- [Charlson CCI](https://magentlab.com/docs/charlson) — Sum the nineteen Charlson 1987 original comorbidity weights and return the published 1-year mortality group.

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