# PRESET-Score (Hilder)

PRESET

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

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

## What it computes

Sum the five Hilder 2017 PRESET-Score items and return class I–III with derivation ICU mortality.

## When to use

When an agent needs the published PRESET-Score total and must not invent a cannulation decision or a continuous logit.

## When not to use

- Not a medical device and not an ECMO cannulation, continuation, or withdrawal order. magent does not assay labs or examine the patient.
- Five Hilder 2017 Table 4 categorical items only. There is no continuous logit. MAP is mm Hg, lactate mmol/L, arterial pH, platelets ×1000/µL, and hospital days before ECMO as assigned by the caller.
- ICU mortality percents are the derivation-cohort classes (I 0–5 → 26%, II 6–9 → 68%, III 10–15 → 93%). They are not a website 0–3 / 4–5 class split.
- Not RESP (Schmidt 2014), not SAVE, and not ECMOnet.

## Formula

```
PRESET = map_points + lactate_points + ph_points + platelet_points + hospital_days_points; Hilder 2017 Table 4; MAP >100 → 0, 91-100 → 1, 81-90 → 2, 71-80 → 3, ≤70 → 4; lactate ≤1.50 → 0, 1.51-3.00 → 1, 3.01-6.00 → 2, 6.01-10.00 → 3, >10.00 → 4; arterial pH >7.300 → 0, 7.201-7.300 → 1, 7.101-7.200 → 2, ≤7.100 → 3; platelets >200 → 0, 101-200 → 1, ≤100 → 2; hospital days pre-ECMO ≤2 → 0, 3-7 → 1, >7 → 2; max 15; class I 0-5 (26%), II 6-9 (68%), III 10-15 (93%) derivation ICU mortality
```

## Citation

