MAGENT

Neonatal · LIVE

Neonatal early-onset sepsis risk

Return the Puopolo 2011 logistic prior probability of neonatal early-onset infection at birth from maternal temperature, gestational age, rupture of membranes, GBS, and intrapartum antibiotics, then the Escobar 2014 posterior after a caller-assigned well, equivocal, or ill exam. Infants ≥34 weeks.

LIVE $0.005 USDC GET /api/calc/neonatal_eos

Markdown: /docs/neonatal-eos.md · Canonical: https://magentlab.com/docs/neonatal-eos

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

What it computes

Return the Puopolo 2011 logistic prior probability of neonatal early-onset infection at birth from maternal temperature, gestational age, rupture of membranes, GBS, and intrapartum antibiotics, then the Escobar 2014 posterior after a caller-assigned well, equivocal, or ill exam. Infants ≥34 weeks.

When to use

When an agent already has maternal intrapartum temperature, gestational age ≥34 weeks, ROM hours, GBS status, antibiotic timing flags, a published incidence (0.3-0.6 per 1000), and a caller-assigned Escobar 2014 clinical category, and needs the published prior and posterior risks per 1000. magent does not examine the infant or order antibiotics.

When not to use

  • Not a medical device. Not a sepsis diagnosis. Not an antibiotic order. magent does not examine the infant.
  • Puopolo 2011 applies to infants ≥34 weeks. Gestational age below 34 weeks is rejected.
  • The prior intercept is the published incidence-specific constant (0.3/0.4/0.5/0.6 per 1000), which replaces the 47.8398 case-control term printed with the coefficient list.
  • clinical_category is caller-assigned from Escobar 2014 (well / equivocal / ill). Posterior uses that paper's conservative upper-95% CI likelihood ratios (0.41 / 5.0 / 21.2). magent does not observe vital signs or assign the category.

Formula

SRS = 1/(1+exp(−βx)); βx = intercept(eos_incidence_per_1000) + 0.8680×maternal_temp_f + (−6.9325)×GA + 0.0877×GA² + 1.2256×(ROM_h+0.05)^0.2 + (−1.0488)×gbs_or_any_abx_2h + (−1.1861)×broad_spectrum_abx_4h + GBS(positive 0.5771, unknown 0.0427, negative 0). Intercepts replace the printed 47.8398 case-control constant: 0.3→40.0528, 0.4→40.3415, 0.5→40.5656, 0.6→40.7489. Posterior odds = prior odds × Escobar 2014 conservative upper-95% CI LRs (well 0.41, equivocal 5.0, ill 21.2). Infants ≥34 weeks. Not a sepsis diagnosis or antibiotic order.

Citation

Title
Estimating the probability of neonatal early-onset infection on the basis of maternal risk factors
Authors
Puopolo KM, Draper D, Wi S, Newman TB, Zupancic J, Lieberman E, Smith M, Escobar GJ
Source
Pediatrics. 2011;128(5):e1155-e1163
DOI
10.1542/peds.2010-3464

Worked example

Term 40 weeks, 98.6°F, ROM 0, GBS negative, incidence 0.5, well

Given: broad_spectrum_abx_4h=falseclinical_category=welleos_incidence_per_1000=0.5gbs=negativegbs_or_any_abx_2h=falsegestational_age_weeks=40.0maternal_temp_f=98.6rom_hours=0

  1. Intercept for incidence 0.5/1000 is 40.5656 (replaces printed 47.8398)
  2. βx = 40.5656 + 0.8680×98.6 − 6.9325×40 + 0.0877×40² + 1.2256×(0.05)^0.2 = −10.1564
  3. prior_risk_per_1000 = 1/(1+exp(10.1564)) × 1000 = 0.0388
  4. posterior odds = prior odds × 0.41 (Escobar 2014 well, upper 95% CI LR) → 0.0159 per 1000

Same maternal prior with caller-assigned ill exam

Given: broad_spectrum_abx_4h=falseclinical_category=illeos_incidence_per_1000=0.5gbs=negativegbs_or_any_abx_2h=falsegestational_age_weeks=40.0maternal_temp_f=98.6rom_hours=0

  1. Prior is unchanged at 0.0388 per 1000
  2. posterior odds = prior odds × 21.2 (Escobar 2014 ill, upper 95% CI LR) → 0.8224 per 1000

Also searched as

  • early onset sepsis
  • neonatal EOS risk
  • Puopolo EOS
  • newborn sepsis probability
  • GBS early-onset infection
  • intrapartum sepsis risk
  • Escobar clinical EOS

Try

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

/api/calc/neonatal_eos?gestational_age_weeks=40.0&maternal_temp_f=98.6&rom_hours=0&gbs=negative&gbs_or_any_abx_2h=false&broad_spectrum_abx_4h=false&eos_incidence_per_1000=0.5&clinical_category=well

