# ORAI osteoporosis risk assessment

ORAI

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

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

## What it computes

Sum Cadarette 2000 ORAI (age, weight, and current estrogen use) and return the Table 4 point total with select_for_dxa (score ≥9) or do_not_select.

## When to use

When an agent has caller-supplied age (years), weight, and current estrogen use and needs the published Cadarette 2000 ORAI point total and densitometry-selection band, not a DXA order, OSTA index, FRAX probability, or osteoporosis diagnosis.

## When not to use

- Not a medical device. Not a DXA order, densitometry prescription, or osteoporosis diagnosis. magent does not weigh the patient.
- Cadarette 2000 ORAI only (age, weight, current estrogen). Not Koh 2001 OSTA and not FRAX.
- Selection tool for bone densitometry: women with a total score of 9 or greater would be selected. Not a T-score, fracture probability, or treatment threshold.
- Derived in women aged 45 years or older. Age 45–54 scores 0 (published band). Not for men.

## Formula

```
ORAI = age_score + weight_score + estrogen_score; age >=75 -> 15, 65-74 -> 9, 55-64 -> 5, 45-54 -> 0; weight <60 kg -> 9, 60-69 kg -> 3, >=70 kg -> 0; current_estrogen false -> 2, true -> 0; max 26; select_for_dxa iff score>=9
```

## Citation