[Comparison of mortality prediction models in acute respiratory distress syndrome undergoing extracorporeal membrane oxygenation and development of a novel prediction score: the PREdiction of Survival on ECMO Therapy-Score (PRESET-Score)](https://doi.org/10.1186/s13054-017-1888-6)
Hilder M, Herbstreit F, Adamzik M, et al.
Crit Care. 2017;21(1):301
DOI: [10.1186/s13054-017-1888-6](https://doi.org/10.1186/s13054-017-1888-6)

## Worked example

### All Table 4 items in the zero-point band

Given: `arterial_ph=7.40, hospital_days_pre_ecmo=1, lactate_mmol_l=1.0, mean_arterial_pressure_mm_hg=110, platelets_k_ul=250`

1. MAP 110 → 0; lactate 1.0 → 0; pH 7.40 → 0; platelets 250 → 0; hospital days 1 → 0
2. Score = 0 (max 15); class I; derivation ICU mortality 26%


### All Table 4 items at maximum points

Given: `arterial_ph=7.00, hospital_days_pre_ecmo=10, lactate_mmol_l=15, mean_arterial_pressure_mm_hg=60, platelets_k_ul=80`

1. MAP 60 → 4; lactate 15 → 4; pH 7.00 → 3; platelets 80 → 2; hospital days 10 → 2
2. Score = 15 (max 15); class III; derivation ICU mortality 93%


## Also searched as

- PRESET-Score
- PRESET score
- PREdiction of Survival on ECMO Therapy-Score
- Hilder PRESET
- ECMO survival score
- PRESET ECMO
- Hilder 2017 score
- PRESET ARDS ECMO

## Parameters

- `mean_arterial_pressure_mm_hg` (number, required): Mean arterial pressure in mm Hg (20-250). Hilder 2017 Table 4: >100 → 0, 91-100 → 1, 81-90 → 2, 71-80 → 3, ≤70 → 4. magent does not measure blood pressure.
- `lactate_mmol_l` (number, required): Lactate in mmol/L (0.0-30.0). Hilder 2017 Table 4: ≤1.50 → 0, 1.51-3.00 → 1, 3.01-6.00 → 2, 6.01-10.00 → 3, >10.00 → 4. magent does not assay labs.
- `arterial_ph` (number, required): Arterial pH (6.5-8.0). Hilder 2017 Table 4: >7.300 → 0, 7.201-7.300 → 1, 7.101-7.200 → 2, ≤7.100 → 3. magent does not assay blood gas.
- `platelets_k_ul` (number, required): Platelet concentration ×1000/µL (1-2000). Hilder 2017 Table 4: >200 → 0, 101-200 → 1, ≤100 → 2. magent does not assay labs.
- `hospital_days_pre_ecmo` (integer, required): Hospital days before ECMO initiation (integer 0-365). Hilder 2017 Table 4: ≤2 → 0, 3-7 → 1, >7 → 2. Not a cannulation order.

## 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/preset`
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": [
    {
      "arterial_ph": "7.40",
      "hospital_days_pre_ecmo": "1",
      "lactate_mmol_l": "1.0",
      "mean_arterial_pressure_mm_hg": "110",
      "platelets_k_ul": "250"
    },
    {
      "arterial_ph": "7.40",
      "hospital_days_pre_ecmo": "1",
      "lactate_mmol_l": "1.0",
      "mean_arterial_pressure_mm_hg": "110",
      "platelets_k_ul": "250"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/preset",
  "items": [
    {
      "components": [
        {
          "value": 110.0,
          "factor": "mean_arterial_pressure_mm_hg",
          "points": 0,
          "present": false
        },
        {
          "value": 1.0,
          "factor": "lactate_mmol_l",
          "points": 0,
          "present": false
        },
        {
          "value": 7.4,
          "factor": "arterial_ph",
          "points": 0,
          "present": false
        },
        {
          "value": 250.0,
          "factor": "platelets_k_ul",
          "points": 0,
          "present": false
        },
        {
          "value": 1,
          "factor": "hospital_days_pre_ecmo",
          "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": "Hilder M, Herbstreit F, Adamzik M, et al.",
        "doi": "10.1186/s13054-017-1888-6",
        "id": "hilder-2017",
        "pmid": "29233160",
        "source": "Crit Care. 2017;21(1):301",
        "title": "Comparison of mortality prediction models in acute respiratory distress syndrome undergoing extracorporeal membrane oxygenation and development of a novel prediction score: the PREdiction of Survival on ECMO Therapy-Score (PRESET-Score)"
      },
      "formula": "preset",
      "formula_expression": "PRESET = map_points + lactate_points + ph_points + platelet_points + hospital_days_points; Hilder 2017 Table 4; MAP >100 → 0, 91-100 → 1, 81-90 → 2, 71-80 → 3, ≤70 → 4; lactate ≤1.50 → 0, 1.51-3.00 → 1, 3.01-6.00 → 2, 6.01-10.00 → 3, >10.00 → 4; arterial pH >7.300 → 0, 7.201-7.300 → 1, 7.101-7.200 → 2, ≤7.100 → 3; platelets >200 → 0, 101-200 → 1, ≤100 → 2; hospital days pre-ECMO ≤2 → 0, 3-7 → 1, >7 → 2; max 15; class I 0-5 (26%), II 6-9 (68%), III 10-15 (93%) derivation ICU mortality",
      "max_score": 15,
      "score": 0,
      "arterial_ph": 7.4,
      "platelets_k_ul": 250.0,
      "hospital_days_pre_ecmo": 1,
      "icu_mortality_percent": 26,
      "lactate_mmol_l": 1.0,
      "mean_arterial_pressure_mm_hg": 110.0,
      "preset_class": "I"
    },
    {
      "components": [
        {
          "value": 110.0,
          "factor": "mean_arterial_pressure_mm_hg",
          "points": 0,
          "present": false
        },
        {
          "value": 1.0,
          "factor": "lactate_mmol_l",
          "points": 0,
          "present": false
        },
        {
          "value": 7.4,
          "factor": "arterial_ph",
          "points": 0,
          "present": false
        },
        {
          "value": 250.0,
          "factor": "platelets_k_ul",
          "points": 0,
          "present": false
        },
        {
          "value": 1,
          "factor": "hospital_days_pre_ecmo",
          "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": "Hilder M, Herbstreit F, Adamzik M, et al.",
        "doi": "10.1186/s13054-017-1888-6",
        "id": "hilder-2017",
        "pmid": "29233160",
        "source": "Crit Care. 2017;21(1):301",
        "title": "Comparison of mortality prediction models in acute respiratory distress syndrome undergoing extracorporeal membrane oxygenation and development of a novel prediction score: the PREdiction of Survival on ECMO Therapy-Score (PRESET-Score)"
      },
      "formula": "preset",
      "formula_expression": "PRESET = map_points + lactate_points + ph_points + platelet_points + hospital_days_points; Hilder 2017 Table 4; MAP >100 → 0, 91-100 → 1, 81-90 → 2, 71-80 → 3, ≤70 → 4; lactate ≤1.50 → 0, 1.51-3.00 → 1, 3.01-6.00 → 2, 6.01-10.00 → 3, >10.00 → 4; arterial pH >7.300 → 0, 7.201-7.300 → 1, 7.101-7.200 → 2, ≤7.100 → 3; platelets >200 → 0, 101-200 → 1, ≤100 → 2; hospital days pre-ECMO ≤2 → 0, 3-7 → 1, >7 → 2; max 15; class I 0-5 (26%), II 6-9 (68%), III 10-15 (93%) derivation ICU mortality",
      "max_score": 15,
      "score": 0,
      "arterial_ph": 7.4,
      "platelets_k_ul": 250.0,
      "hospital_days_pre_ecmo": 1,
      "icu_mortality_percent": 26,
      "lactate_mmol_l": 1.0,
      "mean_arterial_pressure_mm_hg": 110.0,
      "preset_class": "I"
    }
  ]
}
```

## Response fields

- `formula` (string): preset
- `formula_expression` (string): Exact expression used
- `score` (integer): PRESET-Score points 0-15
- `max_score` (integer): Always 15
- `preset_class` (string): Hilder 2017 derivation risk class I (0-5), II (6-9), or III (10-15). Not a 0-3 / 4-5 website split.
- `icu_mortality_percent` (integer): Derivation-cohort ICU mortality for that class: 26 (I), 68 (II), or 93 (III).
- `mean_arterial_pressure_mm_hg` (number): MAP used, mm Hg
- `lactate_mmol_l` (number): Lactate used, mmol/L
- `arterial_ph` (number): Arterial pH used
- `platelets_k_ul` (number): Platelets used, ×1000/µL
- `hospital_days_pre_ecmo` (integer): Hospital days before ECMO used
- `components` (array): Per-item points
- `citation` (object): Hilder et al. Crit Care 2017 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 110.0,
      "factor": "mean_arterial_pressure_mm_hg",
      "points": 0,
      "present": false
    },
    {
      "value": 1.0,
      "factor": "lactate_mmol_l",
      "points": 0,
      "present": false
    },
    {
      "value": 7.4,
      "factor": "arterial_ph",
      "points": 0,
      "present": false
    },
    {
      "value": 250.0,
      "factor": "platelets_k_ul",
      "points": 0,
      "present": false
    },
    {
      "value": 1,
      "factor": "hospital_days_pre_ecmo",
      "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": "Hilder M, Herbstreit F, Adamzik M, et al.",
    "doi": "10.1186/s13054-017-1888-6",
    "id": "hilder-2017",
    "pmid": "29233160",
    "source": "Crit Care. 2017;21(1):301",
    "title": "Comparison of mortality prediction models in acute respiratory distress syndrome undergoing extracorporeal membrane oxygenation and development of a novel prediction score: the PREdiction of Survival on ECMO Therapy-Score (PRESET-Score)"
  },
  "formula": "preset",
  "formula_expression": "PRESET = map_points + lactate_points + ph_points + platelet_points + hospital_days_points; Hilder 2017 Table 4; MAP >100 → 0, 91-100 → 1, 81-90 → 2, 71-80 → 3, ≤70 → 4; lactate ≤1.50 → 0, 1.51-3.00 → 1, 3.01-6.00 → 2, 6.01-10.00 → 3, >10.00 → 4; arterial pH >7.300 → 0, 7.201-7.300 → 1, 7.101-7.200 → 2, ≤7.100 → 3; platelets >200 → 0, 101-200 → 1, ≤100 → 2; hospital days pre-ECMO ≤2 → 0, 3-7 → 1, >7 → 2; max 15; class I 0-5 (26%), II 6-9 (68%), III 10-15 (93%) derivation ICU mortality",
  "max_score": 15,
  "score": 0,
  "arterial_ph": 7.4,
  "platelets_k_ul": 250.0,
  "hospital_days_pre_ecmo": 1,
  "icu_mortality_percent": 26,
  "lactate_mmol_l": 1.0,
  "mean_arterial_pressure_mm_hg": 110.0,
  "preset_class": "I"
}
```

## Errors

- HTTP 400 `invalid_preset`: PRESET needs Hilder 2017 MAP, lactate, pH, platelets, and pre-ECMO hospital days in published ranges. 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

- [RESP](https://magentlab.com/docs/resp) — Sum Schmidt 2014 Table 3 RESP points from caller-assigned pre-ECMO predictors and return class I–V with published hospital survival percents.
- [APACHE II](https://magentlab.com/docs/apache-ii) — Compute the Knaus 1985 APACHE II integer from 12 Acute Physiology Score items, age points, and chronic-health points.

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