# MINDS (DeCarolis 2007)

MINDS (DeCarolis 2007)

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

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

## What it computes

Sum nine caller-assigned DeCarolis 2007 MINDS items and return the published total (max 46). Does not return severity bands, lorazepam doses, or a RASS-mapped agitation item.

## When to use

When an agent has already assigned DeCarolis 2007 MINDS bands and needs the published 0-46 total, not a benzodiazepine protocol or a hospital-specific RASS modification.

## When not to use

- Not a medical device and not a benzodiazepine, lorazepam, or treatment order.
- Each finding is caller-assigned. magent does not examine the patient.
- magent publishes DeCarolis 2007 item weights (MINDS 0-46), not a hospital-specific RASS modification of agitation.
- DeCarolis 2007 did not publish mild, moderate, or severe cutoffs or lorazepam doses for the total score. magent returns score and max_score only.

## Formula

```
MINDS = pulse (lt_90 0, 90_to_110 1, gt_110 2) + diastolic_bp (lt_90 0, 90_to_110 1, gt_110 2) + tremor (absent 0, visible 2, moderate 4, severe 6) + sweat (absent 0, moist_palms 2, beads 4, drenching 6) + hallucinations (absent 0, mild 1, moderate_intermittent 2, severe_continuous 3) + agitation (normal 0, somewhat_greater 3, moderately_fidgety 6, pacing_thrashing 9) + orientation (x3 0, x2 2, x1 4, disoriented 6, intubated 0) + delusions (true 6) + seizures (true 6); DeCarolis 2007 Minnesota Detoxification Scale; max 46; not a RASS modification; no published total-score severity or lorazepam-dose bands
```

## Citation

