# RHMP-30 (de Jong 2025)

RHMP-30

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

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

## What it computes

Compute the de Jong 2025 Rotterdam Hip Fracture Mortality Prediction-30 Days (RHMP-30) logistic 30-day mortality probability after hip fracture surgery from caller-assigned age, sex, albumin in g/L, dementia, Katz-ADL total, ASA 4, and nursing-home residence.

## When to use

When an agent has de Jong 2025 RHMP-30 predictors and needs the published 30-day mortality probability from the unrounded logit, not an operative vs nonoperative order and not an unpublished website band.

## When not to use

- Not a medical device. Not a diagnosis. Not an operative vs nonoperative order. magent does not assign ASA class or Katz-ADL and does not examine the patient.
- de Jong 2025 Figure 3 / Appendix 4 adaptive LASSO logit only. No published probability cutoff. magent does not invent low/moderate/high bands.
- Sex is the published female coefficient (female = 1, male = 0), not race.
- Albumin is g/L as in de Jong 2025 Table I (typical 30-45), not g/dL. Caller-supplied; magent does not assay albumin.
- dementia, asa_4, nursing_home, and Katz-ADL total are caller-assigned. magent does not diagnose dementia or score Katz items.
- estimated_mortality_percent is a population probability from the unrounded logit, not an individual outcome. de Jong 2025 excluded nonoperative patients.

## Formula

```
logit = -2.69 - 0.0442*albumin_g_l + 0.0306*age_years - 1.012*female + 0.360*dementia - 0.0853*katz_adl + 0.856*asa_4 + 0.726*nursing_home; estimated_mortality_percent = 100 * exp(logit)/(1+exp(logit)) from the unrounded logit, 2 decimals; displayed logit 2 decimals; female is 1 if sex is female else 0; dementia, asa_4, and nursing_home are 1 if true else 0; albumin is g/L (not g/dL); Katz-ADL total 0-6 (6 = independent)
```

## Citation

