# Weiss 2014 CEDOCS Reduced Model Calculator

> Weiss 2014 CEDOCS Reduced Model Calculator is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

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.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/cedocs
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/weiss-2014-cedocs-reduced-model-calculator-b3cd02f4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vFhYmOI9kDXAlh-msb_fu

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability weiss-2014-cedocs-reduced-model-calculator-b3cd02f4
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/weiss-2014-cedocs-reduced-model-calculator-b3cd02f4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