Full URL: https://api.magentlab.com/api/calc/neonatal_eos?gestational_age_weeks=40.0&maternal_temp_f=98.6&rom_hours=0&gbs=negative&gbs_or_any_abx_2h=false&broad_spectrum_abx_4h=false&eos_incidence_per_1000=0.5&clinical_category=well

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/neonatal_eos?gestational_age_weeks=40.0&maternal_temp_f=98.6&rom_hours=0&gbs=negative&gbs_or_any_abx_2h=false&broad_spectrum_abx_4h=false&eos_incidence_per_1000=0.5&clinical_category=well"

Parameters

Name Type Required Description
gestational_age_weeks number required Gestational age in weeks (34.0-43.0). Days as fractional weeks (39+4/7 ≈ 39.5714). Infants below 34 weeks are rejected (Puopolo 2011).
maternal_temp_f number required Highest maternal intrapartum temperature in °F (94.0-108.0), used to 0.1°F.
rom_hours number required Duration of rupture of membranes in hours (0-240). Transformed as (hours+0.05)^0.2.
gbs string required · negative, positive, unknown Maternal GBS status: negative, positive, or unknown (Puopolo 2011).
gbs_or_any_abx_2h boolean required true if GBS-specific antibiotics ≥2 h before delivery or any antibiotics 2-3.9 h before delivery. Caller assigns. true or false.
broad_spectrum_abx_4h boolean required true if broad-spectrum antibiotics ≥4 h before delivery. Caller assigns. true or false.
eos_incidence_per_1000 number required · 0.3, 0.4, 0.5, 0.6 Local EOS incidence per 1000 live births. Only 0.3, 0.4, 0.5, or 0.6 (published intercepts).
clinical_category string required · well, equivocal, ill Caller-assigned Escobar 2014 exam category: well, equivocal, or ill. magent does not examine the infant.

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/neonatal_eos 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": [
    {
      "broad_spectrum_abx_4h": "false",
      "clinical_category": "well",
      "eos_incidence_per_1000": "0.5",
      "gbs": "negative",
      "gbs_or_any_abx_2h": "false",
      "gestational_age_weeks": "40.0",
      "maternal_temp_f": "98.6",
      "rom_hours": "0"
    },
    {
      "broad_spectrum_abx_4h": "false",
      "clinical_category": "well",
      "eos_incidence_per_1000": "0.5",
      "gbs": "negative",
      "gbs_or_any_abx_2h": "false",
      "gestational_age_weeks": "40.0",
      "maternal_temp_f": "98.6",
      "rom_hours": "0"
    }
  ]
}

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/neonatal_eos",
  "items": [
    {
      "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": "Puopolo KM, Draper D, Wi S, Newman TB, Zupancic J, Lieberman E, Smith M, Escobar GJ",
        "doi": "10.1542/peds.2010-3464",
        "id": "puopolo-2011",
        "pmid": "22025590",
        "source": "Pediatrics. 2011;128(5):e1155-e1163",
        "title": "Estimating the probability of neonatal early-onset infection on the basis of maternal risk factors"
      },
      "formula": "neonatal_eos",
      "formula_expression": "SRS = 1/(1+exp(−βx)); βx = intercept(eos_incidence_per_1000) + 0.8680×maternal_temp_f + (−6.9325)×GA + 0.0877×GA² + 1.2256×(ROM_h+0.05)^0.2 + (−1.0488)×gbs_or_any_abx_2h + (−1.1861)×broad_spectrum_abx_4h + GBS(positive 0.5771, unknown 0.0427, negative 0). Intercepts replace the printed 47.8398 case-control constant: 0.3→40.0528, 0.4→40.3415, 0.5→40.5656, 0.6→40.7489. Posterior odds = prior odds × Escobar 2014 conservative upper-95% CI LRs (well 0.41, equivocal 5.0, ill 21.2). Infants ≥34 weeks. Not a sepsis diagnosis or antibiotic order.",
      "broad_spectrum_abx_4h": false,
      "clinical_category": "well",
      "clinical_lr": 0.41,
      "eos_incidence_per_1000": 0.5,
      "gbs": "negative",
      "gbs_or_any_abx_2h": false,
      "gestational_age_weeks": 40.0,
      "maternal_temp_f": 98.6,
      "posterior_risk_per_1000": 0.0159,
      "prior_risk_per_1000": 0.0388,
      "rom_hours": 0.0
    },
    {
      "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": "Puopolo KM, Draper D, Wi S, Newman TB, Zupancic J, Lieberman E, Smith M, Escobar GJ",
        "doi": "10.1542/peds.2010-3464",
        "id": "puopolo-2011",
        "pmid": "22025590",
        "source": "Pediatrics. 2011;128(5):e1155-e1163",
        "title": "Estimating the probability of neonatal early-onset infection on the basis of maternal risk factors"
      },
      "formula": "neonatal_eos",
      "formula_expression": "SRS = 1/(1+exp(−βx)); βx = intercept(eos_incidence_per_1000) + 0.8680×maternal_temp_f + (−6.9325)×GA + 0.0877×GA² + 1.2256×(ROM_h+0.05)^0.2 + (−1.0488)×gbs_or_any_abx_2h + (−1.1861)×broad_spectrum_abx_4h + GBS(positive 0.5771, unknown 0.0427, negative 0). Intercepts replace the printed 47.8398 case-control constant: 0.3→40.0528, 0.4→40.3415, 0.5→40.5656, 0.6→40.7489. Posterior odds = prior odds × Escobar 2014 conservative upper-95% CI LRs (well 0.41, equivocal 5.0, ill 21.2). Infants ≥34 weeks. Not a sepsis diagnosis or antibiotic order.",
      "broad_spectrum_abx_4h": false,
      "clinical_category": "well",
      "clinical_lr": 0.41,
      "eos_incidence_per_1000": 0.5,
      "gbs": "negative",
      "gbs_or_any_abx_2h": false,
      "gestational_age_weeks": 40.0,
      "maternal_temp_f": 98.6,
      "posterior_risk_per_1000": 0.0159,
      "prior_risk_per_1000": 0.0388,
      "rom_hours": 0.0
    }
  ]
}

