MAGENT

Emergency · LIVE

QIDS-SR16

QIDS

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.

LIVE $0.005 USDC GET /api/calc/qids

Markdown: /docs/qids.md · Canonical: https://magentlab.com/docs/qids

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

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
Authors
Rush AJ, Trivedi MH, Ibrahim HM, et al.
Source
Biol Psychiatry. 2003;54(5):573-583
DOI
10.1016/s0006-3223(02)01866-8

Worked example

All items 0

Given: concentration=0decreased_appetite=0decreased_weight=0early_morning=0energy=0hypersomnia=0increased_appetite=0increased_weight=0interest=0mid_nocturnal=0psychomotor_agitation=0psychomotor_retardation=0sad_mood=0self_view=0sleep_onset=0suicidal_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=0decreased_appetite=0decreased_weight=0early_morning=2energy=0hypersomnia=0increased_appetite=0increased_weight=0interest=0mid_nocturnal=3psychomotor_agitation=0psychomotor_retardation=0sad_mood=0self_view=0sleep_onset=1suicidal_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=3decreased_appetite=3decreased_weight=3early_morning=3energy=3hypersomnia=3increased_appetite=3increased_weight=3interest=3mid_nocturnal=3psychomotor_agitation=3psychomotor_retardation=3sad_mood=3self_view=3sleep_onset=3suicidal_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

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/qids?sleep_onset=0&mid_nocturnal=0&early_morning=0&hypersomnia=0&sad_mood=0&decreased_appetite=0&increased_appetite=0&decreased_weight=0&increased_weight=0&concentration=0&self_view=0&suicidal_ideation=0&interest=0&energy=0&psychomotor_retardation=0&psychomotor_agitation=0

Full URL: https://api.magentlab.com/api/calc/qids?sleep_onset=0&mid_nocturnal=0&early_morning=0&hypersomnia=0&sad_mood=0&decreased_appetite=0&increased_appetite=0&decreased_weight=0&increased_weight=0&concentration=0&self_view=0&suicidal_ideation=0&interest=0&energy=0&psychomotor_retardation=0&psychomotor_agitation=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/qids?sleep_onset=0&mid_nocturnal=0&early_morning=0&hypersomnia=0&sad_mood=0&decreased_appetite=0&increased_appetite=0&decreased_weight=0&increased_weight=0&concentration=0&self_view=0&suicidal_ideation=0&interest=0&energy=0&psychomotor_retardation=0&psychomotor_agitation=0"

Parameters

Name Type Required Description
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.

POST /api/calc/qids Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "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"
    }
  ]
}

Open bulk paywall →

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/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

Field Type Description
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

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "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
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
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.
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

  • 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 — 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 — 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. 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.