{"uid":"cap_6BmG4uENKiDxZPDsJj9a1","slug":"lace-readmission-risk-score-calculator-2d5711dd","name":"LACE Readmission Risk Score Calculator","description":"LACE (van Walraven 2010 CMAJ Table 3) from length of stay in days (<1 0; 1 1; 2 2; 3 3; 4-6 4; 7-13 5; >=14 7), acute (emergent) admission (true 3), caller-supplied Charlson comorbidity index (0-3 identity; >=4 5), and ED visits in the previous 6 months (0-3 identity; >=4 4). Score 0-19 only; no unpublished high-risk class. Not a discharge order. magent does not compute Charlson.","url":"https://api.magentlab.com/api/calc/lace","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":["length_of_stay_days","acute_admission","charlson","ed_visits_6mo"],"properties":{"charlson":{"type":"integer","description":"Caller-supplied Charlson comorbidity index (integer 0-37). magent does not compute Charlson. van Walraven 2010 Table 3 C: 0 → 0, 1 → 1, 2 → 2, 3 → 3, ≥4 → 5."},"ed_visits_6mo":{"type":"integer","description":"Emergency-department visits in the previous 6 months (integer 0-30). van Walraven 2010 Table 3 E: 0 → 0, 1 → 1, 2 → 2, 3 → 3, ≥4 → 4."},"acute_admission":{"type":"boolean","description":"Acute (emergent) admission as assigned by the caller (true or false). van Walraven 2010 Table 3 A: true → 3, false → 0."},"length_of_stay_days":{"type":"integer","description":"Length of stay in days (integer 0-365). van Walraven 2010 Table 3 L: <1 → 0, 1 → 1, 2 → 2, 3 → 3, 4-6 → 4, 7-13 → 5, ≥14 → 7. 0 days is the <1 bin."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"path":"/api/calc/lace","count":2,"items":[{"score":1,"formula":"lace","charlson":0,"citation":{"id":"van-walraven-2010","doi":"10.1503/cmaj.091117","pmid":"20194559","title":"Derivation and validation of an index to predict early death or unplanned readmission after discharge from hospital to the community","source":"CMAJ. 2010;182(6):551-557","authors":"van Walraven C, Dhalla IA, Bell C, Etchells E, Stiell IG, Zarnke K, Austin PC, Forster AJ"},"max_score":19,"components":[{"value":1,"factor":"length_of_stay","points":1,"present":true},{"factor":"acute_admission","points":0,"present":false},{"value":0,"factor":"charlson","points":0,"present":false},{"value":0,"factor":"ed_visits_6mo","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.","ed_visits_6mo":0,"acute_admission":false,"formula_expression":"LACE = los_points + acute_admission_points + charlson_points + ed_visits_points; van Walraven 2010 Table 3; LOS <1 0, 1 1, 2 2, 3 3, 4-6 4, 7-13 5, >=14 7; acute true 3; Charlson 0-3 identity, >=4 5; ED 0-3 identity, >=4 4; max 19","length_of_stay_days":1},{"score":1,"formula":"lace","charlson":0,"citation":{"id":"van-walraven-2010","doi":"10.1503/cmaj.091117","pmid":"20194559","title":"Derivation and validation of an index to predict early death or unplanned readmission after discharge from hospital to the community","source":"CMAJ. 2010;182(6):551-557","authors":"van Walraven C, Dhalla IA, Bell C, Etchells E, Stiell IG, Zarnke K, Austin PC, Forster AJ"},"max_score":19,"components":[{"value":1,"factor":"length_of_stay","points":1,"present":true},{"factor":"acute_admission","points":0,"present":false},{"value":0,"factor":"charlson","points":0,"present":false},{"value":0,"factor":"ed_visits_6mo","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.","ed_visits_6mo":0,"acute_admission":false,"formula_expression":"LACE = los_points + acute_admission_points + charlson_points + ed_visits_points; van Walraven 2010 Table 3; LOS <1 0, 1 1, 2 2, 3 3, 4-6 4, 7-13 5, >=14 7; acute true 3; Charlson 0-3 identity, >=4 5; ED 0-3 identity, >=4 4; max 19","length_of_stay_days":1}]}},"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_Do1B1a4lmdj7VJ8l6EGy6","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":"Computes the LACE index (0-19) for 30-day hospital readmission risk from length of stay, acute admission status, Charlson comorbidity index, and ED visit count.","exampleAgentPrompt":"Calculate the LACE score for a patient who stayed 5 days, was admitted as an emergency, has a Charlson comorbidity index of 2, and had 1 ED visit in the last 6 months.","exampleUseCases":[{"title":"Discharge planning risk flag","prompt":"I need to know the LACE readmission risk score for a patient who had a 3-day stay, came in through the ER (acute admission), has a Charlson score of 4, and visited the ED twice in the past 6 months — can you compute that before we finalize discharge?"},{"title":"Quality metrics reporting pipeline","prompt":"As part of our monthly readmission audit, compute the LACE index for a patient with a 14-day inpatient stay, non-acute admission, Charlson comorbidity index of 1, and zero ED visits in the prior 6 months."},{"title":"High-risk patient triage screening","prompt":"Flag whether this patient is high-risk for readmission using the LACE score — they were in the hospital for 8 days, admitted emergently, have a Charlson index of 5, and came to the ED 4 times in the last 6 months."}],"resultDescription":"Returns a LACE composite score from 0 to 19, calculated by summing mapped point values for length of stay (L), acute admission status (A), caller-supplied Charlson comorbidity index (C), and ED visits in the prior 6 months (E), per van Walraven 2010 CMAJ Table 3. The endpoint does not classify risk tiers or issue clinical recommendations.","failureModes":["Missing required query parameters (length_of_stay_days, acute_admission, charlson, ed_visits_6mo) returns an error","Non-integer values for integer fields cause validation failure","charlson or ed_visits_6mo values below 0 or outside expected range may be rejected","Payment not provided via x402 protocol results in 402 Payment Required","Server-side errors return 5xx responses"],"whenToPreferThis":"Use this endpoint when you need a fast, standards-compliant LACE index calculation and already have the Charlson comorbidity index computed externally. Prefer it over general-purpose calculators when you need strict adherence to van Walraven 2010 Table 3 mapping bins (e.g., LOS ≥14 maps to 7, not linear interpolation). Not appropriate for computing Charlson itself — use a separate Charlson calculator first. Suitable for integration into EHR discharge workflows, population health dashboards, and readmission quality reporting pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:20:00.983Z","isFirstParty":false}