Emergency · LIVE
DIRE score (Belgrade 2006)
DIRE
Sum Belgrade 2006 DIRE as Diagnosis + Intractability + Risk + Efficacy. Diagnosis, Intractability, and Efficacy are caller-assigned 1-3. Risk is the sum of Psychological, Chemical, Reliability, and Social support (each 1-3, so Risk 4-12). Total 7-21. Return whether the published score >= 14 cut for long-term opioid maintenance suitability is met.
Markdown: /docs/dire.md · Canonical: https://magentlab.com/docs/dire
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Sum Belgrade 2006 DIRE as Diagnosis + Intractability + Risk + Efficacy. Diagnosis, Intractability, and Efficacy are caller-assigned 1-3. Risk is the sum of Psychological, Chemical, Reliability, and Social support (each 1-3, so Risk 4-12). Total 7-21. Return whether the published score >= 14 cut for long-term opioid maintenance suitability is met.
When to use
When an agent already has Belgrade 2006 1-3 integers for Diagnosis, Intractability, the four Risk subcategories, and Efficacy and needs the published 7-21 total and >=14 suitability cut. magent does not take a pain history, diagnose opioid use disorder, or write an opioid prescription or taper.
When not to use
- Not a medical device.
- Not an opioid prescription or taper order. magent does not start, stop, or dose opioids.
- Each of Diagnosis, Intractability, Efficacy, and the four Risk subcategories is a caller-assigned integer 1-3. magent does not take a pain history or interview the patient.
- Belgrade 2006 only. Score 14-21 more suitable for long-term opioid maintenance; 7-13 less suitable. Not a diagnosis of opioid use disorder.
Formula
DIRE = diagnosis + intractability + risk + efficacy; diagnosis, intractability, and efficacy each caller-assigned 1-3; risk = psychological + chemical + reliability + social_support (each 1-3, so risk 4-12); total 7-21; Belgrade 2006; score 14-21 more suitable for long-term opioid maintenance, 7-13 less suitable
Citation
- Authors
- Belgrade MJ, Schamber CD, Lindgren BR
- Source
- J Pain. 2006;7(9):671-681
Worked example
All items 1
Given:
chemical=1diagnosis=1efficacy=1intractability=1psychological=1reliability=1social_support=1
- diagnosis 1 + intractability 1 + risk 4 (four subcategories at 1) + efficacy 1
- Score = 7 (max 21); suitable_candidate false (7-13 less suitable)
All items 3
Given:
chemical=3diagnosis=3efficacy=3intractability=3psychological=3reliability=3social_support=3
- diagnosis 3 + intractability 3 + risk 12 (four subcategories at 3) + efficacy 3
- Score = 21 (max 21); suitable_candidate true (14-21 more suitable). Not an opioid prescription.
Also searched as
- DIRE score
- DIRE
- Diagnosis Intractability Risk Efficacy
- Belgrade DIRE
- DIRE opioid treatment
- DIRE chronic pain
- Belgrade 2006 DIRE score
- opioid maintenance suitability
- DIRE score for opioid treatment
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/dire?diagnosis=1&intractability=1&psychological=1&chemical=1&reliability=1&social_support=1&efficacy=1
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/dire?diagnosis=1&intractability=1&psychological=1&chemical=1&reliability=1&social_support=1&efficacy=1"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
diagnosis |
integer | required | Caller-assigned Belgrade 2006 Diagnosis (integer 1-3): 1 benign chronic condition with minimal objective findings or no definite diagnosis; 2 slowly progressive condition concordant with moderate pain, or fixed deficit; 3 advanced condition concordant with severe pain with objective findings. magent does not take a pain history. |
intractability |
integer | required | Caller-assigned Belgrade 2006 Intractability (integer 1-3): 1 few therapies tried and the patient is passively involved; 2 most appropriate treatments tried with inadequate response and the patient is reasonably involved; 3 patient fully engaged in appropriate treatments with inadequate response. magent does not take a pain history. |
psychological |
integer | required | Caller-assigned Belgrade 2006 Risk subcategory Psychological (integer 1-3): 1 serious personality dysfunction or mental illness interfering with care; 2 personality or mental health interferes moderately; 3 good psychological functioning. One of four Risk items (Risk 4-12). magent does not interview the patient. |
chemical |
integer | required | Caller-assigned Belgrade 2006 Risk subcategory Chemical (integer 1-3): 1 active or recent substance abuse; 2 chemical coper or history of chemical dependence in remission; 3 no chemical-dependence history. One of four Risk items (Risk 4-12). magent does not interview the patient. |
reliability |
integer | required | Caller-assigned Belgrade 2006 Risk subcategory Reliability (integer 1-3): 1 many missed appointments, lacks insight, or poor observer of laws and rules; 2 generally reliable; 3 highly reliable. One of four Risk items (Risk 4-12). magent does not interview the patient. |
social_support |
integer | required | Caller-assigned Belgrade 2006 Risk subcategory Social support (integer 1-3): 1 life in chaos, few resources, close relationships dysfunctional; 2 relationships exist but are strained; 3 stable supportive relationships and sufficient resources. One of four Risk items (Risk 4-12). magent does not interview the patient. |
efficacy |
integer | required | Caller-assigned Belgrade 2006 Efficacy (integer 1-3): 1 poor function or minimal pain relief despite moderate-to-high doses; 2 moderate benefit with moderate function on moderate doses; 3 good function and pain relief on stable low-to-moderate doses. magent does not take a pain history or write an opioid prescription. |
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.
- 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": [
{
"chemical": "1",
"diagnosis": "1",
"efficacy": "1",
"intractability": "1",
"psychological": "1",
"reliability": "1",
"social_support": "1"
},
{
"chemical": "1",
"diagnosis": "1",
"efficacy": "1",
"intractability": "1",
"psychological": "1",
"reliability": "1",
"social_support": "1"
}
]
}
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/dire",
"items": [
{
"reliability": 1,
"components": [
{
"value": 1,
"factor": "diagnosis",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "intractability",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "psychological",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "chemical",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "reliability",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "social_support",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "efficacy",
"points": 1,
"present": true
}
],
"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": "Belgrade MJ, Schamber CD, Lindgren BR",
"doi": "10.1016/j.jpain.2006.03.001",
"id": "belgrade-2006",
"pmid": "16942953",
"source": "J Pain. 2006;7(9):671-681",
"title": "The DIRE score: predicting outcomes of opioid prescribing for chronic pain"
},
"formula": "dire",
"formula_expression": "DIRE = diagnosis + intractability + risk + efficacy; diagnosis, intractability, and efficacy each caller-assigned 1-3; risk = psychological + chemical + reliability + social_support (each 1-3, so risk 4-12); total 7-21; Belgrade 2006; score 14-21 more suitable for long-term opioid maintenance, 7-13 less suitable",
"max_score": 21,
"score": 7,
"risk": 4,
"diagnosis": 1,
"chemical": 1,
"efficacy": 1,
"intractability": 1,
"psychological": 1,
"social_support": 1,
"suitable_candidate": false
},
{
"reliability": 1,
"components": [
{
"value": 1,
"factor": "diagnosis",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "intractability",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "psychological",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "chemical",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "reliability",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "social_support",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "efficacy",
"points": 1,
"present": true
}
],
"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": "Belgrade MJ, Schamber CD, Lindgren BR",
"doi": "10.1016/j.jpain.2006.03.001",
"id": "belgrade-2006",
"pmid": "16942953",
"source": "J Pain. 2006;7(9):671-681",
"title": "The DIRE score: predicting outcomes of opioid prescribing for chronic pain"
},
"formula": "dire",
"formula_expression": "DIRE = diagnosis + intractability + risk + efficacy; diagnosis, intractability, and efficacy each caller-assigned 1-3; risk = psychological + chemical + reliability + social_support (each 1-3, so risk 4-12); total 7-21; Belgrade 2006; score 14-21 more suitable for long-term opioid maintenance, 7-13 less suitable",
"max_score": 21,
"score": 7,
"risk": 4,
"diagnosis": 1,
"chemical": 1,
"efficacy": 1,
"intractability": 1,
"psychological": 1,
"social_support": 1,
"suitable_candidate": false
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | dire |
formula_expression |
string | Exact expression used |
score |
integer | Belgrade 2006 DIRE points 7-21 (Diagnosis + Intractability + Risk + Efficacy) |
max_score |
integer | Always 21 |
suitable_candidate |
boolean | true iff score >= 14 (Belgrade 2006 more suitable for long-term opioid maintenance). Not an opioid prescription or taper order. |
diagnosis |
integer | Caller-assigned Diagnosis points 1-3 |
intractability |
integer | Caller-assigned Intractability points 1-3 |
psychological |
integer | Caller-assigned Psychological Risk points 1-3 |
chemical |
integer | Caller-assigned Chemical Risk points 1-3 |
reliability |
integer | Caller-assigned Reliability Risk points 1-3 |
social_support |
integer | Caller-assigned Social support Risk points 1-3 |
efficacy |
integer | Caller-assigned Efficacy points 1-3 |
risk |
integer | Belgrade 2006 Risk 4-12: psychological + chemical + reliability + social_support |
components |
array | Per-item caller-assigned points |
citation |
object | Belgrade et al. J Pain 2006 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"reliability": 1,
"components": [
{
"value": 1,
"factor": "diagnosis",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "intractability",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "psychological",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "chemical",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "reliability",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "social_support",
"points": 1,
"present": true
},
{
"value": 1,
"factor": "efficacy",
"points": 1,
"present": true
}
],
"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": "Belgrade MJ, Schamber CD, Lindgren BR",
"doi": "10.1016/j.jpain.2006.03.001",
"id": "belgrade-2006",
"pmid": "16942953",
"source": "J Pain. 2006;7(9):671-681",
"title": "The DIRE score: predicting outcomes of opioid prescribing for chronic pain"
},
"formula": "dire",
"formula_expression": "DIRE = diagnosis + intractability + risk + efficacy; diagnosis, intractability, and efficacy each caller-assigned 1-3; risk = psychological + chemical + reliability + social_support (each 1-3, so risk 4-12); total 7-21; Belgrade 2006; score 14-21 more suitable for long-term opioid maintenance, 7-13 less suitable",
"max_score": 21,
"score": 7,
"risk": 4,
"diagnosis": 1,
"chemical": 1,
"efficacy": 1,
"intractability": 1,
"psychological": 1,
"social_support": 1,
"suitable_candidate": false
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_dire |
DIRE score inputs must be integers in the Belgrade 2006 published 1-3 range for diagnosis, intractability, risk subcategories, and efficacy. 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
- ORT — Sum Webster 2005 Table 1 Opioid Risk Tool item weights for the assigned sex and return the published low, moderate, or high category.
- Morphine milligram equivalents — Compute morphine milligram equivalents from a CDC 2022 table opioid and daily dose (or transdermal fentanyl mcg/hr).
- PEG — Compute the Krebs 2009 PEG as the unweighted mean of three caller-assigned 0-10 integers (pain_average, enjoyment_of_life, general_activity). Potential range 0-10. Krebs 2009 did not publish a diagnostic cutoff.
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.