# Prediction of Alcohol Withdrawal Severity Scale (PAWSS)

PAWSS

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

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

## What it computes

Apply the Maldonado 2014 PAWSS Part A threshold and ten yes/no items and return the published 0–10 total with the ≥4 high-risk band.

## When to use

When an agent has already assigned the PAWSS threshold and ten item flags and needs the published score and high-risk cutoff, not a later prophylaxis protocol.

## When not to use

- Not a medical device and not a diagnosis of alcohol withdrawal syndrome (AWS) or a prophylaxis order.
- Not CIWA-Ar.
- The Part A threshold (any alcohol in the last 30 days or positive BAL on admission) is required. If it is false, magent returns score 0 and pawss_band outside_window and does not add the ten item points.
- magent does not interview the patient or measure BAL. Each flag is caller-assigned.
- Published cutoff is ≥4 high risk for complicated AWS. Scores 0–3 with a true threshold are low. magent does not invent a moderate class.

## Formula

```
PAWSS = if alcohol_last_30d_or_positive_bal then recently_intoxicated_30d + alcohol_rehab + previous_withdrawal + blackouts + withdrawal_seizures + delirium_tremens + combined_downers_90d + combined_other_substances_90d + bal_ge_200 + increased_autonomic_activity else 0; each item 1 if true; Part A threshold 0 points; max 10; threshold false → outside_window; 0-3 low; >=4 high; Maldonado 2014
```

## Citation

