# QIDS-SR16

QIDS

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

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

## What it computes

Map 16 caller-assigned Rush 2003 QIDS-SR integers (0-3) to nine DSM-IV domains (sleep, appetite/weight, and psychomotor are each the published max of their items) and return the 0-27 total and IRT severity band.

## When to use

When an agent has already assigned Rush 2003 QIDS-SR 0-3 integers for all 16 items and needs the published nine-domain total, not a depression interview, QIDS-C, IDS-30, or PHQ-9.

## When not to use

- Not a medical device and not a depression diagnosis or treatment order.
- magent does not administer a depression interview. Each of the 16 items is a caller-assigned integer 0-3. magent does not interpret the items.
- This is Rush 2003 QIDS-SR16 only. Sleep is the maximum of four sleep items; appetite/weight is the maximum of four appetite and weight items; psychomotor is the maximum of retardation and agitation; the remaining six items add as published. magent does not score QIDS-C, IDS-30, or PHQ-9.
- Published IRT conversion bands from this paper are 0-5 none, 6-10 mild, 11-15 moderate, 16-20 severe, and 21-27 very_severe. These are not PHQ-9 5/10/15/20 cutoffs.

## Formula

```
QIDS-SR16 = max(sleep_onset, mid_nocturnal, early_morning, hypersomnia) + sad_mood + max(decreased_appetite, increased_appetite, decreased_weight, increased_weight) + concentration + self_view + suicidal_ideation + interest + energy + max(psychomotor_retardation, psychomotor_agitation); each caller-assigned 0-3; nine domains; max 27
```

## Citation

