# NEDOCS (National ED Overcrowding Study) Score Calculator

> NEDOCS (National ED Overcrowding Study) Score 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-14).

Calculates the Weiss 2004 NEDOCS five-variable reduced model score to quantify emergency department overcrowding, returning the linear score and the ≥100 overcrowding threshold flag.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/nedocs
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nedocs-national-ed-overcrowding-study-score-calculator-3242a98e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A4zDM_4Rh7hHFSCsve_Ra

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 nedocs-national-ed-overcrowding-study-score-calculator-3242a98e
```

Example prompt: Can you calculate the NEDOCS score for our ED right now? We have 72 patients in 50 ED beds, 18 boarding patients waiting for inpatient beds out of 420 hospital beds total, 3 patients on respirators, our longest admitted patient has been here 14.5 hours, and the last patient called from the waiting room waited 2.3 hours.

## When to prefer this

Use this endpoint when you need a rapid, standardized Weiss 2004 NEDOCS score from already-collected census data and have all five inputs available (ED patients, ED beds, boarding patients, hospital beds, respirators, admit time, reg time). It is preferable over manual calculation when building automated ED dashboards, QI audit pipelines, or staffing escalation triggers. Not appropriate if you need real-time bed or patient counting (the caller must supply those figures), or if you need a different crowding tool such as EDOCS or EDWIN.

## Known failure modes

- Missing required query parameters (ed_patients, ed_beds, boarding_patients, hospital_beds, respirators, admit_time_hours, reg_time_hours) returns a validation error
- Values outside allowed ranges (e.g. ed_patients >200, hospital_beds >3000, admit_time_hours >120) may return a 400 or out-of-range error
- Non-integer values for integer fields cause schema validation failure
- Payment not processed (x402 protocol) results in a 402 response before calculation occurs
- Network timeout or upstream error returns a 5xx response

## How this service works

Weiss 2004 National ED Overcrowding Study (NEDOCS) reduced five-variable model: ED patients indexed to ED beds, boarding indexed to hospital beds, respirators, longest admitted-patient hours since registration, and last-called registration-to-bed hours. Returns the linear score (1 decimal) and the published ≥100 overcrowding cutoff. Caller supplies counts and hours; magent does not count beds or wait times. Not a medical device and not a diversion or ambulance-bypass order.

## Output

Returns the NEDOCS linear score to one decimal place computed from the Weiss 2004 reduced five-variable model, along with a flag indicating whether the score meets or exceeds the published ≥100 overcrowding threshold. Does not issue diversion or ambulance-bypass orders.

## 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": [
      "ed_patients",
      "ed_beds",
      "boarding_patients",
      "hospital_beds",
      "respirators",
      "admit_time_hours",
      "reg_time_hours"
     ],
     "properties": {
      "ed_beds": {
       "type": "integer",
       "description": "Number of ED beds (integer 1-300). Weiss 2004 patindex denominator. The paper's average academic ED was 50 ED beds. magent does not count beds."
      },
      "ed_patients": {
       "type": "integer",
       "description": "Total patients in the ED (integer 0-200). Weiss 2004 patindex numerator (full rooms + hallways + doubled-up). magent does not count patients."
      },
      "respirators": {
       "type": "integer",
       "description": "Patients on respirators in the ED (integer 0-20). Weiss 2004 reduced-model respirators term. magent does not count ventilators."
      },
      "hospital_beds": {
       "type": "integer",
       "description": "Number of hospital beds (integer 1-3000). Weiss 2004 admit-index denominator. The paper's average academic hospital was 500 beds. magent does not count beds."
      },
      "reg_time_hours": {
       "type": "number",
       "description": "Hours from registration until the last patient called from the waiting room was called to a bed (0-48). Weiss 2004 reduced-model reg time. magent does not measure wait times."
      },
      "admit_time_hours": {
       "type": "number",
       "description": "Hours the longest-waiting admitted patient has been in the ED since registration (0-120). Weiss 2004 reduced-model admit time. Not time since the admission order (that bed-time variable was omitted). magent does not measure wait times."
      },
      "boarding_patients": {
       "type": "integer",
       "description": "Patients in the ED awaiting inpatient beds (integer 0-200). Weiss 2004 admit-index numerator. magent does not count boarding patients."
      }
     }
    }
   },
   "additionalPrope
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nedocs-national-ed-overcrowding-study-score-calculator-3242a98e/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)