Response

Field Type Description
formula string neonatal_eos
formula_expression string Puopolo 2011 prior logistic with incidence intercepts replacing 47.8398, then Escobar 2014 posterior
gestational_age_weeks number Input gestational age in weeks
maternal_temp_f number Highest maternal intrapartum temperature in °F, to 0.1
rom_hours number Rupture of membranes in hours
gbs string negative, positive, or unknown
gbs_or_any_abx_2h boolean GBS-specific ≥2 h or any antibiotics 2-3.9 h flag
broad_spectrum_abx_4h boolean Broad-spectrum antibiotics ≥4 h flag
eos_incidence_per_1000 number Incidence used to select the intercept (0.3, 0.4, 0.5, or 0.6)
clinical_category string Caller-assigned well, equivocal, or ill
clinical_lr number Escobar 2014 conservative upper-95% CI likelihood ratio
prior_risk_per_1000 number Puopolo 2011 sepsis risk at birth per 1000 live births, 4 decimals
posterior_risk_per_1000 number Escobar 2014 posterior risk per 1000 after the clinical LR, 4 decimals
citation object Puopolo et al. Pediatrics 2011 citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "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": "Puopolo KM, Draper D, Wi S, Newman TB, Zupancic J, Lieberman E, Smith M, Escobar GJ",
    "doi": "10.1542/peds.2010-3464",
    "id": "puopolo-2011",
    "pmid": "22025590",
    "source": "Pediatrics. 2011;128(5):e1155-e1163",
    "title": "Estimating the probability of neonatal early-onset infection on the basis of maternal risk factors"
  },
  "formula": "neonatal_eos",
  "formula_expression": "SRS = 1/(1+exp(−βx)); βx = intercept(eos_incidence_per_1000) + 0.8680×maternal_temp_f + (−6.9325)×GA + 0.0877×GA² + 1.2256×(ROM_h+0.05)^0.2 + (−1.0488)×gbs_or_any_abx_2h + (−1.1861)×broad_spectrum_abx_4h + GBS(positive 0.5771, unknown 0.0427, negative 0). Intercepts replace the printed 47.8398 case-control constant: 0.3→40.0528, 0.4→40.3415, 0.5→40.5656, 0.6→40.7489. Posterior odds = prior odds × Escobar 2014 conservative upper-95% CI LRs (well 0.41, equivocal 5.0, ill 21.2). Infants ≥34 weeks. Not a sepsis diagnosis or antibiotic order.",
  "broad_spectrum_abx_4h": false,
  "clinical_category": "well",
  "clinical_lr": 0.41,
  "eos_incidence_per_1000": 0.5,
  "gbs": "negative",
  "gbs_or_any_abx_2h": false,
  "gestational_age_weeks": 40.0,
  "maternal_temp_f": 98.6,
  "posterior_risk_per_1000": 0.0159,
  "prior_risk_per_1000": 0.0388,
  "rom_hours": 0.0
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_neonatal_eos Puopolo 2011 / Escobar 2014 EOS inputs must match gestational age, maternal temperature, ROM hours, GBS, antibiotics, incidence, and clinical category. Returned before settlement; you are not charged.
400 invalid_gestational_age_weeks gestational_age_weeks must be at least 34 weeks as in Puopolo 2011 (infants ≥34 weeks). Returned before settlement; you are not charged.
400 invalid_eos_incidence eos_incidence_per_1000 must be 0.3, 0.4, 0.5, or 0.6 as published for the Puopolo 2011 intercepts. Returned before settlement; you are not charged.
400 invalid_eos_clinical clinical_category must be well, equivocal, or ill as in Escobar 2014. 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

  • Apgar score — Compute the Apgar newborn evaluation score as the sum of five caller-assigned 0-2 signs.
  • Eat, Sleep, Console — Apply the Grossman 2018 Eat, Sleep, Console functional assessment from caller-assigned eat, sleep, and console flags. magent does not examine the infant.
  • Rebound hyperbilirubinemia — Return the Chang 2017 three-variable rebound hyperbilirubinemia prediction score after inpatient phototherapy from gestational age, age at phototherapy initiation in days, TSB at termination, and a caller-supplied AAP phototherapy threshold. Scores <20 correspond to a <4% probability of rebound in that paper.

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.