MAGENT

Hematology · LIVE

Risk of malignancy index (RMI)

RMI

Compute the Jacobs 1990 risk of malignancy index as ultrasound score × menopausal score × CA125 (U/ml), then whether that product exceeds the published cutoff of 200.

LIVE $0.005 USDC GET /api/calc/rmi

Markdown: /docs/rmi.md · Canonical: https://magentlab.com/docs/rmi

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

What it computes

Compute the Jacobs 1990 risk of malignancy index as ultrasound score × menopausal score × CA125 (U/ml), then whether that product exceeds the published cutoff of 200.

When to use

When an agent has a caller-assigned ultrasound score (0, 1, or 3), postmenopausal flag, and CA125 in U/ml and needs the published Jacobs 1990 RMI and >200 cutoff, not a diagnosis of ovarian cancer and not later RMI-2 or RMI-3.

When not to use

  • Not a medical device. magent does not diagnose ovarian cancer.
  • Jacobs 1990 RMI (RMI-I) only. Not later RMI-2 or RMI-3.
  • Caller assigns ultrasound_score (0 if no features, 1 if one of the five findings, 3 if two or more) and postmenopausal (more than one year since final period, or age >50 after hysterectomy). magent does not read ultrasound or date menses.
  • Published cutoff is RMI > 200 (exactly 200 does not exceed). magent does not invent probability tiers.

Formula

RMI = U × M × CA125 (U/ml); U is ultrasound_score 0, 1, or 3 (never 2); M is 1 if premenopausal, 3 if postmenopausal; exceeds_200 if RMI > 200 (Jacobs 1990)

Citation

Title
A risk of malignancy index incorporating CA 125, ultrasound and menopausal status for the accurate preoperative diagnosis of ovarian cancer
Authors
Jacobs I, Oram D, Fairbanks J, Turner J, Frost C, Grudzinskas JG
Source
Br J Obstet Gynaecol. 1990;97(10):922-929
DOI
10.1111/j.1471-0528.1990.tb02448.x

Worked example

CA125 50 U/ml, ultrasound 3, postmenopausal (exceeds 200)

Given: ca125_u_ml=50postmenopausal=trueultrasound_score=3

  1. U = 3 (two or more ultrasound features)
  2. M = 3 (postmenopausal)
  3. RMI = 3 × 3 × 50 = 450.0
  4. 450.0 > 200 → exceeds_200 true

CA125 200 U/ml, ultrasound 1, premenopausal (exactly 200)

Given: ca125_u_ml=200postmenopausal=falseultrasound_score=1

  1. U = 1, M = 1, CA125 = 200
  2. RMI = 1 × 1 × 200 = 200.0
  3. 200.0 is not > 200 → exceeds_200 false

Also searched as

  • risk of malignancy index
  • RMI-I
  • Jacobs RMI
  • CA125 ultrasound menopausal
  • ovarian malignancy index
  • RMI score
  • Jacobs 1990 RMI

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/rmi?ca125_u_ml=50&ultrasound_score=3&postmenopausal=true

Full URL: https://api.magentlab.com/api/calc/rmi?ca125_u_ml=50&ultrasound_score=3&postmenopausal=true

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/rmi?ca125_u_ml=50&ultrasound_score=3&postmenopausal=true"

Parameters

Name Type Required Description
ca125_u_ml number required Serum CA125 in U/ml (0-50000). Enters the product unrounded. Jacobs 1990 uses U/ml. magent does not assay CA125.
ultrasound_score integer required · 0, 1, 3 Caller-assigned Jacobs 1990 ultrasound score: 0 if no features, 1 if one feature, 3 if two or more of multilocular cyst, solid areas, bilateral lesions, ascites, or intra-abdominal metastases. Never 2. magent does not read ultrasound.
postmenopausal boolean required true if postmenopausal (M=3), false if premenopausal (M=1). Jacobs 1990: more than one year since final period, or age >50 after hysterectomy. Caller sets the flag; magent does not date menses.

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.

POST /api/calc/rmi Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "items": [
    {
      "ca125_u_ml": "50",
      "postmenopausal": "true",
      "ultrasound_score": "3"
    },
    {
      "ca125_u_ml": "50",
      "postmenopausal": "true",
      "ultrasound_score": "3"
    }
  ]
}

