MAGENT

Infection / VTE · LIVE

Shorr score for MRSA pneumonia

Shorr score

Sum the Shorr 2013 Table 2 MRSA pneumonia risk points and return score, max_score, and the published low, medium, or high band.

LIVE $0.005 USDC GET /api/calc/shorr

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

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

What it computes

Sum the Shorr 2013 Table 2 MRSA pneumonia risk points and return score, max_score, and the published low, medium, or high band.

When to use

When an agent needs the published Shorr 2013 MRSA pneumonia point total and must not invent an antibiotic order, HCAP criteria, or DRIP.

When not to use

  • Not a medical device.
  • Not an antibiotic order and not a MRSA diagnosis. This tool returns score, max_score, and risk_band only.
  • Shorr 2013 Table 2 only. Not HCAP (healthcare-associated pneumonia) criteria and not the Webb 2016 DRIP score.
  • hospitalization_90d is a recent inpatient stay of ≥2 days within 90 days as in Shorr 2013. The caller assigns the flag.
  • nursing_home_ltac_snf is recent nursing home, LTAC, or SNF exposure as in Shorr 2013. magent does not classify the facility.
  • Female with diabetes scores 1; diabetes in a male scores 0. Age <30 or >79 scores 1 (29 scores 1, 30 scores 0, 79 scores 0, 80 scores 1).

Formula

Shorr = hospitalization_90d (2) + icu_admission (2) + age_lt_30_or_gt_79 (1) + prior_iv_antibiotics (1) + dementia (1) + cerebrovascular_disease (1) + female_and_diabetes (1) + nursing_home_ltac_snf (1); max 10; 0-1 low, 2-5 medium, >=6 high

Citation

Title
A risk score for identifying methicillin-resistant Staphylococcus aureus in patients presenting to the hospital with pneumonia
Authors
Shorr AF, Myers DE, Huang DB, Nathanson BH, Emons MF, Kollef MH
Source
BMC Infect Dis. 2013;13:268
DOI
10.1186/1471-2334-13-268

Worked example

Age 50, male, all flags false

Given: age=50cerebrovascular_disease=falsedementia=falsediabetes=falsehospitalization_90d=falseicu_admission=falsenursing_home_ltac_snf=falseprior_iv_antibiotics=falsesex=male

  1. Age 50 is not <30 or >79 → 0; sex male and diabetes false → 0
  2. hospitalization_90d, icu_admission, prior_iv_antibiotics, dementia, cerebrovascular_disease, and nursing_home_ltac_snf false → 0
  3. Score = 0 (max 10); risk_band low

Age 80, female, all Table 2 items present

Given: age=80cerebrovascular_disease=truedementia=truediabetes=truehospitalization_90d=trueicu_admission=truenursing_home_ltac_snf=trueprior_iv_antibiotics=truesex=female

  1. hospitalization_90d 2 + icu_admission 2 + age >79 1 + prior_iv_antibiotics 1
  2. dementia 1 + cerebrovascular_disease 1 + female and diabetes 1 + nursing_home_ltac_snf 1
  3. Score = 10 (max 10); risk_band high

Also searched as

  • Shorr score
  • Shorr MRSA pneumonia
  • MRSA pneumonia risk score
  • Shorr 2013
  • methicillin-resistant Staphylococcus aureus pneumonia score
  • hospital pneumonia MRSA score

Try

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

/api/calc/shorr?age=50&sex=male&hospitalization_90d=false&icu_admission=false&prior_iv_antibiotics=false&dementia=false&cerebrovascular_disease=false&diabetes=false&nursing_home_ltac_snf=false

Full URL: https://api.magentlab.com/api/calc/shorr?age=50&sex=male&hospitalization_90d=false&icu_admission=false&prior_iv_antibiotics=false&dementia=false&cerebrovascular_disease=false&diabetes=false&nursing_home_ltac_snf=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/shorr?age=50&sex=male&hospitalization_90d=false&icu_admission=false&prior_iv_antibiotics=false&dementia=false&cerebrovascular_disease=false&diabetes=false&nursing_home_ltac_snf=false"