[Development and validation of the Osteoporosis Risk Assessment Instrument to facilitate selection of women for bone densitometry](https://pubmed.ncbi.nlm.nih.gov/10813010)
Cadarette SM, Jaglal SB, Kreiger N, McIsaac WJ, Darlington GA, Tu JV
CMAJ. 2000;162(9):1289-1294
DOI: none

## Worked example

### Age 70, 65 kg, current estrogen (select)

Given: `age=70, current_estrogen=true, weight_kg=65`

1. Age 70 is 65–74 → 9; weight 65 kg is 60–69 → 3; current estrogen true → 0
2. Score = 12 (published max 26); orai_band select_for_dxa. Not a DXA order.


### Age 50, 75 kg, current estrogen (below threshold)

Given: `age=50, current_estrogen=true, weight_kg=75`

1. Age 50 is 45–54 → 0; weight 75 kg is ≥70 → 0; current estrogen true → 0
2. Score = 0; orai_band do_not_select


### Age ≥75, weight ≥70 kg, no estrogen (select)

Given: `age=80, current_estrogen=false, weight_kg=75`

1. Age 80 is ≥75 → 15; weight 75 kg is ≥70 → 0; current estrogen false → 2
2. Score = 17; orai_band select_for_dxa (age ≥75 is always ≥9)


## Also searched as

- ORAI
- Osteoporosis Risk Assessment Instrument
- Cadarette ORAI
- Cadarette 2000
- bone densitometry selection
- ORAI score
- osteoporosis densitometry score
- select for DXA

## Parameters

- `age` (integer, required): Age in years (integer 45-120). Cadarette 2000 ORAI Table 4: 45-54 scores 0; 55-64 scores 5; 65-74 scores 9; >=75 scores 15. Derivation starts at 45; not the adult 18-120 clamp.
- `weight_kg` (number, optional): Body weight in kilograms (1-500). Provide weight_kg or weight_lb. Cadarette 2000 Table 4: <60 kg scores 9; 60-69 kg scores 3; >=70 kg scores 0. 60.0 and 69.0 score 3; 70.0 scores 0. magent does not weigh the patient.
- `weight_lb` (number, optional): Body weight in pounds (2-1100). Converted as kg = lb × 0.45359237, then Cadarette 2000 Table 4 kg bands apply. Provide weight_kg or weight_lb.
- `current_estrogen` (boolean, required): Current estrogen use (Cadarette 2000 Table 4). true scores 0; false scores 2. true or false.

## 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/orai`
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": "70",
      "current_estrogen": "true",
      "weight_kg": "65"
    },
    {
      "age": "70",
      "current_estrogen": "true",
      "weight_kg": "65"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/orai",
  "items": [
    {
      "components": [
        {
          "value": 70,
          "factor": "age",
          "points": 9,
          "present": true
        },
        {
          "value": 65.0,
          "factor": "weight",
          "points": 3,
          "present": true
        },
        {
          "value": true,
          "factor": "no_current_estrogen",
          "points": 0,
          "present": false
        }
      ],
      "age": 70,
      "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": "Cadarette SM, Jaglal SB, Kreiger N, McIsaac WJ, Darlington GA, Tu JV",
        "id": "cadarette-2000",
        "pmid": "10813010",
        "source": "CMAJ. 2000;162(9):1289-1294",
        "title": "Development and validation of the Osteoporosis Risk Assessment Instrument to facilitate selection of women for bone densitometry"
      },
      "formula": "orai",
      "formula_expression": "ORAI = age_score + weight_score + estrogen_score; age >=75 -> 15, 65-74 -> 9, 55-64 -> 5, 45-54 -> 0; weight <60 kg -> 9, 60-69 kg -> 3, >=70 kg -> 0; current_estrogen false -> 2, true -> 0; max 26; select_for_dxa iff score>=9",
      "max_score": 26,
      "score": 12,
      "weight_kg": 65.0,
      "age_score": 9,
      "current_estrogen": true,
      "estrogen_score": 0,
      "orai_band": "select_for_dxa",
      "weight_score": 3
    },
    {
      "components": [
        {
          "value": 70,
          "factor": "age",
          "points": 9,
          "present": true
        },
        {
          "value": 65.0,
          "factor": "weight",
          "points": 3,
          "present": true
        },
        {
          "value": true,
          "factor": "no_current_estrogen",
          "points": 0,
          "present": false
        }
      ],
      "age": 70,
      "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": "Cadarette SM, Jaglal SB, Kreiger N, McIsaac WJ, Darlington GA, Tu JV",
        "id": "cadarette-2000",
        "pmid": "10813010",
        "source": "CMAJ. 2000;162(9):1289-1294",
        "title": "Development and validation of the Osteoporosis Risk Assessment Instrument to facilitate selection of women for bone densitometry"
      },
      "formula": "orai",
      "formula_expression": "ORAI = age_score + weight_score + estrogen_score; age >=75 -> 15, 65-74 -> 9, 55-64 -> 5, 45-54 -> 0; weight <60 kg -> 9, 60-69 kg -> 3, >=70 kg -> 0; current_estrogen false -> 2, true -> 0; max 26; select_for_dxa iff score>=9",
      "max_score": 26,
      "score": 12,
      "weight_kg": 65.0,
      "age_score": 9,
      "current_estrogen": true,
      "estrogen_score": 0,
      "orai_band": "select_for_dxa",
      "weight_score": 3
    }
  ]
}
```

## Response fields

- `formula` (string): orai
- `formula_expression` (string): Exact Cadarette 2000 Table 4 ORAI expression
- `score` (integer): ORAI points; published range 0-26
- `max_score` (integer): 26 (15 + 9 + 2)
- `orai_band` (string): select_for_dxa if score ≥9, do_not_select if score <9. Cadarette 2000 selection for bone densitometry, not a DXA order.
- `age` (integer): Caller-supplied age in years used for the age band
- `weight_kg` (number): Normalized weight in kg used for the weight band
- `current_estrogen` (boolean): Caller-supplied current estrogen use; true scores 0, false scores 2
- `age_score` (integer): Age band points: 0 (45-54), 5 (55-64), 9 (65-74), or 15 (≥75)
- `weight_score` (integer): Weight band points: 9 (<60 kg), 3 (60-69 kg), or 0 (≥70 kg)
- `estrogen_score` (integer): 2 if current estrogen is false, else 0
- `components` (array): Per-factor points
- `citation` (object): Cadarette 2000 CMAJ citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 70,
      "factor": "age",
      "points": 9,
      "present": true
    },
    {
      "value": 65.0,
      "factor": "weight",
      "points": 3,
      "present": true
    },
    {
      "value": true,
      "factor": "no_current_estrogen",
      "points": 0,
      "present": false
    }
  ],
  "age": 70,
  "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": "Cadarette SM, Jaglal SB, Kreiger N, McIsaac WJ, Darlington GA, Tu JV",
    "id": "cadarette-2000",
    "pmid": "10813010",
    "source": "CMAJ. 2000;162(9):1289-1294",
    "title": "Development and validation of the Osteoporosis Risk Assessment Instrument to facilitate selection of women for bone densitometry"
  },
  "formula": "orai",
  "formula_expression": "ORAI = age_score + weight_score + estrogen_score; age >=75 -> 15, 65-74 -> 9, 55-64 -> 5, 45-54 -> 0; weight <60 kg -> 9, 60-69 kg -> 3, >=70 kg -> 0; current_estrogen false -> 2, true -> 0; max 26; select_for_dxa iff score>=9",
  "max_score": 26,
  "score": 12,
  "weight_kg": 65.0,
  "age_score": 9,
  "current_estrogen": true,
  "estrogen_score": 0,
  "orai_band": "select_for_dxa",
  "weight_score": 3
}
```

## Errors

- HTTP 400 `invalid_orai_age`: age must be an integer from 45 through 120 (Cadarette 2000 ORAI Table 4; derivation starts at 45). Returned before settlement; you are not charged.
- HTTP 400 `invalid_weight`: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.
- HTTP 400 `invalid_flag`: boolean clinical flags must be true or false 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

- [OSTA](https://magentlab.com/docs/osta) — Compute the Koh 2001 Osteoporosis Self-Assessment Tool for Asians (OSTA) as trunc(0.2 × (weight_kg − age)) toward zero, then the published low, intermediate, or high band.
- [MUST](https://magentlab.com/docs/must) — Sum Stratton 2004 MUST (BMI, unplanned weight-loss percent, and acute disease with no nutritional intake >5 days) and return score 0–6 with risk low, medium, or high.

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