MAGENT

Infection / VTE · LIVE

DRIP drug resistance in pneumonia

DRIP

Sum the Webb 2016 DRIP (drug resistance in pneumonia) major and minor flags and return score, max, and high_risk at ≥4.

LIVE $0.005 USDC GET /api/calc/drip

Markdown: /docs/drip.md · Canonical: https://magentlab.com/docs/drip

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

What it computes

Sum the Webb 2016 DRIP (drug resistance in pneumonia) major and minor flags and return score, max, and high_risk at ≥4.

When to use

When an agent needs the published DRIP point total and must not invent an antibiotic order or HCAP criteria.

When not to use

  • Not a medical device.
  • Not an antibiotic order and not a diagnosis of drug-resistant pneumonia.
  • This tool is the Webb 2016 DRIP table only. It is not HCAP (healthcare-associated pneumonia) criteria.
  • long_term_care is long-term acute care, skilled nursing, or inpatient rehabilitation as in Webb 2016; not assisted living or a group home. The caller assigns the flag; magent does not classify the facility.
  • poor_functional_status is Karnofsky <70 or non-ambulatory as in Webb 2016. The caller supplies the boolean; magent does not compute Karnofsky.

Formula

DRIP = antibiotics_60d (2) + long_term_care (2) + tube_feeding (2) + prior_drp_1yr (2) + hospitalization_60d (1) + chronic_pulmonary_disease (1) + poor_functional_status (1) + gastric_acid_suppression (1) + wound_care (1) + mrsa_colonization_1yr (1); max 14; high_risk iff score >= 4

Citation

Title
Derivation and multicenter validation of the drug resistance in pneumonia clinical prediction score
Authors
Webb BJ, Dascomb K, Stenehjem E, et al.
Source
Antimicrob Agents Chemother. 2016;60(5):2652-2663
DOI
10.1128/AAC.03071-15

Worked example

All ten flags false

Given: antibiotics_60d=falsechronic_pulmonary_disease=falsegastric_acid_suppression=falsehospitalization_60d=falselong_term_care=falsemrsa_colonization_1yr=falsepoor_functional_status=falseprior_drp_1yr=falsetube_feeding=falsewound_care=false

  1. Four major flags absent → 0 each
  2. Six minor flags absent → 0 each
  3. Score = 0 (max 14); high_risk false

All ten flags true

Given: antibiotics_60d=truechronic_pulmonary_disease=truegastric_acid_suppression=truehospitalization_60d=truelong_term_care=truemrsa_colonization_1yr=truepoor_functional_status=trueprior_drp_1yr=truetube_feeding=truewound_care=true

  1. Four major flags → 2 each (8)
  2. Six minor flags → 1 each (6)
  3. Score = 14 (max 14); high_risk true

Also searched as

  • DRIP score
  • drug resistance in pneumonia
  • Webb DRIP
  • DRIP pneumonia score
  • drug-resistant pneumonia
  • prior DRP score

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/drip?antibiotics_60d=false&long_term_care=false&tube_feeding=false&prior_drp_1yr=false&hospitalization_60d=false&chronic_pulmonary_disease=false&poor_functional_status=false&gastric_acid_suppression=false&wound_care=false&mrsa_colonization_1yr=false

Full URL: https://api.magentlab.com/api/calc/drip?antibiotics_60d=false&long_term_care=false&tube_feeding=false&prior_drp_1yr=false&hospitalization_60d=false&chronic_pulmonary_disease=false&poor_functional_status=false&gastric_acid_suppression=false&wound_care=false&mrsa_colonization_1yr=false

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/drip?antibiotics_60d=false&long_term_care=false&tube_feeding=false&prior_drp_1yr=false&hospitalization_60d=false&chronic_pulmonary_disease=false&poor_functional_status=false&gastric_acid_suppression=false&wound_care=false&mrsa_colonization_1yr=false"

Parameters

