# ORT-OUD (Cheatle 2019)

ORT-OUD

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

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

## What it computes

Sum nine unweighted Cheatle 2019 ORT-OUD yes/no flags and return oud_class non_oud (0-2) or oud (>=3).

## When to use

When an agent has already assigned the nine Cheatle 2019 flags and needs the published unweighted 0-9 total and cutoff, not Webster 2005 weighted ORT, not an interview, and not a diagnosis of opioid use disorder.

## When not to use

- Not a medical device.
- Not a diagnosis of opioid use disorder (OUD).
- Not Webster 2005 weighted ORT (that is magent slug ort). Cheatle 2019 dropped sex-specific weights and the preadolescent sexual abuse item.
- Cheatle 2019 enrolled only Caucasian patients of European descent (parent-study genotype design). That is a population limit, not a race coefficient; magent does not take a race input.
- The caller assigns each flag. magent does not interview the patient.
- Flags are PHI-adjacent. Persist them only encrypted for the allowlisted console.
- Age 16-45 is a yes/no flag, not a numeric age. ADD, OCD, bipolar disorder, or schizophrenia is one flag.

## Formula

```
ORT-OUD = family_alcohol + family_illegal_drugs + family_prescription_drugs + personal_alcohol + personal_illegal_drugs + personal_prescription_drugs + age_16_to_45 + add_ocd_bipolar_schizophrenia + depression; each 1; Cheatle 2019; max 9; oud_class non_oud 0-2, oud >=3; no sex; no preadolescent_sexual_abuse
```

## Citation