[The 16-Item Quick Inventory of Depressive Symptomatology (QIDS), clinician rating (QIDS-C), and self-report (QIDS-SR): a psychometric evaluation in patients with chronic major depression](https://doi.org/10.1016/s0006-3223(02)01866-8)
Rush AJ, Trivedi MH, Ibrahim HM, et al.
Biol Psychiatry. 2003;54(5):573-583
DOI: [10.1016/s0006-3223(02)01866-8](https://doi.org/10.1016/s0006-3223(02)01866-8)

## Worked example

### All items 0

Given: `concentration=0, decreased_appetite=0, decreased_weight=0, early_morning=0, energy=0, hypersomnia=0, increased_appetite=0, increased_weight=0, interest=0, mid_nocturnal=0, psychomotor_agitation=0, psychomotor_retardation=0, sad_mood=0, self_view=0, sleep_onset=0, suicidal_ideation=0`

1. Each domain is 0 (sleep max 0, appetite/weight max 0, psychomotor max 0, remaining items 0)
2. Score = 0 (max 27); severity none


### Sleep domain is the max of four items

Given: `concentration=0, decreased_appetite=0, decreased_weight=0, early_morning=2, energy=0, hypersomnia=0, increased_appetite=0, increased_weight=0, interest=0, mid_nocturnal=3, psychomotor_agitation=0, psychomotor_retardation=0, sad_mood=0, self_view=0, sleep_onset=1, suicidal_ideation=0`

1. sleep = max(1, 3, 2, 0) = 3 (not 1+3+2+0)
2. Remaining domains 0; score = 3; severity none


### All items 3

Given: `concentration=3, decreased_appetite=3, decreased_weight=3, early_morning=3, energy=3, hypersomnia=3, increased_appetite=3, increased_weight=3, interest=3, mid_nocturnal=3, psychomotor_agitation=3, psychomotor_retardation=3, sad_mood=3, self_view=3, sleep_onset=3, suicidal_ideation=3`

1. Nine domains each 3 (max-of-group, not 16×3)
2. Score = 27 (max 27); severity very_severe


## Also searched as

- QIDS
- QIDS-SR
- QIDS-SR16
- Quick Inventory of Depressive Symptomatology
- Rush QIDS
- 16-item QIDS
- QIDS self-report
- QIDS score

## Parameters

- `sleep_onset` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 1 (integer 0-3): falling asleep / initial insomnia over the prior 7 days. The sleep domain is the maximum of items 1-4, not the sum. magent does not interpret the item.
- `mid_nocturnal` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 2 (integer 0-3): sleep during the night / middle insomnia. The sleep domain is the maximum of items 1-4, not the sum. magent does not interpret the item.
- `early_morning` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 3 (integer 0-3): waking up too early / late insomnia. The sleep domain is the maximum of items 1-4, not the sum. magent does not interpret the item.
- `hypersomnia` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 4 (integer 0-3): sleeping too much. The sleep domain is the maximum of items 1-4, not the sum. magent does not interpret the item.
- `sad_mood` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 5 (integer 0-3): feeling sad. Adds as published (one domain). magent does not interpret the item.
- `decreased_appetite` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 6 (integer 0-3): decreased appetite. The appetite/weight domain is the maximum of items 6-9, not the sum. magent does not interpret the item.
- `increased_appetite` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 7 (integer 0-3): increased appetite. The appetite/weight domain is the maximum of items 6-9, not the sum. magent does not interpret the item.
- `decreased_weight` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 8 (integer 0-3): decreased weight. The appetite/weight domain is the maximum of items 6-9, not the sum. magent does not interpret the item.
- `increased_weight` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 9 (integer 0-3): increased weight. The appetite/weight domain is the maximum of items 6-9, not the sum. magent does not interpret the item.
- `concentration` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 10 (integer 0-3): concentration / decision making. Adds as published (one domain). magent does not interpret the item.
- `self_view` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 11 (integer 0-3): view of myself / self-criticism. Adds as published (one domain). magent does not interpret the item.
- `suicidal_ideation` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 12 (integer 0-3): thoughts of death or suicide. Adds as published (one domain). magent does not interpret the item.
- `interest` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 13 (integer 0-3): general interest. Adds as published (one domain). magent does not interpret the item.
- `energy` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 14 (integer 0-3): energy / fatigability. Adds as published (one domain). magent does not interpret the item.
- `psychomotor_retardation` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 15 (integer 0-3): feeling slowed down. The psychomotor domain is the maximum of items 15-16, not the sum. magent does not interpret the item.
- `psychomotor_agitation` (integer, required): Caller-assigned Rush 2003 QIDS-SR item 16 (integer 0-3): feeling restless. The psychomotor domain is the maximum of items 15-16, not the sum. magent does not interpret the item.

## 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/qids`
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": [
    {
      "concentration": "0",
      "decreased_appetite": "0",
      "decreased_weight": "0",
      "early_morning": "0",
      "energy": "0",
      "hypersomnia": "0",
      "increased_appetite": "0",
      "increased_weight": "0",
      "interest": "0",
      "mid_nocturnal": "0",
      "psychomotor_agitation": "0",
      "psychomotor_retardation": "0",
      "sad_mood": "0",
      "self_view": "0",
      "sleep_onset": "0",
      "suicidal_ideation": "0"
    },
    {
      "concentration": "0",
      "decreased_appetite": "0",
      "decreased_weight": "0",
      "early_morning": "0",
      "energy": "0",
      "hypersomnia": "0",
      "increased_appetite": "0",
      "increased_weight": "0",
      "interest": "0",
      "mid_nocturnal": "0",
      "psychomotor_agitation": "0",
      "psychomotor_retardation": "0",
      "sad_mood": "0",
      "self_view": "0",
      "sleep_onset": "0",
      "suicidal_ideation": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/qids",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "sleep",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "sad_mood",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "appetite_weight",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "concentration",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "self_view",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "suicidal_ideation",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "interest",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "energy",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "psychomotor",
          "points": 0,
          "present": true
        }
      ],
      "severity": "none",
      "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": "Rush AJ, Trivedi MH, Ibrahim HM, et al.",
        "doi": "10.1016/s0006-3223(02)01866-8",
        "id": "rush-2003",
        "pmid": "12946886",
        "source": "Biol Psychiatry. 2003;54(5):573-583",
        "title": "The 16-Item Quick Inventory of Depressive Symptomatology (QIDS), clinician rating (QIDS-C), and self-report (QIDS-SR): a psychometric evaluation in patients with chronic major depression"
      },
      "formula": "qids",
      "formula_expression": "QIDS-SR16 = max(sleep_onset, mid_nocturnal, early_morning, hypersomnia) + sad_mood + max(decreased_appetite, increased_appetite, decreased_weight, increased_weight) + concentration + self_view + suicidal_ideation + interest + energy + max(psychomotor_retardation, psychomotor_agitation); each caller-assigned 0-3; nine domains; max 27",
      "max_score": 27,
      "score": 0,
      "psychomotor_points": 0,
      "appetite_weight_points": 0,
      "sleep_points": 0
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "sleep",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "sad_mood",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "appetite_weight",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "concentration",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "self_view",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "suicidal_ideation",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "interest",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "energy",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "psychomotor",
          "points": 0,
          "present": true
        }
      ],
      "severity": "none",
      "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": "Rush AJ, Trivedi MH, Ibrahim HM, et al.",
        "doi": "10.1016/s0006-3223(02)01866-8",
        "id": "rush-2003",
        "pmid": "12946886",
        "source": "Biol Psychiatry. 2003;54(5):573-583",
        "title": "The 16-Item Quick Inventory of Depressive Symptomatology (QIDS), clinician rating (QIDS-C), and self-report (QIDS-SR): a psychometric evaluation in patients with chronic major depression"
      },
      "formula": "qids",
      "formula_expression": "QIDS-SR16 = max(sleep_onset, mid_nocturnal, early_morning, hypersomnia) + sad_mood + max(decreased_appetite, increased_appetite, decreased_weight, increased_weight) + concentration + self_view + suicidal_ideation + interest + energy + max(psychomotor_retardation, psychomotor_agitation); each caller-assigned 0-3; nine domains; max 27",
      "max_score": 27,
      "score": 0,
      "psychomotor_points": 0,
      "appetite_weight_points": 0,
      "sleep_points": 0
    }
  ]
}
```

## Response fields

- `formula` (string): qids
- `formula_expression` (string): Exact expression used
- `score` (integer): QIDS-SR16 points 0-27
- `max_score` (integer): 27
- `severity` (string): Rush 2003 IRT conversion bands: none (0-5), mild (6-10), moderate (11-15), severe (16-20), very_severe (21-27). Not a diagnosis. Not PHQ-9 cutoffs.
- `sleep_points` (integer): Sleep domain 0-3: maximum of the four sleep items, not the sum
- `appetite_weight_points` (integer): Appetite/weight domain 0-3: maximum of the four appetite/weight items, not the sum
- `psychomotor_points` (integer): Psychomotor domain 0-3: maximum of psychomotor_retardation and psychomotor_agitation, not the sum
- `components` (array): Nine DSM-IV domain points
- `citation` (object): Rush et al. Biol Psychiatry 2003 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 0,
      "factor": "sleep",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "sad_mood",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "appetite_weight",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "concentration",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "self_view",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "suicidal_ideation",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "interest",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "energy",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "psychomotor",
      "points": 0,
      "present": true
    }
  ],
  "severity": "none",
  "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": "Rush AJ, Trivedi MH, Ibrahim HM, et al.",
    "doi": "10.1016/s0006-3223(02)01866-8",
    "id": "rush-2003",
    "pmid": "12946886",
    "source": "Biol Psychiatry. 2003;54(5):573-583",
    "title": "The 16-Item Quick Inventory of Depressive Symptomatology (QIDS), clinician rating (QIDS-C), and self-report (QIDS-SR): a psychometric evaluation in patients with chronic major depression"
  },
  "formula": "qids",
  "formula_expression": "QIDS-SR16 = max(sleep_onset, mid_nocturnal, early_morning, hypersomnia) + sad_mood + max(decreased_appetite, increased_appetite, decreased_weight, increased_weight) + concentration + self_view + suicidal_ideation + interest + energy + max(psychomotor_retardation, psychomotor_agitation); each caller-assigned 0-3; nine domains; max 27",
  "max_score": 27,
  "score": 0,
  "psychomotor_points": 0,
  "appetite_weight_points": 0,
  "sleep_points": 0
}
```

## Errors

- HTTP 400 `invalid_qids`: Each QIDS-SR item must be an integer in the Rush 2003 published range; sleep, appetite, and weight domains use the published max-of-group scoring. 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

- [PHQ-9](https://magentlab.com/docs/phq-9) — Sum nine caller-assigned Kroenke 2001 PHQ-9 integers (0-3) and return the published total (max 27), severity cutpoints, and ≥10 screen.
- [GAD-7](https://magentlab.com/docs/gad-7) — Sum seven caller-assigned Spitzer 2006 GAD-7 integers (0-3) and return the published 0-21 total, 5/10/15 severity cuts, and ≥10 case-finding flag.
- [SCOFF](https://magentlab.com/docs/scoff) — Sum the five Morgan 1999 SCOFF items and return whether two or more answers are affirmative.

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