Parameters

Name Type Required Description
age integer required Age in years (18-120). Shorr 2013 Table 2: <30 or >79 scores 1; 30 through 79 scores 0. 29 scores 1; 30 scores 0; 79 scores 0; 80 scores 1.
sex string required · female, male female or male. Female with diabetes scores 1 (Shorr 2013 Table 2). Male with diabetes scores 0. Sex alone does not score.
hospitalization_90d boolean required Recent inpatient hospitalization for ≥2 days within 90 days (Shorr 2013 Table 2, 2 points). true or false as assigned by the caller.
icu_admission boolean required ICU admission (Shorr 2013 Table 2, 2 points). true or false as assigned by the caller.
prior_iv_antibiotics boolean required Prior IV antibiotic exposure (Shorr 2013 Table 2, 1 point). true or false as assigned by the caller.
dementia boolean required Dementia (Shorr 2013 Table 2, 1 point). true or false as assigned by the caller.
cerebrovascular_disease boolean required Cerebrovascular disease (Shorr 2013 Table 2, 1 point). true or false as assigned by the caller.
diabetes boolean required Diabetes mellitus. Scores 1 only when sex is female (Shorr 2013 Table 2). Male with diabetes scores 0. true or false as assigned by the caller.
nursing_home_ltac_snf boolean required Recent nursing home, long-term acute care, or skilled nursing facility exposure (Shorr 2013 Table 2, 1 point). true or false as assigned by the caller. magent does not classify the facility.

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/shorr 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": [
    {
      "age": "50",
      "cerebrovascular_disease": "false",
      "dementia": "false",
      "diabetes": "false",
      "hospitalization_90d": "false",
      "icu_admission": "false",
      "nursing_home_ltac_snf": "false",
      "prior_iv_antibiotics": "false",
      "sex": "male"
    },
    {
      "age": "50",
      "cerebrovascular_disease": "false",
      "dementia": "false",
      "diabetes": "false",
      "hospitalization_90d": "false",
      "icu_admission": "false",
      "nursing_home_ltac_snf": "false",
      "prior_iv_antibiotics": "false",
      "sex": "male"
    }
  ]
}

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/shorr",
  "items": [
    {
      "components": [
        {
          "factor": "hospitalization_90d",
          "points": 0,
          "present": false
        },
        {
          "factor": "icu_admission",
          "points": 0,
          "present": false
        },
        {
          "value": 50,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "factor": "prior_iv_antibiotics",
          "points": 0,
          "present": false
        },
        {
          "factor": "dementia",
          "points": 0,
          "present": false
        },
        {
          "factor": "cerebrovascular_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "female_diabetes",
          "points": 0,
          "present": false
        },
        {
          "factor": "nursing_home_ltac_snf",
          "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": "Shorr AF, Myers DE, Huang DB, Nathanson BH, Emons MF, Kollef MH",
        "doi": "10.1186/1471-2334-13-268",
        "id": "shorr-2013",
        "pmid": "23742753",
        "source": "BMC Infect Dis. 2013;13:268",
        "title": "A risk score for identifying methicillin-resistant Staphylococcus aureus in patients presenting to the hospital with pneumonia"
      },
      "formula": "shorr",
      "formula_expression": "Shorr = hospitalization_90d (2) + icu_admission (2) + age_lt_30_or_gt_79 (1) + prior_iv_antibiotics (1) + dementia (1) + cerebrovascular_disease (1) + female_and_diabetes (1) + nursing_home_ltac_snf (1); max 10; 0-1 low, 2-5 medium, >=6 high",
      "max_score": 10,
      "score": 0,
      "age_years": 50,
      "risk_band": "low",
      "sex": "male"
    },
    {
      "components": [
        {
          "factor": "hospitalization_90d",
          "points": 0,
          "present": false
        },
        {
          "factor": "icu_admission",
          "points": 0,
          "present": false
        },
        {
          "value": 50,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "factor": "prior_iv_antibiotics",
          "points": 0,
          "present": false
        },
        {
          "factor": "dementia",
          "points": 0,
          "present": false
        },
        {
          "factor": "cerebrovascular_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "female_diabetes",
          "points": 0,
          "present": false
        },
        {
          "factor": "nursing_home_ltac_snf",
          "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": "Shorr AF, Myers DE, Huang DB, Nathanson BH, Emons MF, Kollef MH",
        "doi": "10.1186/1471-2334-13-268",
        "id": "shorr-2013",
        "pmid": "23742753",
        "source": "BMC Infect Dis. 2013;13:268",
        "title": "A risk score for identifying methicillin-resistant Staphylococcus aureus in patients presenting to the hospital with pneumonia"
      },
      "formula": "shorr",
      "formula_expression": "Shorr = hospitalization_90d (2) + icu_admission (2) + age_lt_30_or_gt_79 (1) + prior_iv_antibiotics (1) + dementia (1) + cerebrovascular_disease (1) + female_and_diabetes (1) + nursing_home_ltac_snf (1); max 10; 0-1 low, 2-5 medium, >=6 high",
      "max_score": 10,
      "score": 0,
      "age_years": 50,
      "risk_band": "low",
      "sex": "male"
    }
  ]
}

Response

Field Type Description
formula string shorr
formula_expression string Exact expression used
score integer Shorr 2013 Table 2 points 0-10
max_score integer 10
risk_band string Shorr 2013 band: low (0-1), medium (2-5), or high (≥6). A band, not a MRSA prevalence and not an antibiotic order.
age_years integer Age used for the <30 or >79 criterion
sex string female or male used for the female-with-diabetes item
components array Per-factor points
citation object Shorr et al. BMC Infect Dis 2013 citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "components": [
    {
      "factor": "hospitalization_90d",
      "points": 0,
      "present": false
    },
    {
      "factor": "icu_admission",
      "points": 0,
      "present": false
    },
    {
      "value": 50,
      "factor": "age",
      "points": 0,
      "present": false
    },
    {
      "factor": "prior_iv_antibiotics",
      "points": 0,
      "present": false
    },
    {
      "factor": "dementia",
      "points": 0,
      "present": false
    },
    {
      "factor": "cerebrovascular_disease",
      "points": 0,
      "present": false
    },
    {
      "factor": "female_diabetes",
      "points": 0,
      "present": false
    },
    {
      "factor": "nursing_home_ltac_snf",
      "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": "Shorr AF, Myers DE, Huang DB, Nathanson BH, Emons MF, Kollef MH",
    "doi": "10.1186/1471-2334-13-268",
    "id": "shorr-2013",
    "pmid": "23742753",
    "source": "BMC Infect Dis. 2013;13:268",
    "title": "A risk score for identifying methicillin-resistant Staphylococcus aureus in patients presenting to the hospital with pneumonia"
  },
  "formula": "shorr",
  "formula_expression": "Shorr = hospitalization_90d (2) + icu_admission (2) + age_lt_30_or_gt_79 (1) + prior_iv_antibiotics (1) + dementia (1) + cerebrovascular_disease (1) + female_and_diabetes (1) + nursing_home_ltac_snf (1); max 10; 0-1 low, 2-5 medium, >=6 high",
  "max_score": 10,
  "score": 0,
  "age_years": 50,
  "risk_band": "low",
  "sex": "male"
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_age age must be an integer from 18 to 120 Returned before settlement; you are not charged.
400 invalid_sex sex must be female or male Returned before settlement; you are not charged.
400 invalid_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_shorr each Shorr 2013 MRSA pneumonia item must be a published value. 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

  • DRIP — Sum the Webb 2016 DRIP (drug resistance in pneumonia) major and minor flags and return score, max, and high_risk at ≥4.
  • CURB-65 — Compute the CURB-65 community-acquired pneumonia severity score from age and discrete flags.

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.