MAGENT

Infection / VTE · LIVE

LRINEC score

LRINEC

Sum the Wong 2004 LRINEC laboratory table and return whether the total is at or above the published cutoff of 6.

LIVE $0.005 USDC GET /api/calc/lrinec

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

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

What it computes

Sum the Wong 2004 LRINEC laboratory table and return whether the total is at or above the published cutoff of 6.

When to use

When an agent needs the published Wong 2004 laboratory score and must not invent a necrotizing-fasciitis diagnosis or an operative decision.

When not to use

  • Not a diagnosis of necrotizing fasciitis and not an operative decision.
  • A score below the cutoff of 6 does not exclude disease; Wong later noted that about 10% of patients with score <6 still had necrotizing fasciitis.
  • Wong 2004 laboratory score only. magent does not add a separate high band at 8.

Formula

LRINEC = CRP (>=150 mg/L → 4) + WBC 10^3/mm^3 (<15 → 0; 15-25 → 1; >25 → 2) + hemoglobin g/dL (>13.5 → 0; 11-13.5 → 1; <11 → 2) + sodium (<135 mmol/L → 2) + creatinine (>141 µmol/L → 2) + glucose (>10 mmol/L → 1); max 13; cutoff >=6

Citation

Title
The LRINEC (Laboratory Risk Indicator for Necrotizing Fasciitis) score: a tool for distinguishing necrotizing fasciitis from other soft tissue infections
Authors
Wong CH, Khin LW, Heng KS, Tan KC, Low CO
Source
Crit Care Med. 2004;32(7):1535-1541
DOI
10.1097/01.ccm.0000131218.22741.d4

Worked example

All rows 0

Given: creatinine_mg_dl=1.0crp_mg_l=20glucose_mg_dl=90hemoglobin_g_dl=14sodium_mmol_l=140wbc_k_ul=8

  1. CRP 20 <150 → 0; WBC 8 <15 → 0; Hb 14 >13.5 → 0; Na 140 ≥135 → 0; Cr 1.0 mg/dL ≈88 µmol ≤141 → 0; glucose 90 mg/dL ≈5 mmol ≤10 → 0
  2. Score = 0; at_or_above_cutoff false

Cutoff 6 (CRP 4 + sodium 2)

Given: creatinine_mg_dl=1.0crp_mg_l=150glucose_mg_dl=90hemoglobin_g_dl=14sodium_mmol_l=134wbc_k_ul=8

  1. CRP ≥150 → 4; Na <135 → 2; others 0
  2. Score = 6; at_or_above_cutoff true

Also searched as

  • LRINEC score
  • laboratory risk indicator necrotizing fasciitis
  • Wong LRINEC
  • necrotizing fasciitis score
  • NF laboratory score
  • nec fasc LRINEC

Try

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

/api/calc/lrinec?crp_mg_l=20&wbc_k_ul=8&hemoglobin_g_dl=14&sodium_mmol_l=140&creatinine_mg_dl=1.0&glucose_mg_dl=90

Full URL: https://api.magentlab.com/api/calc/lrinec?crp_mg_l=20&wbc_k_ul=8&hemoglobin_g_dl=14&sodium_mmol_l=140&creatinine_mg_dl=1.0&glucose_mg_dl=90

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/lrinec?crp_mg_l=20&wbc_k_ul=8&hemoglobin_g_dl=14&sodium_mmol_l=140&creatinine_mg_dl=1.0&glucose_mg_dl=90"

Parameters

