{"uid":"cap_fMOnaFimOTBFlzGtO8X1u","slug":"gupta-2013-postoperative-pneumonia-risk-calculator-7a910320","name":"Gupta 2013 Postoperative Pneumonia Risk Calculator","description":"Gupta 2013 Mayo Clin Proc logistic probability of postoperative pneumonia from age, COPD, ASA class, functional status, preoperative sepsis, smoking in the last year, and surgery type (hernia reference). Returns logit and estimated_probability_percent. Not a medical device, not a diagnosis, not an antibiotic order, and not a ventilator order. Gupta 2013 publishes no low/high cutoff and does not use race.","url":"https://api.magentlab.com/api/calc/gupta_pneumonia","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","required":["age","copd","functional_status","asa_class","sepsis","smoking","surgery"],"properties":{"age":{"type":"integer","description":"Age in years (18-120). Gupta 2013 Mayo Clin Proc: +0.0144 per year."},"copd":{"type":"boolean","description":"Gupta 2013 COPD causing functional disability or hospitalization, or FEV1 <75%, as assigned by the caller: true (reference, 0) or false (-0.4553). magent does not diagnose COPD."},"sepsis":{"enum":["none","sirs","sepsis","septic_shock"],"type":"string","description":"Gupta 2013 Mayo Clin Proc preoperative sepsis category as assigned by the caller: none (-0.7641), sirs (reference, 0), sepsis (-0.0842), or septic_shock (+0.1048). magent does not diagnose sepsis."},"smoking":{"type":"boolean","description":"Gupta 2013 smoking within the last year as assigned by the caller: true (reference, 0) or false (-0.4306)."},"surgery":{"enum":["hernia","anorectal","aortic","bariatric","brain","breast","cardiac","ent","foregut_hpb","gbaas","intestinal","neck","obstetric_gynecologic","orthopedic","other_abdomen","peripheral_vascular","skin","spine","thoracic","vein","urology"],"type":"string","description":"Gupta 2013 Mayo Clin Proc procedure category as assigned by the caller. hernia (ventral, inguinal, or femoral) is the reference (0). gbaas is gallbladder, appendix, adrenal, or spleen. thoracic is non-esophageal thoracic. orthopedic is orthopedic or non-vascular extremity. ent excludes thyroid/parathyroid (neck). magent does not classify a CPT code."},"asa_class":{"type":"integer","description":"ASA physical status 1-5 (Gupta 2013 Mayo Clin Proc logistic table; class 5 is the reference). class 1 -3.0225, class 2 -1.6057, class 3 -0.4915, class 4 +0.0123, class 5 adds 0. Caller-assigned integer."},"functional_status":{"enum":["independent","partially_dependent","totally_dependent"],"type":"string","description":"Gupta 2013 Mayo Clin Proc functional status as assigned by the caller: independent (reference, 0), partially_dependent (+0.7653), or totally_dependent (+0.9400). magent does not examine the patient."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_9GxorvvtKZ8IYP4GFdAcS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the Gupta 2013 (Mayo Clin Proc) logistic probability of postoperative pneumonia from age, COPD, ASA class, functional status, preoperative sepsis, smoking, and surgery type","exampleAgentPrompt":"What is the Gupta 2013 postoperative pneumonia probability for a 67-year-old patient with COPD, ASA class 3, independent functional status, preoperative SIRS, who smoked in the last year and is scheduled for thoracic surgery?","exampleUseCases":[{"title":"Preoperative pneumonia risk for cardiac surgery","prompt":"I need the Gupta 2013 pneumonia probability for a 72-year-old patient — no COPD, ASA class 4, partially dependent functional status, sepsis preoperatively, non-smoker, and going in for cardiac surgery."},{"title":"Low-risk elective hernia repair patient","prompt":"Run the Gupta 2013 postoperative pneumonia score for a 45-year-old with no COPD, ASA class 1, independent functional status, no sepsis or SIRS, non-smoker, having a hernia repair."},{"title":"High-risk aortic surgery risk stratification","prompt":"Give me the Gupta 2013 pneumonia risk estimate for a 78-year-old with COPD, ASA class 4, totally dependent functional status, septic shock preoperatively, smoked in the last year, undergoing aortic surgery."}],"resultDescription":"Returns a JSON object containing the logit (log-odds value from the Gupta 2013 logistic regression model) and estimated_probability_percent (the probability of postoperative pneumonia expressed as a percentage), with no low/high cutoff defined by the original publication.","failureModes":["Missing required query parameters (age, copd, functional_status, asa_class, sepsis, smoking, surgery) returns a validation error","Age outside the 18-120 range may be rejected","Invalid enum values for surgery, sepsis, or functional_status return an error","Payment not provided or invalid x402 payment results in 402 response","Network timeout or server error returns 5xx"],"whenToPreferThis":"Use this endpoint when you need the validated Gupta 2013 Mayo Clinic Proceedings logistic regression estimate specifically — not a generic pneumonia risk heuristic. Prefer it over manual calculation to avoid arithmetic error in the logistic model coefficients. It is appropriate for perioperative decision-support workflows where a published, peer-reviewed probability estimate is required. It does not use race as a predictor and does not define actionable cutoffs, consistent with the source publication.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:02:32.068Z","isFirstParty":false}