[The "Prediction of Alcohol Withdrawal Severity Scale" (PAWSS): systematic literature review and pilot study of a new scale for the prediction of complicated alcohol withdrawal syndrome](https://doi.org/10.1016/j.alcohol.2014.01.004)
Maldonado JR, Sher Y, Ashouri JF, Hills-Evans K, Swendsen H, Lolak S, Miller AC
Alcohol. 2014;48(4):375-390
DOI: [10.1016/j.alcohol.2014.01.004](https://doi.org/10.1016/j.alcohol.2014.01.004)

## Worked example

### Threshold false

Given: `alcohol_last_30d_or_positive_bal=false, alcohol_rehab=false, bal_ge_200=false, blackouts=false, combined_downers_90d=false, combined_other_substances_90d=false, delirium_tremens=false, increased_autonomic_activity=false, previous_withdrawal=false, recently_intoxicated_30d=false, withdrawal_seizures=false`

1. alcohol_last_30d_or_positive_bal false
2. ten item flags false
3. score = 0 (items not added)
4. pawss_band = outside_window


### Four items with threshold true

Given: `alcohol_last_30d_or_positive_bal=true, alcohol_rehab=true, bal_ge_200=false, blackouts=true, combined_downers_90d=false, combined_other_substances_90d=false, delirium_tremens=false, increased_autonomic_activity=false, previous_withdrawal=true, recently_intoxicated_30d=true, withdrawal_seizures=false`

1. alcohol_last_30d_or_positive_bal true
2. four items true → 4
3. score = 4
4. pawss_band = high


## Also searched as

- PAWSS
- Prediction of Alcohol Withdrawal Severity Scale
- Maldonado PAWSS
- alcohol withdrawal severity scale
- complicated alcohol withdrawal prediction
- PAWSS score
- PAWSS high risk

## Parameters

- `alcohol_last_30d_or_positive_bal` (boolean, required): Part A threshold (0 points). Caller-assigned: consumed any alcohol in the last 30 days or a positive BAL on admission (Maldonado 2014). If false, score is 0 and pawss_band is outside_window; the ten items are not added. magent does not interview the patient or measure BAL.
- `recently_intoxicated_30d` (boolean, required): Recently intoxicated or drunk within the last 30 days as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.
- `alcohol_rehab` (boolean, required): Ever alcohol-use-disorder rehabilitation or AA as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.
- `previous_withdrawal` (boolean, required): Any previous alcohol withdrawal as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.
- `blackouts` (boolean, required): Ever blackouts as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.
- `withdrawal_seizures` (boolean, required): Ever alcohol withdrawal seizures as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.
- `delirium_tremens` (boolean, required): Ever delirium tremens as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.
- `combined_downers_90d` (boolean, required): Combined alcohol with benzodiazepines or barbiturates in the last 90 days as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.
- `combined_other_substances_90d` (boolean, required): Combined alcohol with any other substance of abuse in the last 90 days as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not interview the patient.
- `bal_ge_200` (boolean, required): BAL on presentation ≥200 as assigned by the caller (Maldonado 2014). true scores 1 when the Part A threshold is true. magent does not measure BAL.
- `increased_autonomic_activity` (boolean, required): Increased autonomic activity as assigned by the caller (Maldonado 2014), for example HR>120, tremor, sweating, agitation, or nausea. true scores 1 when the Part A threshold is true. magent does not observe 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/pawss`
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": [
    {
      "alcohol_last_30d_or_positive_bal": "false",
      "alcohol_rehab": "false",
      "bal_ge_200": "false",
      "blackouts": "false",
      "combined_downers_90d": "false",
      "combined_other_substances_90d": "false",
      "delirium_tremens": "false",
      "increased_autonomic_activity": "false",
      "previous_withdrawal": "false",
      "recently_intoxicated_30d": "false",
      "withdrawal_seizures": "false"
    },
    {
      "alcohol_last_30d_or_positive_bal": "false",
      "alcohol_rehab": "false",
      "bal_ge_200": "false",
      "blackouts": "false",
      "combined_downers_90d": "false",
      "combined_other_substances_90d": "false",
      "delirium_tremens": "false",
      "increased_autonomic_activity": "false",
      "previous_withdrawal": "false",
      "recently_intoxicated_30d": "false",
      "withdrawal_seizures": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/pawss",
  "items": [
    {
      "components": [
        {
          "factor": "alcohol_last_30d_or_positive_bal",
          "points": 0,
          "present": false
        },
        {
          "factor": "recently_intoxicated_30d",
          "points": 0,
          "present": false
        },
        {
          "factor": "alcohol_rehab",
          "points": 0,
          "present": false
        },
        {
          "factor": "previous_withdrawal",
          "points": 0,
          "present": false
        },
        {
          "factor": "blackouts",
          "points": 0,
          "present": false
        },
        {
          "factor": "withdrawal_seizures",
          "points": 0,
          "present": false
        },
        {
          "factor": "delirium_tremens",
          "points": 0,
          "present": false
        },
        {
          "factor": "combined_downers_90d",
          "points": 0,
          "present": false
        },
        {
          "factor": "combined_other_substances_90d",
          "points": 0,
          "present": false
        },
        {
          "factor": "bal_ge_200",
          "points": 0,
          "present": false
        },
        {
          "factor": "increased_autonomic_activity",
          "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": "Maldonado JR, Sher Y, Ashouri JF, Hills-Evans K, Swendsen H, Lolak S, Miller AC",
        "doi": "10.1016/j.alcohol.2014.01.004",
        "id": "maldonado-2014",
        "pmid": "24657098",
        "source": "Alcohol. 2014;48(4):375-390",
        "title": "The \"Prediction of Alcohol Withdrawal Severity Scale\" (PAWSS): systematic literature review and pilot study of a new scale for the prediction of complicated alcohol withdrawal syndrome"
      },
      "formula": "pawss",
      "formula_expression": "PAWSS = if alcohol_last_30d_or_positive_bal then recently_intoxicated_30d + alcohol_rehab + previous_withdrawal + blackouts + withdrawal_seizures + delirium_tremens + combined_downers_90d + combined_other_substances_90d + bal_ge_200 + increased_autonomic_activity else 0; each item 1 if true; Part A threshold 0 points; max 10; threshold false → outside_window; 0-3 low; >=4 high; Maldonado 2014",
      "max_score": 10,
      "score": 0,
      "pawss_band": "outside_window"
    },
    {
      "components": [
        {
          "factor": "alcohol_last_30d_or_positive_bal",
          "points": 0,
          "present": false
        },
        {
          "factor": "recently_intoxicated_30d",
          "points": 0,
          "present": false
        },
        {
          "factor": "alcohol_rehab",
          "points": 0,
          "present": false
        },
        {
          "factor": "previous_withdrawal",
          "points": 0,
          "present": false
        },
        {
          "factor": "blackouts",
          "points": 0,
          "present": false
        },
        {
          "factor": "withdrawal_seizures",
          "points": 0,
          "present": false
        },
        {
          "factor": "delirium_tremens",
          "points": 0,
          "present": false
        },
        {
          "factor": "combined_downers_90d",
          "points": 0,
          "present": false
        },
        {
          "factor": "combined_other_substances_90d",
          "points": 0,
          "present": false
        },
        {
          "factor": "bal_ge_200",
          "points": 0,
          "present": false
        },
        {
          "factor": "increased_autonomic_activity",
          "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": "Maldonado JR, Sher Y, Ashouri JF, Hills-Evans K, Swendsen H, Lolak S, Miller AC",
        "doi": "10.1016/j.alcohol.2014.01.004",
        "id": "maldonado-2014",
        "pmid": "24657098",
        "source": "Alcohol. 2014;48(4):375-390",
        "title": "The \"Prediction of Alcohol Withdrawal Severity Scale\" (PAWSS): systematic literature review and pilot study of a new scale for the prediction of complicated alcohol withdrawal syndrome"
      },
      "formula": "pawss",
      "formula_expression": "PAWSS = if alcohol_last_30d_or_positive_bal then recently_intoxicated_30d + alcohol_rehab + previous_withdrawal + blackouts + withdrawal_seizures + delirium_tremens + combined_downers_90d + combined_other_substances_90d + bal_ge_200 + increased_autonomic_activity else 0; each item 1 if true; Part A threshold 0 points; max 10; threshold false → outside_window; 0-3 low; >=4 high; Maldonado 2014",
      "max_score": 10,
      "score": 0,
      "pawss_band": "outside_window"
    }
  ]
}
```

## Response fields

- `formula` (string): pawss
- `formula_expression` (string): Exact expression used
- `score` (integer): PAWSS points 0-10
- `max_score` (integer): 10
- `pawss_band` (string): outside_window when the Part A threshold is false; low when the threshold is true and score is 0-3; high when the threshold is true and score is ≥4 (Maldonado 2014 cutoff for complicated AWS). Not a diagnosis.
- `components` (array): Part A threshold (0 points) then per-item points
- `citation` (object): Maldonado et al. Alcohol 2014 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "alcohol_last_30d_or_positive_bal",
      "points": 0,
      "present": false
    },
    {
      "factor": "recently_intoxicated_30d",
      "points": 0,
      "present": false
    },
    {
      "factor": "alcohol_rehab",
      "points": 0,
      "present": false
    },
    {
      "factor": "previous_withdrawal",
      "points": 0,
      "present": false
    },
    {
      "factor": "blackouts",
      "points": 0,
      "present": false
    },
    {
      "factor": "withdrawal_seizures",
      "points": 0,
      "present": false
    },
    {
      "factor": "delirium_tremens",
      "points": 0,
      "present": false
    },
    {
      "factor": "combined_downers_90d",
      "points": 0,
      "present": false
    },
    {
      "factor": "combined_other_substances_90d",
      "points": 0,
      "present": false
    },
    {
      "factor": "bal_ge_200",
      "points": 0,
      "present": false
    },
    {
      "factor": "increased_autonomic_activity",
      "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": "Maldonado JR, Sher Y, Ashouri JF, Hills-Evans K, Swendsen H, Lolak S, Miller AC",
    "doi": "10.1016/j.alcohol.2014.01.004",
    "id": "maldonado-2014",
    "pmid": "24657098",
    "source": "Alcohol. 2014;48(4):375-390",
    "title": "The \"Prediction of Alcohol Withdrawal Severity Scale\" (PAWSS): systematic literature review and pilot study of a new scale for the prediction of complicated alcohol withdrawal syndrome"
  },
  "formula": "pawss",
  "formula_expression": "PAWSS = if alcohol_last_30d_or_positive_bal then recently_intoxicated_30d + alcohol_rehab + previous_withdrawal + blackouts + withdrawal_seizures + delirium_tremens + combined_downers_90d + combined_other_substances_90d + bal_ge_200 + increased_autonomic_activity else 0; each item 1 if true; Part A threshold 0 points; max 10; threshold false → outside_window; 0-3 low; >=4 high; Maldonado 2014",
  "max_score": 10,
  "score": 0,
  "pawss_band": "outside_window"
}
```

## Errors

- HTTP 400 `invalid_flag`: boolean clinical flags must be true or false 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

- [CIWA-Ar](https://magentlab.com/docs/ciwa-ar) — Sum the ten Sullivan 1989 CIWA-Ar items (nine caller-assigned 0-7 plus orientation 0-4) and return the published total (max 67).

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