[Symptom-driven lorazepam protocol for treatment of severe alcohol withdrawal delirium in the intensive care unit](https://doi.org/10.1592/phco.27.4.510)
DeCarolis DD, Rice KL, Ho L, Willenbring ML, Stock CJ
Pharmacotherapy. 2007;27(4):510-518
DOI: [10.1592/phco.27.4.510](https://doi.org/10.1592/phco.27.4.510)

## Worked example

### All items at the 0-point band

Given: `agitation=normal, delusions=false, diastolic_bp=lt_90, hallucinations=absent, orientation=x3, pulse=lt_90, seizures=false, sweat=absent, tremor=absent`

1. pulse lt_90 0 + diastolic_bp lt_90 0 + tremor absent 0 + sweat absent 0 + hallucinations absent 0 + agitation normal 0 + orientation x3 0 + delusions false 0 + seizures false 0
2. Score = 0 (max 46). No severity band.


### All items at the published maximum

Given: `agitation=pacing_thrashing, delusions=true, diastolic_bp=gt_110, hallucinations=severe_continuous, orientation=disoriented, pulse=gt_110, seizures=true, sweat=drenching, tremor=severe`

1. pulse gt_110 2 + diastolic_bp gt_110 2 + tremor severe 6 + sweat drenching 6 + hallucinations severe_continuous 3 + agitation pacing_thrashing 9 + orientation disoriented 6 + delusions true 6 + seizures true 6
2. Score = 46 (max 46). No severity band.


## Also searched as

- MINDS
- Minnesota Detoxification Scale
- DeCarolis MINDS
- mMINDS
- MINDS score
- alcohol withdrawal MINDS
- DeCarolis 2007 detoxification scale

## Parameters

- `pulse` (string, required): Caller-assigned DeCarolis 2007 pulse band: lt_90 (0; pulse <90), 90_to_110 (1), or gt_110 (2; pulse >110). magent does not measure pulse.
- `diastolic_bp` (string, required): Caller-assigned DeCarolis 2007 diastolic blood-pressure band: lt_90 (0; DBP <90), 90_to_110 (1), or gt_110 (2; DBP >110). magent does not measure blood pressure.
- `tremor` (string, required): Caller-assigned DeCarolis 2007 tremor: absent (0), visible (2), moderate (4), or severe (6). magent does not examine the patient.
- `sweat` (string, required): Caller-assigned DeCarolis 2007 sweat: absent (0), moist_palms (2), beads (4), or drenching (6). magent does not examine the patient.
- `hallucinations` (string, required): Caller-assigned DeCarolis 2007 hallucinations: absent (0), mild (1), moderate_intermittent (2), or severe_continuous (3). magent does not examine the patient.
- `agitation` (string, required): Caller-assigned DeCarolis 2007 agitation: normal (0), somewhat_greater (3), moderately_fidgety (6), or pacing_thrashing (9). Not a RASS item. magent does not examine the patient.
- `orientation` (string, required): Caller-assigned DeCarolis 2007 orientation: x3 (0), x2 (2), x1 (4), disoriented (6), or intubated (0). magent does not examine the patient.
- `delusions` (boolean, required): Caller-assigned DeCarolis 2007 delusions. true scores 6. magent does not examine the patient.
- `seizures` (boolean, required): Caller-assigned DeCarolis 2007 seizures. true scores 6. magent does not examine 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/mminds`
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": [
    {
      "agitation": "normal",
      "delusions": "false",
      "diastolic_bp": "lt_90",
      "hallucinations": "absent",
      "orientation": "x3",
      "pulse": "lt_90",
      "seizures": "false",
      "sweat": "absent",
      "tremor": "absent"
    },
    {
      "agitation": "normal",
      "delusions": "false",
      "diastolic_bp": "lt_90",
      "hallucinations": "absent",
      "orientation": "x3",
      "pulse": "lt_90",
      "seizures": "false",
      "sweat": "absent",
      "tremor": "absent"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/mminds",
  "items": [
    {
      "components": [
        {
          "value": "lt_90",
          "factor": "pulse",
          "points": 0,
          "present": true
        },
        {
          "value": "lt_90",
          "factor": "diastolic_bp",
          "points": 0,
          "present": true
        },
        {
          "value": "absent",
          "factor": "tremor",
          "points": 0,
          "present": true
        },
        {
          "value": "absent",
          "factor": "sweat",
          "points": 0,
          "present": true
        },
        {
          "value": "absent",
          "factor": "hallucinations",
          "points": 0,
          "present": true
        },
        {
          "value": "normal",
          "factor": "agitation",
          "points": 0,
          "present": true
        },
        {
          "value": "x3",
          "factor": "orientation",
          "points": 0,
          "present": true
        },
        {
          "value": false,
          "factor": "delusions",
          "points": 0,
          "present": false
        },
        {
          "value": false,
          "factor": "seizures",
          "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": "DeCarolis DD, Rice KL, Ho L, Willenbring ML, Stock CJ",
        "doi": "10.1592/phco.27.4.510",
        "id": "decarolis-2007-minds",
        "pmid": "17381377",
        "source": "Pharmacotherapy. 2007;27(4):510-518",
        "title": "Symptom-driven lorazepam protocol for treatment of severe alcohol withdrawal delirium in the intensive care unit"
      },
      "formula": "mminds",
      "formula_expression": "MINDS = pulse (lt_90 0, 90_to_110 1, gt_110 2) + diastolic_bp (lt_90 0, 90_to_110 1, gt_110 2) + tremor (absent 0, visible 2, moderate 4, severe 6) + sweat (absent 0, moist_palms 2, beads 4, drenching 6) + hallucinations (absent 0, mild 1, moderate_intermittent 2, severe_continuous 3) + agitation (normal 0, somewhat_greater 3, moderately_fidgety 6, pacing_thrashing 9) + orientation (x3 0, x2 2, x1 4, disoriented 6, intubated 0) + delusions (true 6) + seizures (true 6); DeCarolis 2007 Minnesota Detoxification Scale; max 46; not a RASS modification; no published total-score severity or lorazepam-dose bands",
      "max_score": 46,
      "score": 0
    },
    {
      "components": [
        {
          "value": "lt_90",
          "factor": "pulse",
          "points": 0,
          "present": true
        },
        {
          "value": "lt_90",
          "factor": "diastolic_bp",
          "points": 0,
          "present": true
        },
        {
          "value": "absent",
          "factor": "tremor",
          "points": 0,
          "present": true
        },
        {
          "value": "absent",
          "factor": "sweat",
          "points": 0,
          "present": true
        },
        {
          "value": "absent",
          "factor": "hallucinations",
          "points": 0,
          "present": true
        },
        {
          "value": "normal",
          "factor": "agitation",
          "points": 0,
          "present": true
        },
        {
          "value": "x3",
          "factor": "orientation",
          "points": 0,
          "present": true
        },
        {
          "value": false,
          "factor": "delusions",
          "points": 0,
          "present": false
        },
        {
          "value": false,
          "factor": "seizures",
          "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": "DeCarolis DD, Rice KL, Ho L, Willenbring ML, Stock CJ",
        "doi": "10.1592/phco.27.4.510",
        "id": "decarolis-2007-minds",
        "pmid": "17381377",
        "source": "Pharmacotherapy. 2007;27(4):510-518",
        "title": "Symptom-driven lorazepam protocol for treatment of severe alcohol withdrawal delirium in the intensive care unit"
      },
      "formula": "mminds",
      "formula_expression": "MINDS = pulse (lt_90 0, 90_to_110 1, gt_110 2) + diastolic_bp (lt_90 0, 90_to_110 1, gt_110 2) + tremor (absent 0, visible 2, moderate 4, severe 6) + sweat (absent 0, moist_palms 2, beads 4, drenching 6) + hallucinations (absent 0, mild 1, moderate_intermittent 2, severe_continuous 3) + agitation (normal 0, somewhat_greater 3, moderately_fidgety 6, pacing_thrashing 9) + orientation (x3 0, x2 2, x1 4, disoriented 6, intubated 0) + delusions (true 6) + seizures (true 6); DeCarolis 2007 Minnesota Detoxification Scale; max 46; not a RASS modification; no published total-score severity or lorazepam-dose bands",
      "max_score": 46,
      "score": 0
    }
  ]
}
```

## Response fields

- `formula` (string): mminds
- `formula_expression` (string): Exact expression used
- `score` (integer): DeCarolis 2007 MINDS points 0-46
- `max_score` (integer): Always 46
- `components` (array): Per-item caller-assigned DeCarolis 2007 points
- `citation` (object): DeCarolis et al. Pharmacotherapy 2007 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": "lt_90",
      "factor": "pulse",
      "points": 0,
      "present": true
    },
    {
      "value": "lt_90",
      "factor": "diastolic_bp",
      "points": 0,
      "present": true
    },
    {
      "value": "absent",
      "factor": "tremor",
      "points": 0,
      "present": true
    },
    {
      "value": "absent",
      "factor": "sweat",
      "points": 0,
      "present": true
    },
    {
      "value": "absent",
      "factor": "hallucinations",
      "points": 0,
      "present": true
    },
    {
      "value": "normal",
      "factor": "agitation",
      "points": 0,
      "present": true
    },
    {
      "value": "x3",
      "factor": "orientation",
      "points": 0,
      "present": true
    },
    {
      "value": false,
      "factor": "delusions",
      "points": 0,
      "present": false
    },
    {
      "value": false,
      "factor": "seizures",
      "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": "DeCarolis DD, Rice KL, Ho L, Willenbring ML, Stock CJ",
    "doi": "10.1592/phco.27.4.510",
    "id": "decarolis-2007-minds",
    "pmid": "17381377",
    "source": "Pharmacotherapy. 2007;27(4):510-518",
    "title": "Symptom-driven lorazepam protocol for treatment of severe alcohol withdrawal delirium in the intensive care unit"
  },
  "formula": "mminds",
  "formula_expression": "MINDS = pulse (lt_90 0, 90_to_110 1, gt_110 2) + diastolic_bp (lt_90 0, 90_to_110 1, gt_110 2) + tremor (absent 0, visible 2, moderate 4, severe 6) + sweat (absent 0, moist_palms 2, beads 4, drenching 6) + hallucinations (absent 0, mild 1, moderate_intermittent 2, severe_continuous 3) + agitation (normal 0, somewhat_greater 3, moderately_fidgety 6, pacing_thrashing 9) + orientation (x3 0, x2 2, x1 4, disoriented 6, intubated 0) + delusions (true 6) + seizures (true 6); DeCarolis 2007 Minnesota Detoxification Scale; max 46; not a RASS modification; no published total-score severity or lorazepam-dose bands",
  "max_score": 46,
  "score": 0
}
```

## Errors

- HTTP 400 `invalid_mminds`: MINDS inputs must match DeCarolis 2007 pulse, diastolic blood pressure, tremor, sweat, hallucinations, agitation, orientation, delusions, and seizures. 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).
- [BAWS (Brief Alcohol Withdrawal Scale)](https://magentlab.com/docs/baws) — Sum the five Rastegar 2017 Brief Alcohol Withdrawal Scale items (tremor, diaphoresis, agitation, orientation, hallucinations; each caller-assigned integer 0-3) and return the published 0-15 total plus whether BAWS >=3, the cut that predicted CIWA-Ar >=8 in that paper.
- [PAWSS](https://magentlab.com/docs/pawss) — 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.

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