Name Type Required Description
crp_mg_l number required C-reactive protein in mg/L (0-500). ≥150 scores 4; otherwise 0.
wbc_k_ul number optional WBC in 10^3/mm^3 (same as k/µL or 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. <15 scores 0; 15-25 scores 1; >25 scores 2.
wbc_ul number optional WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. Converted as k/µL = cells/µL / 1000.
hemoglobin_g_dl number required Hemoglobin in g/dL (3-22). >13.5 scores 0; 11-13.5 scores 1; <11 scores 2.
sodium_mmol_l number required Serum sodium in mmol/L (110-160). <135 scores 2; otherwise 0.
creatinine_mg_dl number optional Creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. Converted as µmol/L = mg/dL × 88.42. >141 µmol/L scores 2.
creatinine_umol_l number optional Creatinine in µmol/L (9-1768). Provide this or creatinine_mg_dl. >141 scores 2.
glucose_mg_dl number optional Plasma glucose in mg/dL (50-1000). Provide this or glucose_mmol_l, not both. Converted as mmol/L = mg/dL / 18.0182. >10 mmol/L scores 1.
glucose_mmol_l number optional Plasma glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. >10 scores 1.

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/lrinec 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": [
    {
      "creatinine_mg_dl": "1.0",
      "crp_mg_l": "20",
      "glucose_mg_dl": "90",
      "hemoglobin_g_dl": "14",
      "sodium_mmol_l": "140",
      "wbc_k_ul": "8"
    },
    {
      "creatinine_mg_dl": "1.0",
      "crp_mg_l": "20",
      "glucose_mg_dl": "90",
      "hemoglobin_g_dl": "14",
      "sodium_mmol_l": "140",
      "wbc_k_ul": "8"
    }
  ]
}

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/lrinec",
  "items": [
    {
      "components": [
        {
          "value": 20.0,
          "factor": "crp",
          "points": 0,
          "present": false
        },
        {
          "value": 8.0,
          "factor": "wbc",
          "points": 0,
          "present": false
        },
        {
          "value": 14.0,
          "factor": "hemoglobin",
          "points": 0,
          "present": false
        },
        {
          "value": 140.0,
          "factor": "sodium",
          "points": 0,
          "present": false
        },
        {
          "value": 88.42,
          "factor": "creatinine",
          "points": 0,
          "present": false
        },
        {
          "value": 4.994949551009535,
          "factor": "glucose",
          "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": "Wong CH, Khin LW, Heng KS, Tan KC, Low CO",
        "doi": "10.1097/01.ccm.0000131218.22741.d4",
        "id": "wong-2004",
        "source": "Crit Care Med. 2004;32(7):1535-1541",
        "title": "The LRINEC (Laboratory Risk Indicator for Necrotizing Fasciitis) score: a tool for distinguishing necrotizing fasciitis from other soft tissue infections"
      },
      "formula": "lrinec",
      "formula_expression": "LRINEC = CRP (>=150 mg/L → 4) + WBC 10^3/mm^3 (<15 → 0; 15-25 → 1; >25 → 2) + hemoglobin g/dL (>13.5 → 0; 11-13.5 → 1; <11 → 2) + sodium (<135 mmol/L → 2) + creatinine (>141 µmol/L → 2) + glucose (>10 mmol/L → 1); max 13; cutoff >=6",
      "max_score": 13,
      "score": 0,
      "sodium_mmol_l": 140.0,
      "wbc_k_ul": 8.0,
      "hemoglobin_g_dl": 14.0,
      "at_or_above_cutoff": false,
      "creatinine_umol_l": 88.42,
      "crp_mg_l": 20.0,
      "glucose_mmol_l": 4.994949551009535
    },
    {
      "components": [
        {
          "value": 20.0,
          "factor": "crp",
          "points": 0,
          "present": false
        },
        {
          "value": 8.0,
          "factor": "wbc",
          "points": 0,
          "present": false
        },
        {
          "value": 14.0,
          "factor": "hemoglobin",
          "points": 0,
          "present": false
        },
        {
          "value": 140.0,
          "factor": "sodium",
          "points": 0,
          "present": false
        },
        {
          "value": 88.42,
          "factor": "creatinine",
          "points": 0,
          "present": false
        },
        {
          "value": 4.994949551009535,
          "factor": "glucose",
          "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": "Wong CH, Khin LW, Heng KS, Tan KC, Low CO",
        "doi": "10.1097/01.ccm.0000131218.22741.d4",
        "id": "wong-2004",
        "source": "Crit Care Med. 2004;32(7):1535-1541",
        "title": "The LRINEC (Laboratory Risk Indicator for Necrotizing Fasciitis) score: a tool for distinguishing necrotizing fasciitis from other soft tissue infections"
      },
      "formula": "lrinec",
      "formula_expression": "LRINEC = CRP (>=150 mg/L → 4) + WBC 10^3/mm^3 (<15 → 0; 15-25 → 1; >25 → 2) + hemoglobin g/dL (>13.5 → 0; 11-13.5 → 1; <11 → 2) + sodium (<135 mmol/L → 2) + creatinine (>141 µmol/L → 2) + glucose (>10 mmol/L → 1); max 13; cutoff >=6",
      "max_score": 13,
      "score": 0,
      "sodium_mmol_l": 140.0,
      "wbc_k_ul": 8.0,
      "hemoglobin_g_dl": 14.0,
      "at_or_above_cutoff": false,
      "creatinine_umol_l": 88.42,
      "crp_mg_l": 20.0,
      "glucose_mmol_l": 4.994949551009535
    }
  ]
}

Response

Field Type Description
formula string lrinec
formula_expression string Exact expression used
score integer LRINEC points 0-13
max_score integer 13
at_or_above_cutoff boolean true iff score >= 6 (Wong 2004 cutoff)
crp_mg_l number CRP in mg/L used
wbc_k_ul number WBC in 10^3/mm^3 used
hemoglobin_g_dl number Hemoglobin in g/dL used
sodium_mmol_l number Sodium in mmol/L used
creatinine_umol_l number Creatinine in µmol/L used (mg/dL × 88.42)
glucose_mmol_l number Glucose in mmol/L used
components array Per-lab Wong 2004 points
citation object Wong et al. Crit Care Med 2004 citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "components": [
    {
      "value": 20.0,
      "factor": "crp",
      "points": 0,
      "present": false
    },
    {
      "value": 8.0,
      "factor": "wbc",
      "points": 0,
      "present": false
    },
    {
      "value": 14.0,
      "factor": "hemoglobin",
      "points": 0,
      "present": false
    },
    {
      "value": 140.0,
      "factor": "sodium",
      "points": 0,
      "present": false
    },
    {
      "value": 88.42,
      "factor": "creatinine",
      "points": 0,
      "present": false
    },
    {
      "value": 4.994949551009535,
      "factor": "glucose",
      "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": "Wong CH, Khin LW, Heng KS, Tan KC, Low CO",
    "doi": "10.1097/01.ccm.0000131218.22741.d4",
    "id": "wong-2004",
    "source": "Crit Care Med. 2004;32(7):1535-1541",
    "title": "The LRINEC (Laboratory Risk Indicator for Necrotizing Fasciitis) score: a tool for distinguishing necrotizing fasciitis from other soft tissue infections"
  },
  "formula": "lrinec",
  "formula_expression": "LRINEC = CRP (>=150 mg/L → 4) + WBC 10^3/mm^3 (<15 → 0; 15-25 → 1; >25 → 2) + hemoglobin g/dL (>13.5 → 0; 11-13.5 → 1; <11 → 2) + sodium (<135 mmol/L → 2) + creatinine (>141 µmol/L → 2) + glucose (>10 mmol/L → 1); max 13; cutoff >=6",
  "max_score": 13,
  "score": 0,
  "sodium_mmol_l": 140.0,
  "wbc_k_ul": 8.0,
  "hemoglobin_g_dl": 14.0,
  "at_or_above_cutoff": false,
  "creatinine_umol_l": 88.42,
  "crp_mg_l": 20.0,
  "glucose_mmol_l": 4.994949551009535
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_crp crp_mg_l must be a number from 0 to 500. Returned before settlement; you are not charged.
400 invalid_wbc wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.
400 invalid_hemoglobin hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.
400 invalid_sodium sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.
400 invalid_creatinine creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.
400 invalid_glucose glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required 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

  • SIRS — Compute the Bone 1992 ACCP/SCCM SIRS criteria from temperature, heart rate, respiratory rate, and WBC, with optional PaCO2 and band percent.
  • SOFA — Compute the Vincent 1996 SOFA score from PaO2/FiO2, platelets, bilirubin, MAP and adrenergic agents, GCS, and creatinine or urine output.
  • qSOFA — Compute the Sepsis-3 qSOFA score from respiratory rate, caller-assigned altered mentation, and systolic blood pressure.

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