Name Type Required Description
antibiotics_60d boolean required Antibiotic use within 60 days (Webb 2016 major, 2 points). true or false as assigned by the caller.
long_term_care boolean required Residence in long-term acute care, a skilled nursing facility, or inpatient rehabilitation (Webb 2016 major, 2 points). Not assisted living or a group home. The caller assigns the flag; magent does not classify the facility. true or false.
tube_feeding boolean required Tube feeding (Webb 2016 major, 2 points). true or false as assigned by the caller.
prior_drp_1yr boolean required Prior drug-resistant pneumonia within 1 year (Webb 2016 major, 2 points). true or false as assigned by the caller.
hospitalization_60d boolean required Hospitalization within 60 days (Webb 2016 minor, 1 point). true or false as assigned by the caller.
chronic_pulmonary_disease boolean required Chronic pulmonary disease (Webb 2016 minor, 1 point). true or false as assigned by the caller.
poor_functional_status boolean required Poor functional status as in Webb 2016 (Karnofsky <70 or non-ambulatory). Caller-assigned boolean; magent does not compute Karnofsky. 1 point if true.
gastric_acid_suppression boolean required Gastric acid suppression (Webb 2016 minor, 1 point). true or false as assigned by the caller.
wound_care boolean required Wound care (Webb 2016 minor, 1 point). true or false as assigned by the caller.
mrsa_colonization_1yr boolean required MRSA colonization within 1 year (Webb 2016 minor, 1 point). true or false as assigned by the caller.

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.

