{"uid":"cap_vFhYmOI9kDXAlh-msb_fu","slug":"weiss-2014-cedocs-reduced-model-calculator-b3cd02f4","name":"Weiss 2014 CEDOCS Reduced Model Calculator","description":"Weiss 2014 Community ED Overcrowding Scale (CEDOCS) reduced model: critical-care patients, longest admitted-patient hours since admission, waiting-room count, ED patients indexed to ED beds, and annual ED visits with a restricted cubic spline. Returns the 1-decimal score on the paper's 0-100 scale without clamping or named class bands. Caller supplies counts and hours; magent does not count patients or wait times. Not a medical device and not a diversion or ambulance-bypass order.","url":"https://api.magentlab.com/api/calc/cedocs","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":["critical_care_patients","admit_time_hours","waiting_room_patients","ed_patients","ed_beds","ed_visits_per_year"],"properties":{"ed_beds":{"type":"integer","description":"Number of ED beds (integer 1-300). Weiss 2014 occupancy denominator. magent does not count beds."},"ed_patients":{"type":"integer","description":"Total patients in the ED (integer 0-200). Weiss 2014 occupancy numerator (beds plus doubled-up or hallway). magent does not count patients."},"admit_time_hours":{"type":"number","description":"Hours the longest-waiting admitted patient has been in the ED since admission (0-120). Weiss 2014 reduced-model B. Not time since registration. magent does not measure wait times."},"ed_visits_per_year":{"type":"integer","description":"ED visits per year (integer 1000-200000). Weiss 2014 reduced-model E with restricted cubic spline knots at 18811, 43012, 49466, and 67273. The paper's spline worked example uses 46000. magent does not count visits."},"waiting_room_patients":{"type":"integer","description":"Patients in the waiting room (integer 0-200). Weiss 2014 reduced-model C. magent does not count waiting-room patients."},"critical_care_patients":{"type":"integer","description":"Critical-care patients in the ED (integer 0-20). Weiss 2014 reduced-model A. magent does not count patients."}}}},"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_lHnCJR3tdkHrkzVfuq-Ji","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 Weiss 2014 Community ED Overcrowding Scale (CEDOCS) reduced-model score (0–100, 1 decimal) from five clinical inputs: critical-care patients, longest admitted-patient wait hours, waiting-room count, ED occupancy ratio, and annual visit volume with cubic spline.","exampleAgentPrompt":"Calculate the CEDOCS reduced-model overcrowding score for an ED with 3 critical-care patients, 8 hours for the longest admitted wait, 12 patients in the waiting room, 28 total ED patients, 20 ED beds, and 46000 annual visits.","exampleUseCases":[{"title":"Real-time ED crowding dashboard","prompt":"Our ED currently has 5 critical-care patients, the longest admitted patient has been here 11 hours, 18 people are in the waiting room, we have 35 total patients and 22 beds, and we see about 55000 visits per year — what's our CEDOCS score right now?"},{"title":"Shift-change capacity briefing","prompt":"At shift handoff our numbers are: 2 critical-care patients, longest admitted wait 6.5 hours, 9 waiting-room patients, 25 total ED patients, 18 beds, and our annual volume is 43000 visits — can you give me the Weiss 2014 CEDOCS overcrowding score?"},{"title":"Retrospective overcrowding analysis","prompt":"I'm reviewing last Tuesday evening's ED data: 4 critical-care patients, longest admitted patient was in the ED 14 hours, 22 in the waiting room, 40 total patients across 24 beds, annual visits 67000 — compute the CEDOCS reduced-model score for that snapshot."}],"resultDescription":"Returns a single numeric CEDOCS score on the Weiss 2014 paper's 0–100 scale, expressed to one decimal place. The score is not clamped and does not include named class bands or diversion recommendations — it is a raw arithmetic output of the reduced model formula including the restricted cubic spline on annual visit volume.","failureModes":["Missing required query parameters (critical_care_patients, admit_time_hours, waiting_room_patients, ed_patients, ed_beds, ed_visits_per_year) → 400 Bad Request","ed_beds value of 0 would cause division-by-zero in occupancy ratio — likely 400 or error response","Values outside documented ranges (e.g. ed_beds > 300, ed_visits_per_year < 1000) may produce out-of-range or undefined spline results","Payment failure via x402 protocol → 402 Payment Required","Non-integer values supplied for integer fields → 400 validation error"],"whenToPreferThis":"Use this endpoint when you need to compute a validated, published ED overcrowding score using the Weiss 2014 CEDOCS reduced model specifically — particularly when the full NEDOCS or EDWIN models are unavailable or the caller is working with community (non-academic) ED benchmarks. Prefer this over manual formula implementation to ensure correct cubic spline knot placement at the paper's specified knots (18811, 43012, 49466, 67273). Not appropriate as a diversion decision tool or for use as a medical device; purely for informational capacity analytics.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:21:01.546Z","isFirstParty":false}