[Development of the Revised Opioid Risk Tool to Predict Opioid Use Disorder in Patients with Chronic Nonmalignant Pain.](https://doi.org/10.1016/j.jpain.2019.01.011)
Cheatle MD, Compton PA, Dhingra L, Wasser TE, O'Brien CP
J Pain. 2019;20(7):842-851 (Epub 2019 Jan 26)
DOI: [10.1016/j.jpain.2019.01.011](https://doi.org/10.1016/j.jpain.2019.01.011)

## Worked example

### All flags false

Given: `add_ocd_bipolar_schizophrenia=false, age_16_to_45=false, depression=false, family_alcohol=false, family_illegal_drugs=false, family_prescription_drugs=false, personal_alcohol=false, personal_illegal_drugs=false, personal_prescription_drugs=false`

1. every Cheatle 2019 item absent → 0
2. score = 0; oud_class non_oud


### Depression, age 16-45, and family alcohol (cutoff)

Given: `add_ocd_bipolar_schizophrenia=false, age_16_to_45=true, depression=true, family_alcohol=true, family_illegal_drugs=false, family_prescription_drugs=false, personal_alcohol=false, personal_illegal_drugs=false, personal_prescription_drugs=false`

1. depression 1 + age_16_to_45 1 + family_alcohol 1
2. score = 3; oud_class oud


## Also searched as

- ORT-OUD
- revised opioid risk tool
- Cheatle ORT
- Cheatle 2019 opioid risk
- unweighted opioid risk tool
- ORT OUD score

## Parameters

- `family_alcohol` (boolean, required): Family history of alcohol abuse as assigned by the caller (Cheatle 2019). true scores 1. magent does not interview the patient.
- `family_illegal_drugs` (boolean, required): Family history of illegal-drug abuse as assigned by the caller (Cheatle 2019). true scores 1. true or false.
- `family_prescription_drugs` (boolean, required): Family history of prescription-drug abuse as assigned by the caller (Cheatle 2019). true scores 1. true or false.
- `personal_alcohol` (boolean, required): Personal history of alcohol abuse as assigned by the caller (Cheatle 2019). true scores 1. magent does not interview the patient.
- `personal_illegal_drugs` (boolean, required): Personal history of illegal-drug abuse as assigned by the caller (Cheatle 2019). true scores 1. true or false.
- `personal_prescription_drugs` (boolean, required): Personal history of prescription-drug abuse as assigned by the caller (Cheatle 2019). true scores 1. true or false.
- `age_16_to_45` (boolean, required): Age 16-45 years as a flag, not a numeric age (Cheatle 2019). true scores 1. Assigned by the caller.
- `add_ocd_bipolar_schizophrenia` (boolean, required): ADD, OCD, bipolar disorder, or schizophrenia as one flag (Cheatle 2019). true scores 1. Assigned by the caller. magent does not diagnose.
- `depression` (boolean, required): Depression as assigned by the caller (Cheatle 2019). true scores 1. magent does not diagnose.

## 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/ort_oud`
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": [
    {
      "add_ocd_bipolar_schizophrenia": "false",
      "age_16_to_45": "false",
      "depression": "false",
      "family_alcohol": "false",
      "family_illegal_drugs": "false",
      "family_prescription_drugs": "false",
      "personal_alcohol": "false",
      "personal_illegal_drugs": "false",
      "personal_prescription_drugs": "false"
    },
    {
      "add_ocd_bipolar_schizophrenia": "false",
      "age_16_to_45": "false",
      "depression": "false",
      "family_alcohol": "false",
      "family_illegal_drugs": "false",
      "family_prescription_drugs": "false",
      "personal_alcohol": "false",
      "personal_illegal_drugs": "false",
      "personal_prescription_drugs": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/ort_oud",
  "items": [
    {
      "components": [
        {
          "factor": "family_alcohol",
          "points": 0,
          "present": false
        },
        {
          "factor": "family_illegal_drugs",
          "points": 0,
          "present": false
        },
        {
          "factor": "family_prescription_drugs",
          "points": 0,
          "present": false
        },
        {
          "factor": "personal_alcohol",
          "points": 0,
          "present": false
        },
        {
          "factor": "personal_illegal_drugs",
          "points": 0,
          "present": false
        },
        {
          "factor": "personal_prescription_drugs",
          "points": 0,
          "present": false
        },
        {
          "factor": "age_16_to_45",
          "points": 0,
          "present": false
        },
        {
          "factor": "add_ocd_bipolar_schizophrenia",
          "points": 0,
          "present": false
        },
        {
          "factor": "depression",
          "points": 0,
          "present": 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": "Cheatle MD, Compton PA, Dhingra L, Wasser TE, O'Brien CP",
        "doi": "10.1016/j.jpain.2019.01.011",
        "id": "cheatle-2019",
        "pmid": "30690168",
        "source": "J Pain. 2019;20(7):842-851 (Epub 2019 Jan 26)",
        "title": "Development of the Revised Opioid Risk Tool to Predict Opioid Use Disorder in Patients with Chronic Nonmalignant Pain."
      },
      "formula": "ort_oud",
      "formula_expression": "ORT-OUD = family_alcohol + family_illegal_drugs + family_prescription_drugs + personal_alcohol + personal_illegal_drugs + personal_prescription_drugs + age_16_to_45 + add_ocd_bipolar_schizophrenia + depression; each 1; Cheatle 2019; max 9; oud_class non_oud 0-2, oud >=3; no sex; no preadolescent_sexual_abuse",
      "max_score": 9,
      "score": 0,
      "oud_class": "non_oud"
    },
    {
      "components": [
        {
          "factor": "family_alcohol",
          "points": 0,
          "present": false
        },
        {
          "factor": "family_illegal_drugs",
          "points": 0,
          "present": false
        },
        {
          "factor": "family_prescription_drugs",
          "points": 0,
          "present": false
        },
        {
          "factor": "personal_alcohol",
          "points": 0,
          "present": false
        },
        {
          "factor": "personal_illegal_drugs",
          "points": 0,
          "present": false
        },
        {
          "factor": "personal_prescription_drugs",
          "points": 0,
          "present": false
        },
        {
          "factor": "age_16_to_45",
          "points": 0,
          "present": false
        },
        {
          "factor": "add_ocd_bipolar_schizophrenia",
          "points": 0,
          "present": false
        },
        {
          "factor": "depression",
          "points": 0,
          "present": 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": "Cheatle MD, Compton PA, Dhingra L, Wasser TE, O'Brien CP",
        "doi": "10.1016/j.jpain.2019.01.011",
        "id": "cheatle-2019",
        "pmid": "30690168",
        "source": "J Pain. 2019;20(7):842-851 (Epub 2019 Jan 26)",
        "title": "Development of the Revised Opioid Risk Tool to Predict Opioid Use Disorder in Patients with Chronic Nonmalignant Pain."
      },
      "formula": "ort_oud",
      "formula_expression": "ORT-OUD = family_alcohol + family_illegal_drugs + family_prescription_drugs + personal_alcohol + personal_illegal_drugs + personal_prescription_drugs + age_16_to_45 + add_ocd_bipolar_schizophrenia + depression; each 1; Cheatle 2019; max 9; oud_class non_oud 0-2, oud >=3; no sex; no preadolescent_sexual_abuse",
      "max_score": 9,
      "score": 0,
      "oud_class": "non_oud"
    }
  ]
}
```

## Response fields

- `formula` (string): ort_oud
- `formula_expression` (string): Exact expression used
- `score` (integer): Cheatle 2019 unweighted points 0-9
- `max_score` (integer): 9
- `oud_class` (string): Cheatle 2019 class: non_oud (score 0-2) or oud (score >=3). Integer cutoff for the paper's 2.5. Not Webster low/moderate/high. Not a diagnosis of opioid use disorder.
- `components` (array): Per-item unweighted points
- `citation` (object): Cheatle et al. Journal of Pain 2019 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "family_alcohol",
      "points": 0,
      "present": false
    },
    {
      "factor": "family_illegal_drugs",
      "points": 0,
      "present": false
    },
    {
      "factor": "family_prescription_drugs",
      "points": 0,
      "present": false
    },
    {
      "factor": "personal_alcohol",
      "points": 0,
      "present": false
    },
    {
      "factor": "personal_illegal_drugs",
      "points": 0,
      "present": false
    },
    {
      "factor": "personal_prescription_drugs",
      "points": 0,
      "present": false
    },
    {
      "factor": "age_16_to_45",
      "points": 0,
      "present": false
    },
    {
      "factor": "add_ocd_bipolar_schizophrenia",
      "points": 0,
      "present": false
    },
    {
      "factor": "depression",
      "points": 0,
      "present": 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": "Cheatle MD, Compton PA, Dhingra L, Wasser TE, O'Brien CP",
    "doi": "10.1016/j.jpain.2019.01.011",
    "id": "cheatle-2019",
    "pmid": "30690168",
    "source": "J Pain. 2019;20(7):842-851 (Epub 2019 Jan 26)",
    "title": "Development of the Revised Opioid Risk Tool to Predict Opioid Use Disorder in Patients with Chronic Nonmalignant Pain."
  },
  "formula": "ort_oud",
  "formula_expression": "ORT-OUD = family_alcohol + family_illegal_drugs + family_prescription_drugs + personal_alcohol + personal_illegal_drugs + personal_prescription_drugs + age_16_to_45 + add_ocd_bipolar_schizophrenia + depression; each 1; Cheatle 2019; max 9; oud_class non_oud 0-2, oud >=3; no sex; no preadolescent_sexual_abuse",
  "max_score": 9,
  "score": 0,
  "oud_class": "non_oud"
}
```

## Errors

- HTTP 400 `invalid_ort_oud`: ORT-OUD needs nine unweighted yes/no flags (Cheatle 2019; no preadolescent-sexual-abuse item). 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

- [ORT](https://magentlab.com/docs/ort) — Sum Webster 2005 Table 1 Opioid Risk Tool item weights for the assigned sex and return the published low, moderate, or high category.
- [COWS](https://magentlab.com/docs/cows) — Sum the eleven Wesson 2003 Clinical Opiate Withdrawal Scale (COWS) items from caller-assigned appendix integers and return the published total (max 48) with the published severity cutoffs.
- [PAWSS](https://magentlab.com/docs/pawss) — Apply the Maldonado 2014 PAWSS Part A threshold and ten yes/no items and return the published 0–10 total with the ≥4 high-risk band.

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