# MRC-ICU medication-regimen complexity

MRC-ICU medication-regimen complexity

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

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

## What it computes

Sum the Gwynn 2019 MRC-ICU printed item weights from caller-assigned medication-class counts and device flags.

## When to use

When an agent needs the published MRC-ICU point total and must not invent a pharmacist-staffing ratio or read a medication administration record.

## When not to use

- Not a medical device. Not a pharmacist-staffing order, census target, or monitoring protocol.
- Counts and flags are caller-assigned. magent does not read the MAR, identify a medication, or decide whether two products are the same class.
- A printed × means points times the count of qualifying medications in that class (integer 0-20). Non-multiplier items add the printed weight when the flag is true.
- Parenteral-nutrition rows are two printed items (non-pharmacist service 1 point; clinical specialist pharmacist 3 points). Both may be sent; magent does not enforce exclusivity.
- This is the Gwynn 2019 39-item table. Later MRC-ICU revisions are not applied.

## Formula

```
MRC-ICU (Gwynn 2019) = sum of 39 printed item weights. Multiplier classes (printed ×) are weight × caller-assigned count of qualifying medications (0-20): aminoglycosides 3, antiarrhythmics 1, anticoagulants 1, anticonvulsants 3, azole_antifungals 2, blood_products 2, chemotherapy 3, ganciclovir_valganciclovir 1, hyperosmolar_fluids 1, immunosuppressants 3, prostacyclins 2, therapeutic_heparins 2, continuous_infusions 1, opioids_sedatives 1, continuous_opioids_sedatives 2, antimicrobials 1, restricted_antimicrobials 2. Flags add the printed weight when present: amphotericin_b 1, argatroban 2, clozapine 3, digoxin 3, lidocaine_infusion 2, lithium 3, theophylline 3, vancomycin_iv 3, warfarin 3, neuromuscular_blockade 2, tpn_non_pharmacist 1, tpn_clinical_pharmacist 3, thromboembolic_prophylaxis 1, stress_ulcer_prophylaxis 1, glycemic_control 1, bowel_regimen 1, chlorhexidine 1, dialysis 2, ecmo 2, iabp 1, lvad 1, mechanical_ventilation 2
```

## Citation