[Multidimensional Approach for Predicting 30-Day Mortality in Patients with a Hip Fracture: Development and External Validation of the Rotterdam Hip Fracture Mortality Prediction-30 Days (RHMP-30)](https://doi.org/10.2106/JBJS.23.01397)
de Jong L, de Haan E, van Rijckevorsel VAJIM, Kuijper TM, Roukema GR
J Bone Joint Surg Am. 2025;107(5):459-468
DOI: [10.2106/JBJS.23.01397](https://doi.org/10.2106/JBJS.23.01397)

## Worked example

### Female, age 80, albumin 38 g/L, independent, no dementia, not ASA 4, not nursing home

Given: `age=80, albumin_g_l=38, asa_4=false, dementia=false, katz_adl=6, nursing_home=false, sex=female`

1. female → female = 1; dementia false → 0; asa_4 false → 0; nursing_home false → 0
2. albumin 38 g/L; Katz-ADL 6 (independent)
3. logit = -2.69 - 0.0442*38 + 0.0306*80 - 1.012*1 - 0.0853*6
4. estimated_mortality_percent = 100 * exp(logit)/(1+exp(logit)) from the unrounded logit


### Male, otherwise the same row (published female coefficient)

Given: `age=80, albumin_g_l=38, asa_4=false, dementia=false, katz_adl=6, nursing_home=false, sex=male`

1. male → female = 0, so the female term is not subtracted
2. percent from the unrounded logit; sex is a published coefficient, not race


## Also searched as

- RHMP 30
- Rotterdam hip fracture mortality
- de Jong 2025 hip fracture
- 30-day hip fracture mortality
- hip fracture LASSO logit
- Katz-ADL hip fracture
- albumin hip fracture mortality

## Parameters

- `age` (integer, required): Age in years, integer 40-110. de Jong 2025 coefficient +0.0306 per year. magent does not read an identity document.
- `sex` (string, required): Sex used as the published de Jong 2025 female coefficient (female = 1, male = 0). Not race. magent does not examine the patient.
- `albumin_g_l` (number, required): Admission serum albumin in g/L (10-60). de Jong 2025 Table I uses g/L (typical 30-45). Not g/dL. Caller-supplied; magent does not assay albumin.
- `dementia` (boolean, required): true if the caller assigns a history of dementia (de Jong 2025). true scores 1 in the logit; false scores 0. magent does not diagnose dementia.
- `katz_adl` (integer, required): Katz Index of Independence in Activities of Daily Living total, integer 0-6 (de Jong 2025). 0 = completely dependent; 6 = completely independent. Caller-assigned total; magent does not score bathing, dressing, toileting, transferring, continence, or feeding.
- `asa_4` (boolean, required): true if the caller assigns ASA physical status 4 (de Jong 2025). true scores 1 in the logit; false scores 0. magent does not assign ASA class.
- `nursing_home` (boolean, required): true if the caller assigns residence in a nursing home (de Jong 2025). true scores 1 in the logit; false scores 0. magent does not determine residence.

## 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/rhmp_30`
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": "80",
      "albumin_g_l": "38",
      "asa_4": "false",
      "dementia": "false",
      "katz_adl": "6",
      "nursing_home": "false",
      "sex": "female"
    },
    {
      "age": "80",
      "albumin_g_l": "38",
      "asa_4": "false",
      "dementia": "false",
      "katz_adl": "6",
      "nursing_home": "false",
      "sex": "female"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/rhmp_30",
  "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": "de Jong L, de Haan E, van Rijckevorsel VAJIM, Kuijper TM, Roukema GR",
        "doi": "10.2106/JBJS.23.01397",
        "id": "de-jong-2025",
        "pmid": "39836737",
        "source": "J Bone Joint Surg Am. 2025;107(5):459-468",
        "title": "Multidimensional Approach for Predicting 30-Day Mortality in Patients with a Hip Fracture: Development and External Validation of the Rotterdam Hip Fracture Mortality Prediction-30 Days (RHMP-30)"
      },
      "formula": "rhmp_30",
      "formula_expression": "logit = -2.69 - 0.0442*albumin_g_l + 0.0306*age_years - 1.012*female + 0.360*dementia - 0.0853*katz_adl + 0.856*asa_4 + 0.726*nursing_home; estimated_mortality_percent = 100 * exp(logit)/(1+exp(logit)) from the unrounded logit, 2 decimals; displayed logit 2 decimals; female is 1 if sex is female else 0; dementia, asa_4, and nursing_home are 1 if true else 0; albumin is g/L (not g/dL); Katz-ADL total 0-6 (6 = independent)",
      "age_years": 80,
      "sex": "female",
      "logit": -3.45,
      "albumin_g_l": 38.0,
      "estimated_mortality_percent": 3.09,
      "asa_4": false,
      "dementia": false,
      "katz_adl": 6,
      "nursing_home": 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": "de Jong L, de Haan E, van Rijckevorsel VAJIM, Kuijper TM, Roukema GR",
        "doi": "10.2106/JBJS.23.01397",
        "id": "de-jong-2025",
        "pmid": "39836737",
        "source": "J Bone Joint Surg Am. 2025;107(5):459-468",
        "title": "Multidimensional Approach for Predicting 30-Day Mortality in Patients with a Hip Fracture: Development and External Validation of the Rotterdam Hip Fracture Mortality Prediction-30 Days (RHMP-30)"
      },
      "formula": "rhmp_30",
      "formula_expression": "logit = -2.69 - 0.0442*albumin_g_l + 0.0306*age_years - 1.012*female + 0.360*dementia - 0.0853*katz_adl + 0.856*asa_4 + 0.726*nursing_home; estimated_mortality_percent = 100 * exp(logit)/(1+exp(logit)) from the unrounded logit, 2 decimals; displayed logit 2 decimals; female is 1 if sex is female else 0; dementia, asa_4, and nursing_home are 1 if true else 0; albumin is g/L (not g/dL); Katz-ADL total 0-6 (6 = independent)",
      "age_years": 80,
      "sex": "female",
      "logit": -3.45,
      "albumin_g_l": 38.0,
      "estimated_mortality_percent": 3.09,
      "asa_4": false,
      "dementia": false,
      "katz_adl": 6,
      "nursing_home": false
    }
  ]
}
```

## Response fields

- `formula` (string): rhmp_30
- `formula_expression` (string): de Jong 2025 RHMP-30 LASSO logit and 30-day mortality probability
- `age_years` (integer): Age in years used in the logit
- `sex` (string): female or male
- `albumin_g_l` (number): Admission serum albumin in g/L used in the logit
- `dementia` (boolean): Caller-assigned history of dementia
- `katz_adl` (integer): Caller-assigned Katz-ADL total 0-6 used in the logit
- `asa_4` (boolean): Caller-assigned ASA physical status 4
- `nursing_home` (boolean): Caller-assigned nursing-home residence
- `logit` (number): de Jong 2025 logit, 2 decimal places. Percent uses the unrounded logit.
- `estimated_mortality_percent` (number): 100 * exp(logit)/(1+exp(logit)) from the unrounded logit, 2 decimals. A population probability, not an operative order.
- `citation` (object): de Jong 2025 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": "de Jong L, de Haan E, van Rijckevorsel VAJIM, Kuijper TM, Roukema GR",
    "doi": "10.2106/JBJS.23.01397",
    "id": "de-jong-2025",
    "pmid": "39836737",
    "source": "J Bone Joint Surg Am. 2025;107(5):459-468",
    "title": "Multidimensional Approach for Predicting 30-Day Mortality in Patients with a Hip Fracture: Development and External Validation of the Rotterdam Hip Fracture Mortality Prediction-30 Days (RHMP-30)"
  },
  "formula": "rhmp_30",
  "formula_expression": "logit = -2.69 - 0.0442*albumin_g_l + 0.0306*age_years - 1.012*female + 0.360*dementia - 0.0853*katz_adl + 0.856*asa_4 + 0.726*nursing_home; estimated_mortality_percent = 100 * exp(logit)/(1+exp(logit)) from the unrounded logit, 2 decimals; displayed logit 2 decimals; female is 1 if sex is female else 0; dementia, asa_4, and nursing_home are 1 if true else 0; albumin is g/L (not g/dL); Katz-ADL total 0-6 (6 = independent)",
  "age_years": 80,
  "sex": "female",
  "logit": -3.45,
  "albumin_g_l": 38.0,
  "estimated_mortality_percent": 3.09,
  "asa_4": false,
  "dementia": false,
  "katz_adl": 6,
  "nursing_home": false
}
```

## Errors

- HTTP 400 `invalid_rhmp_30`: RHMP-30 needs de Jong 2025 age, sex, ASA 4, dementia, albumin, Katz-ADL, and nursing-home residence in published ranges. 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

- [NHFS](https://magentlab.com/docs/nhfs) — Sum the Maxwell 2008 Nottingham hip fracture score from seven preoperative variables and return the integer total (max 10).
- [Gupta PRF](https://magentlab.com/docs/gupta-prf) — Compute the Gupta 2011 Chest logistic probability of postoperative respiratory failure (mechanical ventilation >48 h after surgery or unplanned intubation within 30 days) from ASA class, functional status, preoperative sepsis, emergency case, and surgery type.

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