Emergency · LIVE
ASDAS-ESR (Ankylosing Spondylitis Disease Activity Score)
ASDAS-ESR
Compute the Lukas 2009 ASDAS-ESR from caller-assigned BASDAI 0–10 back pain, morning stiffness duration, peripheral pain/swelling, patient global, and ESR in mm/h.
Markdown: /docs/asdas-esr.md · Canonical: https://magentlab.com/docs/asdas-esr
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute the Lukas 2009 ASDAS-ESR from caller-assigned BASDAI 0–10 back pain, morning stiffness duration, peripheral pain/swelling, patient global, and ESR in mm/h.
When to use
When an agent already has caller-assigned 0–10 BASDAI items (questions 2, 3, and 6), a 0–10 patient global, and ESR in mm/h and needs the published 2009 ASDAS-ESR, not ASDAS-CRP and not a BASDAI total.
When not to use
- Not a medical device and not a biologic order.
- magent does not examine the patient or assay ESR. back_pain, morning_stiffness_duration, patient_global, and peripheral_pain_swelling are caller-assigned 0–10 VAS/NRS items. morning_stiffness_duration is BASDAI question 6 on 0–10, not hours. ESR is mm/h as published. The 0–150 ESR range is a magent clamp.
- Computes ASDAS-ESR only. Does not compute ASDAS-CRP. Not a BASDAI total (does not use BASDAI questions 1, 4, or 5).
- Lukas 2009 published the development formula and did not publish inactive/low/high/very-high cuts. magent does not apply Machado 2011 1.3/2.1/3.5 bands or a later CRP 2 mg/L floor (this tool uses ESR).
Formula
ASDAS-ESR = 0.08*back_pain + 0.07*morning_stiffness_duration + 0.11*patient_global + 0.09*peripheral_pain_swelling + 0.29*sqrt(esr_mm_h); Lukas 2009 development formula; BASDAI 0-10 items (Q2 back pain, Q6 stiffness duration, Q3 peripheral pain/swelling) and patient global 0-10; ESR mm/h; not ASDAS-CRP; not BASDAI total; no Machado 2011 1.3/2.1/3.5 cuts; magent does not examine the patient or assay ESR
Citation
- Authors
- Lukas C, Landewé R, Sieper J, Dougados M, Davis J, Braun J, van der Linden S, van der Heijde D
- Source
- Ann Rheum Dis. 2009;68(1):18-24
Worked example
All zeros isolate sqrt(ESR) at ESR 0 mm/h
Given:
back_pain=0esr_mm_h=0morning_stiffness_duration=0patient_global=0peripheral_pain_swelling=0
- BASDAI 0-10 terms are 0; ESR 0 mm/h
- 0.29*sqrt(0) = 0
- score 0.00
Clinical zeros isolate 0.29*sqrt(ESR) at ESR 100 mm/h
Given:
back_pain=0esr_mm_h=100morning_stiffness_duration=0patient_global=0peripheral_pain_swelling=0
- 0.29*sqrt(100) = 0.29*10
- score 2.90
Also searched as
- ASDAS ESR
- ASDAS-ESR
- ankylosing spondylitis disease activity score ESR
- ASAS ASDAS ESR
- Lukas ASDAS
- axial spondyloarthritis ASDAS ESR
- BASDAI ESR ASDAS
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/asdas_esr?back_pain=0&morning_stiffness_duration=0&patient_global=0&peripheral_pain_swelling=0&esr_mm_h=0
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/asdas_esr?back_pain=0&morning_stiffness_duration=0&patient_global=0&peripheral_pain_swelling=0&esr_mm_h=0"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
back_pain |
number | required | Caller-assigned total back pain on a 0-10 VAS or NRS (Lukas 2009; BASDAI question 2, neck/back/hip pain). Number 0-10. magent does not examine the patient. |
morning_stiffness_duration |
number | required | Caller-assigned duration of morning stiffness on a 0-10 VAS or NRS (Lukas 2009; BASDAI question 6). Number 0-10, not hours. magent does not examine the patient. |
patient_global |
number | required | Caller-assigned patient global assessment of disease activity on a 0-10 VAS or NRS (Lukas 2009). Number 0-10. magent does not examine the patient. |
peripheral_pain_swelling |
number | required | Caller-assigned peripheral pain/swelling on a 0-10 VAS or NRS (Lukas 2009; BASDAI question 3, joints other than neck/back/hips). Number 0-10. magent does not examine the patient. |
esr_mm_h |
number | required | Caller-assigned erythrocyte sedimentation rate in mm/h (Lukas 2009). Number 0-150 is a magent clamp. magent does not assay ESR. |
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": [
{
"back_pain": "0",
"esr_mm_h": "0",
"morning_stiffness_duration": "0",
"patient_global": "0",
"peripheral_pain_swelling": "0"
},
{
"back_pain": "0",
"esr_mm_h": "0",
"morning_stiffness_duration": "0",
"patient_global": "0",
"peripheral_pain_swelling": "0"
}
]
}
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/asdas_esr",
"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": "Lukas C, Landewé R, Sieper J, Dougados M, Davis J, Braun J, van der Linden S, van der Heijde D",
"doi": "10.1136/ard.2008.094870",
"id": "lukas-2009",
"pmid": "18625618",
"source": "Ann Rheum Dis. 2009;68(1):18-24",
"title": "Development of an ASAS-endorsed disease activity score (ASDAS) in patients with ankylosing spondylitis"
},
"formula": "asdas_esr",
"formula_expression": "ASDAS-ESR = 0.08*back_pain + 0.07*morning_stiffness_duration + 0.11*patient_global + 0.09*peripheral_pain_swelling + 0.29*sqrt(esr_mm_h); Lukas 2009 development formula; BASDAI 0-10 items (Q2 back pain, Q6 stiffness duration, Q3 peripheral pain/swelling) and patient global 0-10; ESR mm/h; not ASDAS-CRP; not BASDAI total; no Machado 2011 1.3/2.1/3.5 cuts; magent does not examine the patient or assay ESR",
"score": 0.0,
"back_pain": 0.0,
"morning_stiffness_duration": 0.0,
"patient_global": 0.0,
"peripheral_pain_swelling": 0.0,
"esr_mm_h": 0.0
},
{
"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": "Lukas C, Landewé R, Sieper J, Dougados M, Davis J, Braun J, van der Linden S, van der Heijde D",
"doi": "10.1136/ard.2008.094870",
"id": "lukas-2009",
"pmid": "18625618",
"source": "Ann Rheum Dis. 2009;68(1):18-24",
"title": "Development of an ASAS-endorsed disease activity score (ASDAS) in patients with ankylosing spondylitis"
},
"formula": "asdas_esr",
"formula_expression": "ASDAS-ESR = 0.08*back_pain + 0.07*morning_stiffness_duration + 0.11*patient_global + 0.09*peripheral_pain_swelling + 0.29*sqrt(esr_mm_h); Lukas 2009 development formula; BASDAI 0-10 items (Q2 back pain, Q6 stiffness duration, Q3 peripheral pain/swelling) and patient global 0-10; ESR mm/h; not ASDAS-CRP; not BASDAI total; no Machado 2011 1.3/2.1/3.5 cuts; magent does not examine the patient or assay ESR",
"score": 0.0,
"back_pain": 0.0,
"morning_stiffness_duration": 0.0,
"patient_global": 0.0,
"peripheral_pain_swelling": 0.0,
"esr_mm_h": 0.0
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | asdas_esr |
formula_expression |
string | Exact expression used |
score |
number | Lukas 2009 ASDAS-ESR, 2 decimals. 0.08*back_pain+0.07*morning_stiffness_duration+0.11*patient_global+0.09*peripheral_pain_swelling+0.29*sqrt(esr_mm_h) |
back_pain |
number | Back pain 0-10 used |
morning_stiffness_duration |
number | Morning stiffness duration 0-10 used |
patient_global |
number | Patient global 0-10 used |
peripheral_pain_swelling |
number | Peripheral pain/swelling 0-10 used |
esr_mm_h |
number | ESR in mm/h used |
citation |
object | Lukas et al. Ann Rheum Dis 2009 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": "Lukas C, Landewé R, Sieper J, Dougados M, Davis J, Braun J, van der Linden S, van der Heijde D",
"doi": "10.1136/ard.2008.094870",
"id": "lukas-2009",
"pmid": "18625618",
"source": "Ann Rheum Dis. 2009;68(1):18-24",
"title": "Development of an ASAS-endorsed disease activity score (ASDAS) in patients with ankylosing spondylitis"
},
"formula": "asdas_esr",
"formula_expression": "ASDAS-ESR = 0.08*back_pain + 0.07*morning_stiffness_duration + 0.11*patient_global + 0.09*peripheral_pain_swelling + 0.29*sqrt(esr_mm_h); Lukas 2009 development formula; BASDAI 0-10 items (Q2 back pain, Q6 stiffness duration, Q3 peripheral pain/swelling) and patient global 0-10; ESR mm/h; not ASDAS-CRP; not BASDAI total; no Machado 2011 1.3/2.1/3.5 cuts; magent does not examine the patient or assay ESR",
"score": 0.0,
"back_pain": 0.0,
"morning_stiffness_duration": 0.0,
"patient_global": 0.0,
"peripheral_pain_swelling": 0.0,
"esr_mm_h": 0.0
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_asdas_esr |
ASDAS-ESR inputs must match Lukas 2009 back pain, stiffness, patient global, peripheral complaints, and ESR from that paper. 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
- ASDAS-CRP — Compute the van der Heijde 2009 ASAS-preferred ASDAS-CRP from caller-assigned BASDAI 0–10 back pain, morning stiffness duration, peripheral pain/swelling, patient global, and CRP in mg/L.
- ASAS axial SpA — Apply the 2009 ASAS classification criteria for axial spondyloarthritis (Rudwaleit set 3a / figure 2): require chronic back pain ≥3 months with age at onset <45, then return whether the imaging arm (sacroiliitis plus ≥1 SpA feature) or the clinical arm (HLA-B27 plus ≥2 other SpA features) classifies axial SpA. Not a diagnosis.
- DAS28-ESR — Compute the Prevoo 1995 28-joint DAS with ESR from caller-assigned tender and swollen 28-joint counts, ESR in mm/h, and patient general health on a 0-100 mm VAS. Returns the published score only.
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.