[Development and validation of a medication regimen complexity scoring tool for critically ill patients](https://doi.org/10.1093/ajhp/zxy054)
Gwynn ME, Poisson MO, Waller JL, Newsome AS
Am J Health Syst Pharm. 2019;76(Supplement_2):S34-S40
DOI: [10.1093/ajhp/zxy054](https://doi.org/10.1093/ajhp/zxy054)

## Worked example

### No qualifying medications or devices

Given: `lithium=false, therapeutic_heparins=0, digoxin=false, chlorhexidine=false, mechanical_ventilation=false, opioids_sedatives=0, tpn_non_pharmacist=false, lidocaine_infusion=false, clozapine=false, continuous_infusions=0, dialysis=false, warfarin=false, argatroban=false, theophylline=false, neuromuscular_blockade=false, thromboembolic_prophylaxis=false, restricted_antimicrobials=0, anticonvulsants=0, anticoagulants=0, antimicrobials=0, continuous_opioids_sedatives=0, ecmo=false, glycemic_control=false, ganciclovir_valganciclovir=0, hyperosmolar_fluids=0, azole_antifungals=0, bowel_regimen=false, aminoglycosides=0, immunosuppressants=0, antiarrhythmics=0, vancomycin_iv=false, stress_ulcer_prophylaxis=false, prostacyclins=0, iabp=false, chemotherapy=0, lvad=false, amphotericin_b=false, blood_products=0, tpn_clinical_pharmacist=false`

1. all counts 0 and all flags false
2. score = 0


### Intravenous vancomycin only

Given: `lithium=false, therapeutic_heparins=0, digoxin=false, chlorhexidine=false, mechanical_ventilation=false, opioids_sedatives=0, tpn_non_pharmacist=false, lidocaine_infusion=false, clozapine=false, continuous_infusions=0, dialysis=false, warfarin=false, argatroban=false, theophylline=false, neuromuscular_blockade=false, thromboembolic_prophylaxis=false, restricted_antimicrobials=0, anticonvulsants=0, anticoagulants=0, antimicrobials=0, continuous_opioids_sedatives=0, ecmo=false, glycemic_control=false, ganciclovir_valganciclovir=0, hyperosmolar_fluids=0, azole_antifungals=0, bowel_regimen=false, aminoglycosides=0, immunosuppressants=0, antiarrhythmics=0, vancomycin_iv=true, stress_ulcer_prophylaxis=false, prostacyclins=0, iabp=false, chemotherapy=0, lvad=false, amphotericin_b=false, blood_products=0, tpn_clinical_pharmacist=false`

1. vancomycin_iv is a 3-point flag
2. score = 3


### Two aminoglycosides

Given: `lithium=false, therapeutic_heparins=0, digoxin=false, chlorhexidine=false, mechanical_ventilation=false, opioids_sedatives=0, tpn_non_pharmacist=false, lidocaine_infusion=false, clozapine=false, continuous_infusions=0, dialysis=false, warfarin=false, argatroban=false, theophylline=false, neuromuscular_blockade=false, thromboembolic_prophylaxis=false, restricted_antimicrobials=0, anticonvulsants=0, anticoagulants=0, antimicrobials=0, continuous_opioids_sedatives=0, ecmo=false, glycemic_control=false, ganciclovir_valganciclovir=0, hyperosmolar_fluids=0, azole_antifungals=0, bowel_regimen=false, aminoglycosides=2, immunosuppressants=0, antiarrhythmics=0, vancomycin_iv=false, stress_ulcer_prophylaxis=false, prostacyclins=0, iabp=false, chemotherapy=0, lvad=false, amphotericin_b=false, blood_products=0, tpn_clinical_pharmacist=false`

1. aminoglycosides printed 3×
2. score = 3 × 2 = 6


## Also searched as

- MRC-ICU
- medication regimen complexity ICU
- Gwynn 2019 MRC-ICU
- ICU medication complexity score
- vancomycin aminoglycoside ICU score

## Parameters

- `aminoglycosides` (integer, required): Count of aminoglycosides (amikacin, gentamicin, tobramycin) as assigned by the caller (integer 0-20). Gwynn 2019 printed 3×. magent does not read the MAR.
- `amphotericin_b` (boolean, required): Amphotericin B or liposomal amphotericin B present as assigned by the caller (Gwynn 2019). true adds 1 point.
- `antiarrhythmics` (integer, required): Count of antiarrhythmics (amiodarone, dofetilide, sotalol) as assigned by the caller (integer 0-20). Gwynn 2019 printed 1×.
- `anticoagulants` (integer, required): Count of anticoagulants (NOACs/DOACs, fondaparinux) as assigned by the caller (integer 0-20). Gwynn 2019 printed 1×.
- `anticonvulsants` (integer, required): Count of anticonvulsants (carbamazepine, phenobarbital, phenytoin, valproic acid) as assigned by the caller (integer 0-20). Gwynn 2019 printed 3×.
- `argatroban` (boolean, required): Argatroban present as assigned by the caller (Gwynn 2019). true adds 2 points.
- `azole_antifungals` (integer, required): Count of azole antifungals (posaconazole, voriconazole) as assigned by the caller (integer 0-20). Gwynn 2019 printed 2×.
- `blood_products` (integer, required): Count of blood products (factor products, antithrombin III) as assigned by the caller (integer 0-20). Gwynn 2019 printed 2×.
- `chemotherapy` (integer, required): Count of active inpatient chemotherapy agents as assigned by the caller (integer 0-20). Gwynn 2019 printed 3×.
- `clozapine` (boolean, required): Clozapine present as assigned by the caller (Gwynn 2019). true adds 3 points.
- `digoxin` (boolean, required): Digoxin present as assigned by the caller (Gwynn 2019). true adds 3 points.
- `ganciclovir_valganciclovir` (integer, required): Count of ganciclovir or valganciclovir products as assigned by the caller (integer 0-20). Gwynn 2019 printed 1×.
- `hyperosmolar_fluids` (integer, required): Count of hyperosmolar fluids (hypertonic saline 1.5%, 3%, 23.4%; mannitol) as assigned by the caller (integer 0-20). Gwynn 2019 printed 1×.
- `immunosuppressants` (integer, required): Count of immunosuppressants (cyclosporine, sirolimus, tacrolimus) as assigned by the caller (integer 0-20). Gwynn 2019 printed 3×.
- `lidocaine_infusion` (boolean, required): Lidocaine continuous infusion present as assigned by the caller (Gwynn 2019). true adds 2 points.
- `lithium` (boolean, required): Lithium present as assigned by the caller (Gwynn 2019). true adds 3 points.
- `prostacyclins` (integer, required): Count of prostacyclins (epoprostenol, iloprost, treprostinil) as assigned by the caller (integer 0-20). Gwynn 2019 printed 2×.
- `theophylline` (boolean, required): Theophylline present as assigned by the caller (Gwynn 2019). true adds 3 points.
- `therapeutic_heparins` (integer, required): Count of therapeutic heparins (enoxaparin, heparin infusion) as assigned by the caller (integer 0-20). Gwynn 2019 printed 2×.
- `vancomycin_iv` (boolean, required): Intravenous vancomycin present as assigned by the caller (Gwynn 2019). true adds 3 points.
- `warfarin` (boolean, required): Warfarin present as assigned by the caller (Gwynn 2019). true adds 3 points.
- `neuromuscular_blockade` (boolean, required): Neuromuscular blockade present as assigned by the caller (Gwynn 2019). true adds 2 points.
- `continuous_infusions` (integer, required): Count of continuous infusions not listed on another Gwynn 2019 row, as assigned by the caller (integer 0-20). Printed 1×.
- `tpn_non_pharmacist` (boolean, required): Total parenteral nutrition managed by a non-pharmacist service as assigned by the caller (Gwynn 2019). true adds 1 point.
- `tpn_clinical_pharmacist` (boolean, required): Total parenteral nutrition managed by a clinical specialist pharmacist as assigned by the caller (Gwynn 2019). true adds 3 points.
- `thromboembolic_prophylaxis` (boolean, required): Thromboembolic prophylaxis present, excluding heparin infusion and therapeutic enoxaparin, as assigned by the caller (Gwynn 2019). true adds 1 point.
- `stress_ulcer_prophylaxis` (boolean, required): Stress ulcer prophylaxis present, excluding pantoprazole infusion, as assigned by the caller (Gwynn 2019). true adds 1 point.
- `glycemic_control` (boolean, required): Glycemic control with subcutaneous insulin, excluding intravenous insulin, as assigned by the caller (Gwynn 2019). true adds 1 point.
- `bowel_regimen` (boolean, required): Bowel regimen present as assigned by the caller (Gwynn 2019). true adds 1 point.
- `chlorhexidine` (boolean, required): Chlorhexidine present as assigned by the caller (Gwynn 2019). true adds 1 point.
- `opioids_sedatives` (integer, required): Count of scheduled or PRN opioids and sedatives as assigned by the caller (integer 0-20). Gwynn 2019 printed 1×.
- `continuous_opioids_sedatives` (integer, required): Count of continuous-infusion opioids and sedatives (propofol, fentanyl, dexmedetomidine, ketamine, benzodiazepines) as assigned by the caller (integer 0-20). Gwynn 2019 printed 2×.
- `antimicrobials` (integer, required): Count of antimicrobials including HIV medications and excluding agents listed on other Gwynn 2019 rows, as assigned by the caller (integer 0-20). Printed 1×.
- `restricted_antimicrobials` (integer, required): Count of restricted antimicrobials (4th-5th generation cephalosporins, carbapenems, linezolid, daptomycin, colistin/polymyxins) as assigned by the caller (integer 0-20). Gwynn 2019 printed 2×.
- `dialysis` (boolean, required): Dialysis present as assigned by the caller (Gwynn 2019). true adds 2 points.
- `ecmo` (boolean, required): Extracorporeal membrane oxygenation (ECMO) present as assigned by the caller (Gwynn 2019). true adds 2 points.
- `iabp` (boolean, required): Intra-aortic balloon pump (IABP) present as assigned by the caller (Gwynn 2019). true adds 1 point.
- `lvad` (boolean, required): Left ventricular assist device (LVAD) present as assigned by the caller (Gwynn 2019). true adds 1 point.
- `mechanical_ventilation` (boolean, required): Mechanical ventilation present as assigned by the caller (Gwynn 2019). true adds 2 points.

## 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/mrc_icu`
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": [
    {
      "tpn_clinical_pharmacist": "false",
      "blood_products": "0",
      "amphotericin_b": "false",
      "lvad": "false",
      "chemotherapy": "0",
      "iabp": "false",
      "prostacyclins": "0",
      "stress_ulcer_prophylaxis": "false",
      "vancomycin_iv": "false",
      "antiarrhythmics": "0",
      "immunosuppressants": "0",
      "aminoglycosides": "0",
      "bowel_regimen": "false",
      "azole_antifungals": "0",
      "hyperosmolar_fluids": "0",
      "ganciclovir_valganciclovir": "0",
      "glycemic_control": "false",
      "ecmo": "false",
      "continuous_opioids_sedatives": "0",
      "antimicrobials": "0",
      "anticoagulants": "0",
      "anticonvulsants": "0",
      "restricted_antimicrobials": "0",
      "thromboembolic_prophylaxis": "false",
      "neuromuscular_blockade": "false",
      "theophylline": "false",
      "argatroban": "false",
      "warfarin": "false",
      "dialysis": "false",
      "continuous_infusions": "0",
      "clozapine": "false",
      "lidocaine_infusion": "false",
      "tpn_non_pharmacist": "false",
      "opioids_sedatives": "0",
      "mechanical_ventilation": "false",
      "chlorhexidine": "false",
      "digoxin": "false",
      "therapeutic_heparins": "0",
      "lithium": "false"
    },
    {
      "tpn_clinical_pharmacist": "false",
      "blood_products": "0",
      "amphotericin_b": "false",
      "lvad": "false",
      "chemotherapy": "0",
      "iabp": "false",
      "prostacyclins": "0",
      "stress_ulcer_prophylaxis": "false",
      "vancomycin_iv": "false",
      "antiarrhythmics": "0",
      "immunosuppressants": "0",
      "aminoglycosides": "0",
      "bowel_regimen": "false",
      "azole_antifungals": "0",
      "hyperosmolar_fluids": "0",
      "ganciclovir_valganciclovir": "0",
      "glycemic_control": "false",
      "ecmo": "false",
      "continuous_opioids_sedatives": "0",
      "antimicrobials": "0",
      "anticoagulants": "0",
      "anticonvulsants": "0",
      "restricted_antimicrobials": "0",
      "thromboembolic_prophylaxis": "false",
      "neuromuscular_blockade": "false",
      "theophylline": "false",
      "argatroban": "false",
      "warfarin": "false",
      "dialysis": "false",
      "continuous_infusions": "0",
      "clozapine": "false",
      "lidocaine_infusion": "false",
      "tpn_non_pharmacist": "false",
      "opioids_sedatives": "0",
      "mechanical_ventilation": "false",
      "chlorhexidine": "false",
      "digoxin": "false",
      "therapeutic_heparins": "0",
      "lithium": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/mrc_icu",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "aminoglycosides",
          "points": 0,
          "present": false
        },
        {
          "factor": "amphotericin_b",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "antiarrhythmics",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "anticoagulants",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "anticonvulsants",
          "points": 0,
          "present": false
        },
        {
          "factor": "argatroban",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "azole_antifungals",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "blood_products",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "chemotherapy",
          "points": 0,
          "present": false
        },
        {
          "factor": "clozapine",
          "points": 0,
          "present": false
        },
        {
          "factor": "digoxin",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "ganciclovir_valganciclovir",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "hyperosmolar_fluids",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "immunosuppressants",
          "points": 0,
          "present": false
        },
        {
          "factor": "lidocaine_infusion",
          "points": 0,
          "present": false
        },
        {
          "factor": "lithium",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "prostacyclins",
          "points": 0,
          "present": false
        },
        {
          "factor": "theophylline",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "therapeutic_heparins",
          "points": 0,
          "present": false
        },
        {
          "factor": "vancomycin_iv",
          "points": 0,
          "present": false
        },
        {
          "factor": "warfarin",
          "points": 0,
          "present": false
        },
        {
          "factor": "neuromuscular_blockade",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "continuous_infusions",
          "points": 0,
          "present": false
        },
        {
          "factor": "tpn_non_pharmacist",
          "points": 0,
          "present": false
        },
        {
          "factor": "tpn_clinical_pharmacist",
          "points": 0,
          "present": false
        },
        {
          "factor": "thromboembolic_prophylaxis",
          "points": 0,
          "present": false
        },
        {
          "factor": "stress_ulcer_prophylaxis",
          "points": 0,
          "present": false
        },
        {
          "factor": "glycemic_control",
          "points": 0,
          "present": false
        },
        {
          "factor": "bowel_regimen",
          "points": 0,
          "present": false
        },
        {
          "factor": "chlorhexidine",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "opioids_sedatives",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "continuous_opioids_sedatives",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "antimicrobials",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "restricted_antimicrobials",
          "points": 0,
          "present": false
        },
        {
          "factor": "dialysis",
          "points": 0,
          "present": false
        },
        {
          "factor": "ecmo",
          "points": 0,
          "present": false
        },
        {
          "factor": "iabp",
          "points": 0,
          "present": false
        },
        {
          "factor": "lvad",
          "points": 0,
          "present": false
        },
        {
          "factor": "mechanical_ventilation",
          "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": "Gwynn ME, Poisson MO, Waller JL, Newsome AS",
        "doi": "10.1093/ajhp/zxy054",
        "id": "gwynn-2019",
        "pmid": "31067298",
        "source": "Am J Health Syst Pharm. 2019;76(Supplement_2):S34-S40",
        "title": "Development and validation of a medication regimen complexity scoring tool for critically ill patients"
      },
      "formula": "mrc_icu",
      "formula_expression": "MRC-ICU (Gwynn 2019) = sum of 39 printed item weights. Multiplier classes (printed ×) are weight × caller-assigned count of qualifying medications (0-20): aminoglycosides 3, antiarrhythmics 1, anticoagulants 1, anticonvulsants 3, azole_antifungals 2, blood_products 2, chemotherapy 3, ganciclovir_valganciclovir 1, hyperosmolar_fluids 1, immunosuppressants 3, prostacyclins 2, therapeutic_heparins 2, continuous_infusions 1, opioids_sedatives 1, continuous_opioids_sedatives 2, antimicrobials 1, restricted_antimicrobials 2. Flags add the printed weight when present: amphotericin_b 1, argatroban 2, clozapine 3, digoxin 3, lidocaine_infusion 2, lithium 3, theophylline 3, vancomycin_iv 3, warfarin 3, neuromuscular_blockade 2, tpn_non_pharmacist 1, tpn_clinical_pharmacist 3, thromboembolic_prophylaxis 1, stress_ulcer_prophylaxis 1, glycemic_control 1, bowel_regimen 1, chlorhexidine 1, dialysis 2, ecmo 2, iabp 1, lvad 1, mechanical_ventilation 2",
      "score": 0
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "aminoglycosides",
          "points": 0,
          "present": false
        },
        {
          "factor": "amphotericin_b",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "antiarrhythmics",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "anticoagulants",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "anticonvulsants",
          "points": 0,
          "present": false
        },
        {
          "factor": "argatroban",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "azole_antifungals",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "blood_products",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "chemotherapy",
          "points": 0,
          "present": false
        },
        {
          "factor": "clozapine",
          "points": 0,
          "present": false
        },
        {
          "factor": "digoxin",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "ganciclovir_valganciclovir",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "hyperosmolar_fluids",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "immunosuppressants",
          "points": 0,
          "present": false
        },
        {
          "factor": "lidocaine_infusion",
          "points": 0,
          "present": false
        },
        {
          "factor": "lithium",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "prostacyclins",
          "points": 0,
          "present": false
        },
        {
          "factor": "theophylline",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "therapeutic_heparins",
          "points": 0,
          "present": false
        },
        {
          "factor": "vancomycin_iv",
          "points": 0,
          "present": false
        },
        {
          "factor": "warfarin",
          "points": 0,
          "present": false
        },
        {
          "factor": "neuromuscular_blockade",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "continuous_infusions",
          "points": 0,
          "present": false
        },
        {
          "factor": "tpn_non_pharmacist",
          "points": 0,
          "present": false
        },
        {
          "factor": "tpn_clinical_pharmacist",
          "points": 0,
          "present": false
        },
        {
          "factor": "thromboembolic_prophylaxis",
          "points": 0,
          "present": false
        },
        {
          "factor": "stress_ulcer_prophylaxis",
          "points": 0,
          "present": false
        },
        {
          "factor": "glycemic_control",
          "points": 0,
          "present": false
        },
        {
          "factor": "bowel_regimen",
          "points": 0,
          "present": false
        },
        {
          "factor": "chlorhexidine",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "opioids_sedatives",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "continuous_opioids_sedatives",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "antimicrobials",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "restricted_antimicrobials",
          "points": 0,
          "present": false
        },
        {
          "factor": "dialysis",
          "points": 0,
          "present": false
        },
        {
          "factor": "ecmo",
          "points": 0,
          "present": false
        },
        {
          "factor": "iabp",
          "points": 0,
          "present": false
        },
        {
          "factor": "lvad",
          "points": 0,
          "present": false
        },
        {
          "factor": "mechanical_ventilation",
          "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": "Gwynn ME, Poisson MO, Waller JL, Newsome AS",
        "doi": "10.1093/ajhp/zxy054",
        "id": "gwynn-2019",
        "pmid": "31067298",
        "source": "Am J Health Syst Pharm. 2019;76(Supplement_2):S34-S40",
        "title": "Development and validation of a medication regimen complexity scoring tool for critically ill patients"
      },
      "formula": "mrc_icu",
      "formula_expression": "MRC-ICU (Gwynn 2019) = sum of 39 printed item weights. Multiplier classes (printed ×) are weight × caller-assigned count of qualifying medications (0-20): aminoglycosides 3, antiarrhythmics 1, anticoagulants 1, anticonvulsants 3, azole_antifungals 2, blood_products 2, chemotherapy 3, ganciclovir_valganciclovir 1, hyperosmolar_fluids 1, immunosuppressants 3, prostacyclins 2, therapeutic_heparins 2, continuous_infusions 1, opioids_sedatives 1, continuous_opioids_sedatives 2, antimicrobials 1, restricted_antimicrobials 2. Flags add the printed weight when present: amphotericin_b 1, argatroban 2, clozapine 3, digoxin 3, lidocaine_infusion 2, lithium 3, theophylline 3, vancomycin_iv 3, warfarin 3, neuromuscular_blockade 2, tpn_non_pharmacist 1, tpn_clinical_pharmacist 3, thromboembolic_prophylaxis 1, stress_ulcer_prophylaxis 1, glycemic_control 1, bowel_regimen 1, chlorhexidine 1, dialysis 2, ecmo 2, iabp 1, lvad 1, mechanical_ventilation 2",
      "score": 0
    }
  ]
}
```

## Response fields

- `formula` (string): mrc_icu
- `formula_expression` (string): Exact Gwynn 2019 expression used
- `score` (integer): MRC-ICU point total
- `components` (array): Per-item points in printed table order
- `citation` (object): Gwynn et al. AJHP 2019 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 0,
      "factor": "aminoglycosides",
      "points": 0,
      "present": false
    },
    {
      "factor": "amphotericin_b",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "antiarrhythmics",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "anticoagulants",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "anticonvulsants",
      "points": 0,
      "present": false
    },
    {
      "factor": "argatroban",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "azole_antifungals",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "blood_products",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "chemotherapy",
      "points": 0,
      "present": false
    },
    {
      "factor": "clozapine",
      "points": 0,
      "present": false
    },
    {
      "factor": "digoxin",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "ganciclovir_valganciclovir",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "hyperosmolar_fluids",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "immunosuppressants",
      "points": 0,
      "present": false
    },
    {
      "factor": "lidocaine_infusion",
      "points": 0,
      "present": false
    },
    {
      "factor": "lithium",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "prostacyclins",
      "points": 0,
      "present": false
    },
    {
      "factor": "theophylline",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "therapeutic_heparins",
      "points": 0,
      "present": false
    },
    {
      "factor": "vancomycin_iv",
      "points": 0,
      "present": false
    },
    {
      "factor": "warfarin",
      "points": 0,
      "present": false
    },
    {
      "factor": "neuromuscular_blockade",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "continuous_infusions",
      "points": 0,
      "present": false
    },
    {
      "factor": "tpn_non_pharmacist",
      "points": 0,
      "present": false
    },
    {
      "factor": "tpn_clinical_pharmacist",
      "points": 0,
      "present": false
    },
    {
      "factor": "thromboembolic_prophylaxis",
      "points": 0,
      "present": false
    },
    {
      "factor": "stress_ulcer_prophylaxis",
      "points": 0,
      "present": false
    },
    {
      "factor": "glycemic_control",
      "points": 0,
      "present": false
    },
    {
      "factor": "bowel_regimen",
      "points": 0,
      "present": false
    },
    {
      "factor": "chlorhexidine",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "opioids_sedatives",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "continuous_opioids_sedatives",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "antimicrobials",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "restricted_antimicrobials",
      "points": 0,
      "present": false
    },
    {
      "factor": "dialysis",
      "points": 0,
      "present": false
    },
    {
      "factor": "ecmo",
      "points": 0,
      "present": false
    },
    {
      "factor": "iabp",
      "points": 0,
      "present": false
    },
    {
      "factor": "lvad",
      "points": 0,
      "present": false
    },
    {
      "factor": "mechanical_ventilation",
      "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": "Gwynn ME, Poisson MO, Waller JL, Newsome AS",
    "doi": "10.1093/ajhp/zxy054",
    "id": "gwynn-2019",
    "pmid": "31067298",
    "source": "Am J Health Syst Pharm. 2019;76(Supplement_2):S34-S40",
    "title": "Development and validation of a medication regimen complexity scoring tool for critically ill patients"
  },
  "formula": "mrc_icu",
  "formula_expression": "MRC-ICU (Gwynn 2019) = sum of 39 printed item weights. Multiplier classes (printed ×) are weight × caller-assigned count of qualifying medications (0-20): aminoglycosides 3, antiarrhythmics 1, anticoagulants 1, anticonvulsants 3, azole_antifungals 2, blood_products 2, chemotherapy 3, ganciclovir_valganciclovir 1, hyperosmolar_fluids 1, immunosuppressants 3, prostacyclins 2, therapeutic_heparins 2, continuous_infusions 1, opioids_sedatives 1, continuous_opioids_sedatives 2, antimicrobials 1, restricted_antimicrobials 2. Flags add the printed weight when present: amphotericin_b 1, argatroban 2, clozapine 3, digoxin 3, lidocaine_infusion 2, lithium 3, theophylline 3, vancomycin_iv 3, warfarin 3, neuromuscular_blockade 2, tpn_non_pharmacist 1, tpn_clinical_pharmacist 3, thromboembolic_prophylaxis 1, stress_ulcer_prophylaxis 1, glycemic_control 1, bowel_regimen 1, chlorhexidine 1, dialysis 2, ecmo 2, iabp 1, lvad 1, mechanical_ventilation 2",
  "score": 0
}
```

## Errors

- HTTP 400 `invalid_mrc_icu`: Gwynn 2019 MRC-ICU inputs must match that scoring tool's item counts and device flags. 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

- [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.
- [mSOFA](https://magentlab.com/docs/msofa) — Compute the Grissom 2010 modified SOFA (mSOFA) total from SpO2/FiO2, caller-assigned scleral icterus or jaundice, MAP and adrenergic agents, caller-assigned GCS, and creatinine.
- [SAPS II](https://magentlab.com/docs/saps-ii) — Compute the Le Gall 1993 SAPS II integer from 12 physiology variables, age, type of admission, and one chronic disease, then the paper's logit hospital-mortality probability.

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