# Mood Disorder Questionnaire (MDQ)

MDQ

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

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

## What it computes

Sum thirteen caller-assigned Hirschfeld 2000 MDQ yes/no lifetime manic/hypomanic items and return the published symptom count (max 13) and that paper's positive-screen rule.

## When to use

When an agent has already assigned the thirteen Hirschfeld 2000 symptom flags plus same-period clustering and moderate/serious problem and needs that paper's score and positive-screen rule, not a bipolar diagnosis and not Hirschfeld 2003 general-population cutoff tweaks.

## When not to use

- Not a medical device and not a bipolar diagnosis or treatment order.
- magent does not interview the patient. Each flag is caller-assigned yes/no.
- This is Hirschfeld 2000 MDQ only: thirteen symptom items (yes = 1, max 13) and a positive screen at score ≥7 AND same_period AND moderate_or_serious_problem (that paper: sensitivity 0.73 and specificity 0.90 in a psychiatric outpatient sample). magent does not apply Hirschfeld 2003 general-population cutoff tweaks.
- Not PHQ-9, not QIDS, and not MDI.

## Formula

```
MDQ = felt_hyper + irritable + more_self_confident + less_sleep + more_talkative + racing_thoughts + easily_distracted + more_energy + more_active + more_social + more_interested_in_sex + unusual_risky + spending_trouble; each 1 if true; max 13; Hirschfeld 2000 positive screen is score ≥7 AND same_period AND moderate_or_serious_problem
```

## Citation

