# Edinburgh Postnatal Depression Scale

EPDS

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

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

## What it computes

Sum ten caller-assigned Cox 1987 EPDS integers (0-3 over the past 7 days; laugh, enjoyment, and anxious reverse-scored in that paper so 0 is the least symptomatic published pole) and return the 0-30 total and whether it meets this paper's 12/13 threshold (score ≥13).

## When to use

When an agent has already assigned Cox 1987 EPDS 0-3 integers for all ten items (after that paper's reverse key for items 1, 2, and 4) and needs the published total and 12/13 threshold, not a depression interview, PHQ-9, QIDS, or MDI.

## 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 ten items is a caller-assigned integer 0-3 (0 least symptomatic published pole through 3 most, past 7 days). magent does not interpret the items.
- This is Cox 1987 EPDS only. Items laugh, enjoyment, and anxious (items 1, 2, and 4) are reverse-scored in that paper; the caller assigns the published 0-3 after that reverse key. Total 0-30. magent does not score PHQ-9, QIDS, or MDI.
- Cox 1987 published a threshold of 12/13 (at_or_above_cutoff is true iff score ≥13). magent does not apply later ≥10 community cuts or a cut of score >13 only, and it does not treat a score as a depression diagnosis.

## Formula

```
EPDS = laugh + enjoyment + self_blame + anxious + scared + coping + sleep + sad + crying + self_harm; each caller-assigned 0-3 as in Cox 1987 (laugh, enjoyment, and anxious reverse-scored in that paper; 0 is the least symptomatic published pole); max 30; Cox 1987 threshold 12/13 (at or above iff score ≥ 13)
```

## Citation

[Detection of postnatal depression. Development of the 10-item Edinburgh Postnatal Depression Scale](https://doi.org/10.1192/bjp.150.6.782)
Cox JL, Holden JM, Sagovsky R
Br J Psychiatry. 1987;150:782-786
DOI: [10.1192/bjp.150.6.782](https://doi.org/10.1192/bjp.150.6.782)

## Worked example

### All items at the published 0 pole

Given: `anxious=0, coping=0, crying=0, enjoyment=0, laugh=0, sad=0, scared=0, self_blame=0, self_harm=0, sleep=0`

1. Each item is 0 (least symptomatic published pole, including reverse-scored laugh, enjoyment, and anxious)
2. Score = 0 (max 30); at_or_above_cutoff false (Cox 1987 threshold is 12/13)


### Reverse-scored item at 3

Given: `anxious=0, coping=0, crying=0, enjoyment=0, laugh=3, sad=0, scared=0, self_blame=0, self_harm=0, sleep=0`

1. laugh is reverse-scored in Cox 1987; the caller-assigned published score 3 adds 3, not 0
2. Remaining items 0; score = 3; at_or_above_cutoff false


### Cox 1987 threshold 12/13

Given: `anxious=3, coping=0, crying=0, enjoyment=3, laugh=3, sad=0, scared=1, self_blame=3, self_harm=0, sleep=0`

1. 3 + 3 + 3 + 3 + 1 + 0 + 0 + 0 + 0 + 0 = 13
2. Score = 13 (max 30); at_or_above_cutoff true (12 is below; ≥13 is at or above). No ≥10 community cut.


## Also searched as

- EPDS
- Edinburgh Postnatal Depression Scale
- Edinburgh depression scale
- Cox EPDS
- postnatal depression screen
- postpartum depression scale
- 10-item EPDS
- Cox 1987 EPDS

## Parameters

- `laugh` (integer, required): Caller-assigned Cox 1987 EPDS item 1 (integer 0-3). Reverse-scored in that paper: ability to laugh and see the funny side of things over the past 7 days. 0 is the least symptomatic published pole after reverse scoring; 3 is the most. magent does not interpret the item.
- `enjoyment` (integer, required): Caller-assigned Cox 1987 EPDS item 2 (integer 0-3). Reverse-scored in that paper: looking forward with enjoyment to things over the past 7 days. 0 is the least symptomatic published pole after reverse scoring; 3 is the most. magent does not interpret the item.
- `self_blame` (integer, required): Caller-assigned Cox 1987 EPDS item 3 (integer 0-3): blamed self unnecessarily when things went wrong over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.
- `anxious` (integer, required): Caller-assigned Cox 1987 EPDS item 4 (integer 0-3). Reverse-scored in that paper: anxious or worried for no good reason over the past 7 days. 0 is the least symptomatic published pole after reverse scoring; 3 is the most. magent does not interpret the item.
- `scared` (integer, required): Caller-assigned Cox 1987 EPDS item 5 (integer 0-3): scared or panicky for no very good reason over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.
- `coping` (integer, required): Caller-assigned Cox 1987 EPDS item 6 (integer 0-3): things getting on top of the respondent over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.
- `sleep` (integer, required): Caller-assigned Cox 1987 EPDS item 7 (integer 0-3): unhappiness with difficulty sleeping over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.
- `sad` (integer, required): Caller-assigned Cox 1987 EPDS item 8 (integer 0-3): felt sad or miserable over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.
- `crying` (integer, required): Caller-assigned Cox 1987 EPDS item 9 (integer 0-3): crying from unhappiness over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). magent does not interpret the item.
- `self_harm` (integer, required): Caller-assigned Cox 1987 EPDS item 10 (integer 0-3): thoughts of harming oneself over the past 7 days. Adds as published (0 least symptomatic pole, 3 most). 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/epds`
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": [
    {
      "anxious": "0",
      "coping": "0",
      "crying": "0",
      "enjoyment": "0",
      "laugh": "0",
      "sad": "0",
      "scared": "0",
      "self_blame": "0",
      "self_harm": "0",
      "sleep": "0"
    },
    {
      "anxious": "0",
      "coping": "0",
      "crying": "0",
      "enjoyment": "0",
      "laugh": "0",
      "sad": "0",
      "scared": "0",
      "self_blame": "0",
      "self_harm": "0",
      "sleep": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/epds",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "laugh",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "enjoyment",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "self_blame",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "anxious",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "scared",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "coping",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "sleep",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "sad",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "crying",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "self_harm",
          "points": 0,
          "present": true,
          "reverse_scored": 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": "Cox JL, Holden JM, Sagovsky R",
        "doi": "10.1192/bjp.150.6.782",
        "id": "cox-1987",
        "pmid": "3651732",
        "source": "Br J Psychiatry. 1987;150:782-786",
        "title": "Detection of postnatal depression. Development of the 10-item Edinburgh Postnatal Depression Scale"
      },
      "formula": "epds",
      "formula_expression": "EPDS = laugh + enjoyment + self_blame + anxious + scared + coping + sleep + sad + crying + self_harm; each caller-assigned 0-3 as in Cox 1987 (laugh, enjoyment, and anxious reverse-scored in that paper; 0 is the least symptomatic published pole); max 30; Cox 1987 threshold 12/13 (at or above iff score ≥ 13)",
      "max_score": 30,
      "score": 0,
      "at_or_above_cutoff": false
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "laugh",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "enjoyment",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "self_blame",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "anxious",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "scared",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "coping",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "sleep",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "sad",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "crying",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "self_harm",
          "points": 0,
          "present": true,
          "reverse_scored": 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": "Cox JL, Holden JM, Sagovsky R",
        "doi": "10.1192/bjp.150.6.782",
        "id": "cox-1987",
        "pmid": "3651732",
        "source": "Br J Psychiatry. 1987;150:782-786",
        "title": "Detection of postnatal depression. Development of the 10-item Edinburgh Postnatal Depression Scale"
      },
      "formula": "epds",
      "formula_expression": "EPDS = laugh + enjoyment + self_blame + anxious + scared + coping + sleep + sad + crying + self_harm; each caller-assigned 0-3 as in Cox 1987 (laugh, enjoyment, and anxious reverse-scored in that paper; 0 is the least symptomatic published pole); max 30; Cox 1987 threshold 12/13 (at or above iff score ≥ 13)",
      "max_score": 30,
      "score": 0,
      "at_or_above_cutoff": false
    }
  ]
}
```

## Response fields

- `formula` (string): epds
- `formula_expression` (string): Exact expression used
- `score` (integer): EPDS points 0-30
- `max_score` (integer): 30
- `at_or_above_cutoff` (boolean): true iff score ≥ 13 (Cox 1987 threshold 12/13). Not a diagnosis. Not later ≥10 community cuts. Not a cut of score >13 only.
- `components` (array): Per-item caller-assigned points (reverse-scored items flagged)
- `citation` (object): Cox et al. Br J Psychiatry 1987 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 0,
      "factor": "laugh",
      "points": 0,
      "present": true,
      "reverse_scored": true
    },
    {
      "value": 0,
      "factor": "enjoyment",
      "points": 0,
      "present": true,
      "reverse_scored": true
    },
    {
      "value": 0,
      "factor": "self_blame",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "anxious",
      "points": 0,
      "present": true,
      "reverse_scored": true
    },
    {
      "value": 0,
      "factor": "scared",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "coping",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "sleep",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "sad",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "crying",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "self_harm",
      "points": 0,
      "present": true,
      "reverse_scored": 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": "Cox JL, Holden JM, Sagovsky R",
    "doi": "10.1192/bjp.150.6.782",
    "id": "cox-1987",
    "pmid": "3651732",
    "source": "Br J Psychiatry. 1987;150:782-786",
    "title": "Detection of postnatal depression. Development of the 10-item Edinburgh Postnatal Depression Scale"
  },
  "formula": "epds",
  "formula_expression": "EPDS = laugh + enjoyment + self_blame + anxious + scared + coping + sleep + sad + crying + self_harm; each caller-assigned 0-3 as in Cox 1987 (laugh, enjoyment, and anxious reverse-scored in that paper; 0 is the least symptomatic published pole); max 30; Cox 1987 threshold 12/13 (at or above iff score ≥ 13)",
  "max_score": 30,
  "score": 0,
  "at_or_above_cutoff": false
}
```

## Errors

- HTTP 400 `invalid_epds`: Each Edinburgh Postnatal Depression Scale item must be an integer in the Cox 1987 published 0-3 range. 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.