Open bulk paywall →

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/rmi",
  "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": "Jacobs I, Oram D, Fairbanks J, Turner J, Frost C, Grudzinskas JG",
        "doi": "10.1111/j.1471-0528.1990.tb02448.x",
        "id": "jacobs-1990-rmi",
        "pmid": "2223684",
        "source": "Br J Obstet Gynaecol. 1990;97(10):922-929",
        "title": "A risk of malignancy index incorporating CA 125, ultrasound and menopausal status for the accurate preoperative diagnosis of ovarian cancer"
      },
      "formula": "rmi",
      "formula_expression": "RMI = U × M × CA125 (U/ml); U is ultrasound_score 0, 1, or 3 (never 2); M is 1 if premenopausal, 3 if postmenopausal; exceeds_200 if RMI > 200 (Jacobs 1990)",
      "ca125_u_ml": 50.0,
      "exceeds_200": true,
      "postmenopausal": true,
      "rmi": 450.0,
      "ultrasound_score": 3
    },
    {
      "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 I, Oram D, Fairbanks J, Turner J, Frost C, Grudzinskas JG",
        "doi": "10.1111/j.1471-0528.1990.tb02448.x",
        "id": "jacobs-1990-rmi",
        "pmid": "2223684",
        "source": "Br J Obstet Gynaecol. 1990;97(10):922-929",
        "title": "A risk of malignancy index incorporating CA 125, ultrasound and menopausal status for the accurate preoperative diagnosis of ovarian cancer"
      },
      "formula": "rmi",
      "formula_expression": "RMI = U × M × CA125 (U/ml); U is ultrasound_score 0, 1, or 3 (never 2); M is 1 if premenopausal, 3 if postmenopausal; exceeds_200 if RMI > 200 (Jacobs 1990)",
      "ca125_u_ml": 50.0,
      "exceeds_200": true,
      "postmenopausal": true,
      "rmi": 450.0,
      "ultrasound_score": 3
    }
  ]
}

Response

Field Type Description
formula string rmi
formula_expression string Exact Jacobs 1990 expression
ca125_u_ml number CA125 used in U/ml, unrounded in the product
ultrasound_score integer U used: 0, 1, or 3 (never 2)
postmenopausal boolean Menopausal flag used (true → M=3, false → M=1)
rmi number U × M × CA125, 1 decimal (Jacobs 1990). Not a diagnosis.
exceeds_200 boolean true if RMI > 200 (Jacobs 1990 published cutoff). Exactly 200 is false.
citation object Jacobs 1990 BJOG citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "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 I, Oram D, Fairbanks J, Turner J, Frost C, Grudzinskas JG",
    "doi": "10.1111/j.1471-0528.1990.tb02448.x",
    "id": "jacobs-1990-rmi",
    "pmid": "2223684",
    "source": "Br J Obstet Gynaecol. 1990;97(10):922-929",
    "title": "A risk of malignancy index incorporating CA 125, ultrasound and menopausal status for the accurate preoperative diagnosis of ovarian cancer"
  },
  "formula": "rmi",
  "formula_expression": "RMI = U × M × CA125 (U/ml); U is ultrasound_score 0, 1, or 3 (never 2); M is 1 if premenopausal, 3 if postmenopausal; exceeds_200 if RMI > 200 (Jacobs 1990)",
  "ca125_u_ml": 50.0,
  "exceeds_200": true,
  "postmenopausal": true,
  "rmi": 450.0,
  "ultrasound_score": 3
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_ca125 ca125_u_ml must be a number from 0 to 50000. Returned before settlement; you are not charged.
400 invalid_ultrasound_score ultrasound_score must be 0, 1, or 3 (Jacobs 1990; never 2). Returned before settlement; you are not charged.
400 invalid_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_rmi RMI needs CA125 (U/ml), ultrasound_score 0, 1, or 3, and postmenopausal as used in Jacobs 1990. 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

  • GPS — Apply the Forrest 2003 original Glasgow Prognostic Score (GPS) from caller-supplied CRP in mg/L and albumin.
  • mGPS — Apply the McMillan 2007 modified Glasgow Prognostic Score (mGPS) from caller-supplied CRP in mg/L and albumin.
  • MAPS — Sum the Pardanani 2018 MAPS hybrid clinical-molecular (Figure 3) points for systemic mastocytosis and return low (≤2), intermediate_1 (3), intermediate_2 (4), or high (≥5).

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.