POST /api/calc/drip Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "items": [
    {
      "antibiotics_60d": "false",
      "chronic_pulmonary_disease": "false",
      "gastric_acid_suppression": "false",
      "hospitalization_60d": "false",
      "long_term_care": "false",
      "mrsa_colonization_1yr": "false",
      "poor_functional_status": "false",
      "prior_drp_1yr": "false",
      "tube_feeding": "false",
      "wound_care": "false"
    },
    {
      "antibiotics_60d": "false",
      "chronic_pulmonary_disease": "false",
      "gastric_acid_suppression": "false",
      "hospitalization_60d": "false",
      "long_term_care": "false",
      "mrsa_colonization_1yr": "false",
      "poor_functional_status": "false",
      "prior_drp_1yr": "false",
      "tube_feeding": "false",
      "wound_care": "false"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/drip",
  "items": [
    {
      "components": [
        {
          "factor": "antibiotics_60d",
          "points": 0,
          "present": false
        },
        {
          "factor": "long_term_care",
          "points": 0,
          "present": false
        },
        {
          "factor": "tube_feeding",
          "points": 0,
          "present": false
        },
        {
          "factor": "prior_drp_1yr",
          "points": 0,
          "present": false
        },
        {
          "factor": "hospitalization_60d",
          "points": 0,
          "present": false
        },
        {
          "factor": "chronic_pulmonary_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "poor_functional_status",
          "points": 0,
          "present": false
        },
        {
          "factor": "gastric_acid_suppression",
          "points": 0,
          "present": false
        },
        {
          "factor": "wound_care",
          "points": 0,
          "present": false
        },
        {
          "factor": "mrsa_colonization_1yr",
          "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": "Webb BJ, Dascomb K, Stenehjem E, et al.",
        "doi": "10.1128/AAC.03071-15",
        "id": "webb-2016",
        "pmid": "26856838",
        "source": "Antimicrob Agents Chemother. 2016;60(5):2652-2663",
        "title": "Derivation and multicenter validation of the drug resistance in pneumonia clinical prediction score"
      },
      "formula": "drip",
      "formula_expression": "DRIP = antibiotics_60d (2) + long_term_care (2) + tube_feeding (2) + prior_drp_1yr (2) + hospitalization_60d (1) + chronic_pulmonary_disease (1) + poor_functional_status (1) + gastric_acid_suppression (1) + wound_care (1) + mrsa_colonization_1yr (1); max 14; high_risk iff score >= 4",
      "max_score": 14,
      "score": 0,
      "high_risk": false
    },
    {
      "components": [
        {
          "factor": "antibiotics_60d",
          "points": 0,
          "present": false
        },
        {
          "factor": "long_term_care",
          "points": 0,
          "present": false
        },
        {
          "factor": "tube_feeding",
          "points": 0,
          "present": false
        },
        {
          "factor": "prior_drp_1yr",
          "points": 0,
          "present": false
        },
        {
          "factor": "hospitalization_60d",
          "points": 0,
          "present": false
        },
        {
          "factor": "chronic_pulmonary_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "poor_functional_status",
          "points": 0,
          "present": false
        },
        {
          "factor": "gastric_acid_suppression",
          "points": 0,
          "present": false
        },
        {
          "factor": "wound_care",
          "points": 0,
          "present": false
        },
        {
          "factor": "mrsa_colonization_1yr",
          "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": "Webb BJ, Dascomb K, Stenehjem E, et al.",
        "doi": "10.1128/AAC.03071-15",
        "id": "webb-2016",
        "pmid": "26856838",
        "source": "Antimicrob Agents Chemother. 2016;60(5):2652-2663",
        "title": "Derivation and multicenter validation of the drug resistance in pneumonia clinical prediction score"
      },
      "formula": "drip",
      "formula_expression": "DRIP = antibiotics_60d (2) + long_term_care (2) + tube_feeding (2) + prior_drp_1yr (2) + hospitalization_60d (1) + chronic_pulmonary_disease (1) + poor_functional_status (1) + gastric_acid_suppression (1) + wound_care (1) + mrsa_colonization_1yr (1); max 14; high_risk iff score >= 4",
      "max_score": 14,
      "score": 0,
      "high_risk": false
    }
  ]
}

Response

Field Type Description
formula string drip
formula_expression string Exact expression used
score integer DRIP points 0-14 (Webb 2016)
max_score integer 14
high_risk boolean true iff score ≥ 4 (Webb 2016 cutoff). Not an antibiotic order and not a diagnosis of drug-resistant pneumonia.
components array Per-factor points
citation object Webb et al. AAC 2016 citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "components": [
    {
      "factor": "antibiotics_60d",
      "points": 0,
      "present": false
    },
    {
      "factor": "long_term_care",
      "points": 0,
      "present": false
    },
    {
      "factor": "tube_feeding",
      "points": 0,
      "present": false
    },
    {
      "factor": "prior_drp_1yr",
      "points": 0,
      "present": false
    },
    {
      "factor": "hospitalization_60d",
      "points": 0,
      "present": false
    },
    {
      "factor": "chronic_pulmonary_disease",
      "points": 0,
      "present": false
    },
    {
      "factor": "poor_functional_status",
      "points": 0,
      "present": false
    },
    {
      "factor": "gastric_acid_suppression",
      "points": 0,
      "present": false
    },
    {
      "factor": "wound_care",
      "points": 0,
      "present": false
    },
    {
      "factor": "mrsa_colonization_1yr",
      "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": "Webb BJ, Dascomb K, Stenehjem E, et al.",
    "doi": "10.1128/AAC.03071-15",
    "id": "webb-2016",
    "pmid": "26856838",
    "source": "Antimicrob Agents Chemother. 2016;60(5):2652-2663",
    "title": "Derivation and multicenter validation of the drug resistance in pneumonia clinical prediction score"
  },
  "formula": "drip",
  "formula_expression": "DRIP = antibiotics_60d (2) + long_term_care (2) + tube_feeding (2) + prior_drp_1yr (2) + hospitalization_60d (1) + chronic_pulmonary_disease (1) + poor_functional_status (1) + gastric_acid_suppression (1) + wound_care (1) + mrsa_colonization_1yr (1); max 14; high_risk iff score >= 4",
  "max_score": 14,
  "score": 0,
  "high_risk": false
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_drip each DRIP flag must be true or false (Webb 2016). Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • CURB-65 — Compute the CURB-65 community-acquired pneumonia severity score from age and discrete flags.
  • PSI / PORT — Compute the Fine 1997 Pneumonia Severity Index (PORT) two-step risk class and Table 2 point total for community-acquired pneumonia.

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. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /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.