[Development and validation of a screening instrument for bipolar spectrum disorder: the Mood Disorder Questionnaire](https://doi.org/10.1176/appi.ajp.157.11.1873)
Hirschfeld RM, Williams JB, Spitzer RL, Calabrese JR, Flynn L, Keck PE Jr, Lewis L, McElroy SL, Post RM, Rapport DJ, Russell JM, Sachs GS, Zajecka J
Am J Psychiatry. 2000;157(11):1873-1875
DOI: [10.1176/appi.ajp.157.11.1873](https://doi.org/10.1176/appi.ajp.157.11.1873)

## Worked example

### All 13 symptom items false

Given: `easily_distracted=false, felt_hyper=false, irritable=false, less_sleep=false, moderate_or_serious_problem=false, more_active=false, more_energy=false, more_interested_in_sex=false, more_self_confident=false, more_social=false, more_talkative=false, racing_thoughts=false, same_period=false, spending_trouble=false, unusual_risky=false`

1. all thirteen symptom items false; same_period false; moderate_or_serious_problem false
2. score = 0; positive_screen false


### Seven symptoms with same-period and moderate/serious problem

Given: `easily_distracted=true, felt_hyper=true, irritable=true, less_sleep=true, moderate_or_serious_problem=true, more_active=false, more_energy=false, more_interested_in_sex=false, more_self_confident=true, more_social=false, more_talkative=true, racing_thoughts=true, same_period=true, spending_trouble=false, unusual_risky=false`

1. first seven symptom items true; remaining six false
2. same_period true; moderate_or_serious_problem true
3. score = 7; positive_screen true (Hirschfeld 2000: ≥7 AND same period AND moderate/serious problem)


## Also searched as

- Mood Disorder Questionnaire
- MDQ
- Hirschfeld MDQ
- bipolar spectrum screen
- MDQ score
- Hirschfeld 2000 MDQ
- manic hypomanic questionnaire
- bipolar screening questionnaire

## Parameters

- `felt_hyper` (boolean, required): Hirschfeld 2000 MDQ item 1: a period of time not the usual self when felt so good or so hyper that other people thought they were not the normal self, or so hyper that they got into trouble. true or false as assigned by the caller. magent does not interview the patient.
- `irritable` (boolean, required): Hirschfeld 2000 MDQ item 2: so irritable that they shouted at people or started fights or arguments. true or false as assigned by the caller. magent does not interview the patient.
- `more_self_confident` (boolean, required): Hirschfeld 2000 MDQ item 3: felt much more self-confident than usual. true or false as assigned by the caller. magent does not interview the patient.
- `less_sleep` (boolean, required): Hirschfeld 2000 MDQ item 4: got much less sleep than usual and found they didn't really miss it. true or false as assigned by the caller. magent does not interview the patient.
- `more_talkative` (boolean, required): Hirschfeld 2000 MDQ item 5: much more talkative or spoke much faster than usual. true or false as assigned by the caller. magent does not interview the patient.
- `racing_thoughts` (boolean, required): Hirschfeld 2000 MDQ item 6: thoughts raced through their head or they couldn't slow their mind down. true or false as assigned by the caller. magent does not interview the patient.
- `easily_distracted` (boolean, required): Hirschfeld 2000 MDQ item 7: so easily distracted by things around them that they had trouble concentrating or staying on track. true or false as assigned by the caller. magent does not interview the patient.
- `more_energy` (boolean, required): Hirschfeld 2000 MDQ item 8: much more energy than usual. true or false as assigned by the caller. magent does not interview the patient.
- `more_active` (boolean, required): Hirschfeld 2000 MDQ item 9: much more active or did many more things than usual. true or false as assigned by the caller. magent does not interview the patient.
- `more_social` (boolean, required): Hirschfeld 2000 MDQ item 10: much more social or outgoing than usual (for example, telephoned friends in the middle of the night). true or false as assigned by the caller. magent does not interview the patient.
- `more_interested_in_sex` (boolean, required): Hirschfeld 2000 MDQ item 11: much more interested in sex than usual. true or false as assigned by the caller. magent does not interview the patient.
- `unusual_risky` (boolean, required): Hirschfeld 2000 MDQ item 12: did things that were unusual for them or that other people might have thought were excessive, foolish, or risky. true or false as assigned by the caller. magent does not interview the patient.
- `spending_trouble` (boolean, required): Hirschfeld 2000 MDQ item 13: spending money got them or their family into trouble. true or false as assigned by the caller. magent does not interview the patient.
- `same_period` (boolean, required): Hirschfeld 2000 question 2: several of the endorsed symptom items happened during the same period of time. true or false as assigned by the caller. Required for the published positive-screen rule. magent does not interview the patient.
- `moderate_or_serious_problem` (boolean, required): Hirschfeld 2000 question 3 published positive-screen threshold: the symptoms caused a moderate or serious problem (not no problem or a minor problem). true or false as assigned by the caller. magent does not interpret the four-level item. magent does not interview the patient.

## 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/mdq`
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": [
    {
      "easily_distracted": "false",
      "felt_hyper": "false",
      "irritable": "false",
      "less_sleep": "false",
      "moderate_or_serious_problem": "false",
      "more_active": "false",
      "more_energy": "false",
      "more_interested_in_sex": "false",
      "more_self_confident": "false",
      "more_social": "false",
      "more_talkative": "false",
      "racing_thoughts": "false",
      "same_period": "false",
      "spending_trouble": "false",
      "unusual_risky": "false"
    },
    {
      "easily_distracted": "false",
      "felt_hyper": "false",
      "irritable": "false",
      "less_sleep": "false",
      "moderate_or_serious_problem": "false",
      "more_active": "false",
      "more_energy": "false",
      "more_interested_in_sex": "false",
      "more_self_confident": "false",
      "more_social": "false",
      "more_talkative": "false",
      "racing_thoughts": "false",
      "same_period": "false",
      "spending_trouble": "false",
      "unusual_risky": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/mdq",
  "items": [
    {
      "components": [
        {
          "factor": "felt_hyper",
          "points": 0,
          "present": false
        },
        {
          "factor": "irritable",
          "points": 0,
          "present": false
        },
        {
          "factor": "more_self_confident",
          "points": 0,
          "present": false
        },
        {
          "factor": "less_sleep",
          "points": 0,
          "present": false
        },
        {
          "factor": "more_talkative",
          "points": 0,
          "present": false
        },
        {
          "factor": "racing_thoughts",
          "points": 0,
          "present": false
        },
        {
          "factor": "easily_distracted",
          "points": 0,
          "present": false
        },
        {
          "factor": "more_energy",
          "points": 0,
          "present": false
        },
        {
          "factor": "more_active",
          "points": 0,
          "present": false
        },
        {
          "factor": "more_social",
          "points": 0,
          "present": false
        },
        {
          "factor": "more_interested_in_sex",
          "points": 0,
          "present": false
        },
        {
          "factor": "unusual_risky",
          "points": 0,
          "present": false
        },
        {
          "factor": "spending_trouble",
          "points": 0,
          "present": false
        }
      ],
      "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": "Hirschfeld RM, Williams JB, Spitzer RL, Calabrese JR, Flynn L, Keck PE Jr, Lewis L, McElroy SL, Post RM, Rapport DJ, Russell JM, Sachs GS, Zajecka J",
        "doi": "10.1176/appi.ajp.157.11.1873",
        "id": "hirschfeld-2000",
        "pmid": "11058490",
        "source": "Am J Psychiatry. 2000;157(11):1873-1875",
        "title": "Development and validation of a screening instrument for bipolar spectrum disorder: the Mood Disorder Questionnaire"
      },
      "formula": "mdq",
      "formula_expression": "MDQ = felt_hyper + irritable + more_self_confident + less_sleep + more_talkative + racing_thoughts + easily_distracted + more_energy + more_active + more_social + more_interested_in_sex + unusual_risky + spending_trouble; each 1 if true; max 13; Hirschfeld 2000 positive screen is score ≥7 AND same_period AND moderate_or_serious_problem",
      "max_score": 13,
      "score": 0,
      "moderate_or_serious_problem": false,
      "positive_screen": false,
      "same_period": false
    },
    {
      "components": [
        {
          "factor": "felt_hyper",
          "points": 0,
          "present": false
        },
        {
          "factor": "irritable",
          "points": 0,
          "present": false
        },
        {
          "factor": "more_self_confident",
          "points": 0,
          "present": false
        },
        {
          "factor": "less_sleep",
          "points": 0,
          "present": false
        },
        {
          "factor": "more_talkative",
          "points": 0,
          "present": false
        },
        {
          "factor": "racing_thoughts",
          "points": 0,
          "present": false
        },
        {
          "factor": "easily_distracted",
          "points": 0,
          "present": false
        },
        {
          "factor": "more_energy",
          "points": 0,
          "present": false
        },
        {
          "factor": "more_active",
          "points": 0,
          "present": false
        },
        {
          "factor": "more_social",
          "points": 0,
          "present": false
        },
        {
          "factor": "more_interested_in_sex",
          "points": 0,
          "present": false
        },
        {
          "factor": "unusual_risky",
          "points": 0,
          "present": false
        },
        {
          "factor": "spending_trouble",
          "points": 0,
          "present": false
        }
      ],
      "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": "Hirschfeld RM, Williams JB, Spitzer RL, Calabrese JR, Flynn L, Keck PE Jr, Lewis L, McElroy SL, Post RM, Rapport DJ, Russell JM, Sachs GS, Zajecka J",
        "doi": "10.1176/appi.ajp.157.11.1873",
        "id": "hirschfeld-2000",
        "pmid": "11058490",
        "source": "Am J Psychiatry. 2000;157(11):1873-1875",
        "title": "Development and validation of a screening instrument for bipolar spectrum disorder: the Mood Disorder Questionnaire"
      },
      "formula": "mdq",
      "formula_expression": "MDQ = felt_hyper + irritable + more_self_confident + less_sleep + more_talkative + racing_thoughts + easily_distracted + more_energy + more_active + more_social + more_interested_in_sex + unusual_risky + spending_trouble; each 1 if true; max 13; Hirschfeld 2000 positive screen is score ≥7 AND same_period AND moderate_or_serious_problem",
      "max_score": 13,
      "score": 0,
      "moderate_or_serious_problem": false,
      "positive_screen": false,
      "same_period": false
    }
  ]
}
```

## Response fields

- `formula` (string): mdq
- `formula_expression` (string): Exact expression used
- `score` (integer): Hirschfeld 2000 MDQ symptom count 0-13 (yes = 1). Not a diagnosis.
- `max_score` (integer): 13
- `same_period` (boolean): Caller-assigned Hirschfeld 2000 question 2 (several symptoms in the same period).
- `moderate_or_serious_problem` (boolean): Caller-assigned Hirschfeld 2000 question 3 threshold (moderate or serious problem).
- `positive_screen` (boolean): true iff score ≥ 7 AND same_period AND moderate_or_serious_problem (Hirschfeld 2000: a screening score of 7 or more items yielded sensitivity 0.73 and specificity 0.90 in that psychiatric outpatient sample; the published positive-screen rule also requires same-period clustering and moderate or serious problem). Not a bipolar diagnosis.
- `components` (array): Per-symptom-item points (13 items)
- `citation` (object): Hirschfeld et al. Am J Psychiatry 2000 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "felt_hyper",
      "points": 0,
      "present": false
    },
    {
      "factor": "irritable",
      "points": 0,
      "present": false
    },
    {
      "factor": "more_self_confident",
      "points": 0,
      "present": false
    },
    {
      "factor": "less_sleep",
      "points": 0,
      "present": false
    },
    {
      "factor": "more_talkative",
      "points": 0,
      "present": false
    },
    {
      "factor": "racing_thoughts",
      "points": 0,
      "present": false
    },
    {
      "factor": "easily_distracted",
      "points": 0,
      "present": false
    },
    {
      "factor": "more_energy",
      "points": 0,
      "present": false
    },
    {
      "factor": "more_active",
      "points": 0,
      "present": false
    },
    {
      "factor": "more_social",
      "points": 0,
      "present": false
    },
    {
      "factor": "more_interested_in_sex",
      "points": 0,
      "present": false
    },
    {
      "factor": "unusual_risky",
      "points": 0,
      "present": false
    },
    {
      "factor": "spending_trouble",
      "points": 0,
      "present": false
    }
  ],
  "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": "Hirschfeld RM, Williams JB, Spitzer RL, Calabrese JR, Flynn L, Keck PE Jr, Lewis L, McElroy SL, Post RM, Rapport DJ, Russell JM, Sachs GS, Zajecka J",
    "doi": "10.1176/appi.ajp.157.11.1873",
    "id": "hirschfeld-2000",
    "pmid": "11058490",
    "source": "Am J Psychiatry. 2000;157(11):1873-1875",
    "title": "Development and validation of a screening instrument for bipolar spectrum disorder: the Mood Disorder Questionnaire"
  },
  "formula": "mdq",
  "formula_expression": "MDQ = felt_hyper + irritable + more_self_confident + less_sleep + more_talkative + racing_thoughts + easily_distracted + more_energy + more_active + more_social + more_interested_in_sex + unusual_risky + spending_trouble; each 1 if true; max 13; Hirschfeld 2000 positive screen is score ≥7 AND same_period AND moderate_or_serious_problem",
  "max_score": 13,
  "score": 0,
  "moderate_or_serious_problem": false,
  "positive_screen": false,
  "same_period": false
}
```

## Errors

- HTTP 400 `invalid_mdq`: Mood Disorder Questionnaire inputs must match Hirschfeld 2000 thirteen symptom items and published screening rule 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

- [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.
- [QIDS](https://magentlab.com/docs/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.
- [MDI](https://magentlab.com/docs/mdi) — Map 12 caller-assigned Bech 2001 MDI integers (0-5 over the last 2 weeks) to ten DSM-IV/ICD-10 symptom items (appetite and psychomotor are each the published max of their pair) and return the 0-50 total and whether it meets this paper's optimal cutoff of 26.

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