# ASDAS-CRP (Ankylosing Spondylitis Disease Activity Score)

ASDAS-CRP

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

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

## What it computes

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.

## 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 CRP in mg/L and needs the published 2009 ASDAS-CRP, not ASDAS-ESR 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 CRP. 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. CRP is mg/L as published. The 0–500 CRP range is a magent clamp.
- Computes ASDAS-CRP only. Does not compute ASDAS-ESR. Not a BASDAI total (does not use BASDAI questions 1, 4, or 5).
- van der Heijde 2009 selected the CRP version as preferred 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.

## Formula

```
ASDAS-CRP = 0.12*back_pain + 0.06*morning_stiffness_duration + 0.11*patient_global + 0.07*peripheral_pain_swelling + 0.58*ln(crp_mg_l+1); van der Heijde 2009 preferred CRP formula; BASDAI 0-10 items (Q2 back pain, Q6 stiffness duration, Q3 peripheral pain/swelling) and patient global 0-10; CRP mg/L; not ASDAS-ESR; not BASDAI total; no Machado 2011 1.3/2.1/3.5 cuts; magent does not examine the patient or assay CRP
```

## Citation

[ASDAS, a highly discriminatory ASAS-endorsed disease activity score in patients with ankylosing spondylitis](https://doi.org/10.1136/ard.2008.100826)
van der Heijde D, Lie E, Kvien TK, Sieper J, Van den Bosch F, Listing J, Braun J, Landewé R; ASAS
Ann Rheum Dis. 2009;68(12):1811-1818
DOI: [10.1136/ard.2008.100826](https://doi.org/10.1136/ard.2008.100826)

## Worked example

### All zeros isolate ln(CRP+1) at CRP 0 mg/L

Given: `back_pain=0, crp_mg_l=0, morning_stiffness_duration=0, patient_global=0, peripheral_pain_swelling=0`

1. BASDAI 0-10 terms are 0; CRP 0 mg/L (no 2009 floor)
2. 0.58*ln(0+1) = 0.58*ln(1) = 0
3. score 0.00


### Clinical zeros isolate 0.58*ln(CRP+1) at CRP 9 mg/L

Given: `back_pain=0, crp_mg_l=9, morning_stiffness_duration=0, patient_global=0, peripheral_pain_swelling=0`

1. 0.58*ln(9+1) = 0.58*ln(10)
2. score 1.34


## Also searched as

- ASDAS CRP
- ASDAS-CRP
- ankylosing spondylitis disease activity score CRP
- ASAS ASDAS CRP
- van der Heijde ASDAS
- axial spondyloarthritis ASDAS CRP
- BASDAI CRP ASDAS

## Parameters

- `back_pain` (number, required): Caller-assigned total back pain on a 0-10 VAS or NRS (van der Heijde 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 (van der Heijde 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 (van der Heijde 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 (van der Heijde 2009; BASDAI question 3, joints other than neck/back/hips). Number 0-10. magent does not examine the patient.
- `crp_mg_l` (number, required): Caller-assigned C-reactive protein in mg/L (van der Heijde 2009; not mg/dL). Number 0-500 is a magent clamp. The 2009 papers do not floor CRP at 2 mg/L. magent does not assay CRP.

## 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/asdas_crp`
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": [
    {
      "back_pain": "0",
      "crp_mg_l": "0",
      "morning_stiffness_duration": "0",
      "patient_global": "0",
      "peripheral_pain_swelling": "0"
    },
    {
      "back_pain": "0",
      "crp_mg_l": "0",
      "morning_stiffness_duration": "0",
      "patient_global": "0",
      "peripheral_pain_swelling": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/asdas_crp",
  "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": "van der Heijde D, Lie E, Kvien TK, Sieper J, Van den Bosch F, Listing J, Braun J, Landewé R; ASAS",
        "doi": "10.1136/ard.2008.100826",
        "id": "van-der-heijde-2009",
        "pmid": "19060001",
        "source": "Ann Rheum Dis. 2009;68(12):1811-1818",
        "title": "ASDAS, a highly discriminatory ASAS-endorsed disease activity score in patients with ankylosing spondylitis"
      },
      "formula": "asdas_crp",
      "formula_expression": "ASDAS-CRP = 0.12*back_pain + 0.06*morning_stiffness_duration + 0.11*patient_global + 0.07*peripheral_pain_swelling + 0.58*ln(crp_mg_l+1); van der Heijde 2009 preferred CRP formula; BASDAI 0-10 items (Q2 back pain, Q6 stiffness duration, Q3 peripheral pain/swelling) and patient global 0-10; CRP mg/L; not ASDAS-ESR; not BASDAI total; no Machado 2011 1.3/2.1/3.5 cuts; magent does not examine the patient or assay CRP",
      "score": 0.0,
      "crp_mg_l": 0.0,
      "back_pain": 0.0,
      "morning_stiffness_duration": 0.0,
      "patient_global": 0.0,
      "peripheral_pain_swelling": 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": "van der Heijde D, Lie E, Kvien TK, Sieper J, Van den Bosch F, Listing J, Braun J, Landewé R; ASAS",
        "doi": "10.1136/ard.2008.100826",
        "id": "van-der-heijde-2009",
        "pmid": "19060001",
        "source": "Ann Rheum Dis. 2009;68(12):1811-1818",
        "title": "ASDAS, a highly discriminatory ASAS-endorsed disease activity score in patients with ankylosing spondylitis"
      },
      "formula": "asdas_crp",
      "formula_expression": "ASDAS-CRP = 0.12*back_pain + 0.06*morning_stiffness_duration + 0.11*patient_global + 0.07*peripheral_pain_swelling + 0.58*ln(crp_mg_l+1); van der Heijde 2009 preferred CRP formula; BASDAI 0-10 items (Q2 back pain, Q6 stiffness duration, Q3 peripheral pain/swelling) and patient global 0-10; CRP mg/L; not ASDAS-ESR; not BASDAI total; no Machado 2011 1.3/2.1/3.5 cuts; magent does not examine the patient or assay CRP",
      "score": 0.0,
      "crp_mg_l": 0.0,
      "back_pain": 0.0,
      "morning_stiffness_duration": 0.0,
      "patient_global": 0.0,
      "peripheral_pain_swelling": 0.0
    }
  ]
}
```

## Response fields

- `formula` (string): asdas_crp
- `formula_expression` (string): Exact expression used
- `score` (number): van der Heijde 2009 ASDAS-CRP, 2 decimals. 0.12*back_pain+0.06*morning_stiffness_duration+0.11*patient_global+0.07*peripheral_pain_swelling+0.58*ln(crp_mg_l+1)
- `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
- `crp_mg_l` (number): CRP in mg/L used
- `citation` (object): van der Heijde et al. Ann Rheum Dis 2009 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": "van der Heijde D, Lie E, Kvien TK, Sieper J, Van den Bosch F, Listing J, Braun J, Landewé R; ASAS",
    "doi": "10.1136/ard.2008.100826",
    "id": "van-der-heijde-2009",
    "pmid": "19060001",
    "source": "Ann Rheum Dis. 2009;68(12):1811-1818",
    "title": "ASDAS, a highly discriminatory ASAS-endorsed disease activity score in patients with ankylosing spondylitis"
  },
  "formula": "asdas_crp",
  "formula_expression": "ASDAS-CRP = 0.12*back_pain + 0.06*morning_stiffness_duration + 0.11*patient_global + 0.07*peripheral_pain_swelling + 0.58*ln(crp_mg_l+1); van der Heijde 2009 preferred CRP formula; BASDAI 0-10 items (Q2 back pain, Q6 stiffness duration, Q3 peripheral pain/swelling) and patient global 0-10; CRP mg/L; not ASDAS-ESR; not BASDAI total; no Machado 2011 1.3/2.1/3.5 cuts; magent does not examine the patient or assay CRP",
  "score": 0.0,
  "crp_mg_l": 0.0,
  "back_pain": 0.0,
  "morning_stiffness_duration": 0.0,
  "patient_global": 0.0,
  "peripheral_pain_swelling": 0.0
}
```

## Errors

- HTTP 400 `invalid_asdas_crp`: ASDAS-CRP inputs must match van der Heijde 2009 back pain, stiffness, patient global, peripheral complaints, and CRP from that paper. 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

- [ASAS axial SpA](https://magentlab.com/docs/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-CRP](https://magentlab.com/docs/das28-crp) — Compute the Wells 2009 28-joint Disease Activity Score based on C-reactive protein from caller-assigned TJC28, SJC28, CRP in mg/L, and 0–100 mm general health, including the +0.96 constant, and return DAS28-defined remission when the score is <2.6.
- [SDAI](https://magentlab.com/docs/sdai) — Sum caller-assigned 28-joint swollen and tender counts, 0–10 cm patient and evaluator globals, and CRP in mg/dL, and return the Aletaha 2005 SDAI with the newly proposed activity state.

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