MAGENT

Emergency · LIVE

Mood Disorder Questionnaire (MDQ)

MDQ

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.

LIVE $0.005 USDC GET /api/calc/mdq

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

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

Title
Development and validation of a screening instrument for bipolar spectrum disorder: the Mood Disorder Questionnaire
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
Source
Am J Psychiatry. 2000;157(11):1873-1875
DOI
10.1176/appi.ajp.157.11.1873

Worked example

All 13 symptom items false

Given: easily_distracted=falsefelt_hyper=falseirritable=falseless_sleep=falsemoderate_or_serious_problem=falsemore_active=falsemore_energy=falsemore_interested_in_sex=falsemore_self_confident=falsemore_social=falsemore_talkative=falseracing_thoughts=falsesame_period=falsespending_trouble=falseunusual_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=truefelt_hyper=trueirritable=trueless_sleep=truemoderate_or_serious_problem=truemore_active=falsemore_energy=falsemore_interested_in_sex=falsemore_self_confident=truemore_social=falsemore_talkative=trueracing_thoughts=truesame_period=truespending_trouble=falseunusual_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

Try

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

/api/calc/mdq?felt_hyper=false&irritable=false&more_self_confident=false&less_sleep=false&more_talkative=false&racing_thoughts=false&easily_distracted=false&more_energy=false&more_active=false&more_social=false&more_interested_in_sex=false&unusual_risky=false&spending_trouble=false&same_period=false&moderate_or_serious_problem=false

Full URL: https://api.magentlab.com/api/calc/mdq?felt_hyper=false&irritable=false&more_self_confident=false&less_sleep=false&more_talkative=false&racing_thoughts=false&easily_distracted=false&more_energy=false&more_active=false&more_social=false&more_interested_in_sex=false&unusual_risky=false&spending_trouble=false&same_period=false&moderate_or_serious_problem=false

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/mdq?felt_hyper=false&irritable=false&more_self_confident=false&less_sleep=false&more_talkative=false&racing_thoughts=false&easily_distracted=false&more_energy=false&more_active=false&more_social=false&more_interested_in_sex=false&unusual_risky=false&spending_trouble=false&same_period=false&moderate_or_serious_problem=false"

Parameters

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

POST /api/calc/mdq 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": [
    {
      "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"
    }
  ]
}

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

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

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

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

Client errors (HTTP 400)

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

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