{
  "x402Version": 2,
  "id": 39099,
  "slug": "39099",
  "resource": "https://api.magentlab.com/api/calc/hospital",
  "description": "HOSPITAL (Donze 2013 JAMA Intern Med acronym table): hemoglobin_lt_12 (last Hb <12 g/dL) 1; oncology_service 2; sodium_lt_135 (last Na <135 mmol/L) 1; procedure (any ICD-coded procedure during the stay) 1; urgent_or_emergent_admission 1; admissions_12mo 0-1→0, 2-5→2, >5→5; los_ge_5_days 2. Max 13. Bands 0-4 low, 5-6 intermediate, >=7 high for potentially avoidable 30-day readmission (SQLape), not all-cause. Flags and counts are caller-assigned. Not a discharge order or diagnosis.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "items": [
              {
                "admissions_12mo": 0,
                "hemoglobin_lt_12": false,
                "los_ge_5_days": false,
                "oncology_service": false,
                "procedure": false,
                "sodium_lt_135": false,
                "urgent_or_emergent_admission": false
              },
              {
                "admissions_12mo": 0,
                "hemoglobin_lt_12": false,
                "los_ge_5_days": false,
                "oncology_service": false,
                "procedure": false,
                "sodium_lt_135": false,
                "urgent_or_emergent_admission": false
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "admissions_12mo": 0,
                "citation": {
                  "authors": "Donze J, Aujesky D, Williams D, Schnipper JL",
                  "doi": "10.1001/jamainternmed.2013.3023",
                  "id": "donze-2013",
                  "pmid": "23529115",
                  "source": "JAMA Intern Med. 2013;173(8):632-638",
                  "title": "Potentially Avoidable 30-Day Hospital Readmissions in Medical Patients: Derivation and Validation of a Prediction Model"
                },
                "components": [
                  {
                    "factor": "hemoglobin_lt_12",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "oncology_service",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "sodium_lt_135",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "procedure",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "urgent_or_emergent_admission",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "admissions_12mo",
                    "points": 0,
                    "present": false,
                    "value": 0
                  },
                  {
                    "factor": "los_ge_5_days",
                    "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.",
                "formula": "hospital",
                "formula_expression": "HOSPITAL = hemoglobin_lt_12 (1) + oncology_service (2) + sodium_lt_135 (1) + procedure (1) + urgent_or_emergent_admission (1) + admissions_12mo (0-1: 0, 2-5: 2, >5: 5) + los_ge_5_days (2); Donze 2013 acronym table; max 13; 0-4 low, 5-6 intermediate, >=7 high",
                "max_score": 13,
                "risk_band": "low",
                "score": 0
              },
              {
                "admissions_12mo": 0,
                "citation": {
                  "authors": "Donze J, Aujesky D, Williams D, Schnipper JL",
                  "doi": "10.1001/jamainternmed.2013.3023",
                  "id": "donze-2013",
                  "pmid": "23529115",
                  "source": "JAMA Intern Med. 2013;173(8):632-638",
                  "title": "Potentially Avoidable 30-Day Hospital Readmissions in Medical Patients: Derivation and Validation of a Prediction Model"
                },
                "components": [
                  {
                    "factor": "hemoglobin_lt_12",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "oncology_service",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "sodium_lt_135",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "procedure",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "urgent_or_emergent_admission",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "admissions_12mo",
                    "points": 0,
                    "present": false,
                    "value": 0
                  },
                  {
                    "factor": "los_ge_5_days",
                    "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.",
                "formula": "hospital",
                "formula_expression": "HOSPITAL = hemoglobin_lt_12 (1) + oncology_service (2) + sodium_lt_135 (1) + procedure (1) + urgent_or_emergent_admission (1) + admissions_12mo (0-1: 0, 2-5: 2, >5: 5) + los_ge_5_days (2); Donze 2013 acronym table; max 13; 0-4 low, 5-6 intermediate, >=7 high",
                "max_score": 13,
                "risk_band": "low",
                "score": 0
              }
            ],
            "path": "/api/calc/hospital"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "admissions_12mo": {
                          "description": "Hospital admissions during the previous year (integer 0-50, magent clamp). Donze 2013 A: 0-1 scores 0; 2-5 scores 2; >5 scores 5. Count 0 and 1 both score 0; 2 scores 2; 5 scores 2; 6 scores 5.",
                          "type": "integer"
                        },
                        "hemoglobin_lt_12": {
                          "description": "Last hemoglobin <12 g/dL as assigned by the caller (Donze 2013 H). true scores 1. magent does not assay hemoglobin. Do not send a hemoglobin number.",
                          "type": "boolean"
                        },
                        "los_ge_5_days": {
                          "description": "Length of stay ≥5 days as assigned by the caller (Donze 2013 L). true scores 2. magent does not compute length of stay from dates.",
                          "type": "boolean"
                        },
                        "oncology_service": {
                          "description": "Discharge from an oncology service as assigned by the caller (Donze 2013 O). true scores 2.",
                          "type": "boolean"
                        },
                        "procedure": {
                          "description": "Any ICD-coded procedure during the stay as assigned by the caller (Donze 2013 P). true scores 1. magent does not read the chart.",
                          "type": "boolean"
                        },
                        "sodium_lt_135": {
                          "description": "Last sodium <135 mmol/L as assigned by the caller (Donze 2013 S). true scores 1. magent does not assay sodium. Do not send a sodium number.",
                          "type": "boolean"
                        },
                        "urgent_or_emergent_admission": {
                          "description": "Index admission type urgent or emergent, not elective, as assigned by the caller (Donze 2013 I). true scores 1.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "hemoglobin_lt_12",
                        "oncology_service",
                        "sodium_lt_135",
                        "procedure",
                        "urgent_or_emergent_admission",
                        "admissions_12mo",
                        "los_ge_5_days"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "hospital",
    "readmission",
    "emergency",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T06:26:59.363Z",
  "quality": {
    "calls30d": 5,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-13T06:26:59.213Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "admissions_12mo": 0,
                  "hemoglobin_lt_12": false,
                  "los_ge_5_days": false,
                  "oncology_service": false,
                  "procedure": false,
                  "sodium_lt_135": false,
                  "urgent_or_emergent_admission": false
                },
                {
                  "admissions_12mo": 0,
                  "hemoglobin_lt_12": false,
                  "los_ge_5_days": false,
                  "oncology_service": false,
                  "procedure": false,
                  "sodium_lt_135": false,
                  "urgent_or_emergent_admission": false
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "admissions_12mo": 0,
                  "citation": {
                    "authors": "Donze J, Aujesky D, Williams D, Schnipper JL",
                    "doi": "10.1001/jamainternmed.2013.3023",
                    "id": "donze-2013",
                    "pmid": "23529115",
                    "source": "JAMA Intern Med. 2013;173(8):632-638",
                    "title": "Potentially Avoidable 30-Day Hospital Readmissions in Medical Patients: Derivation and Validation of a Prediction Model"
                  },
                  "components": [
                    {
                      "factor": "hemoglobin_lt_12",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "oncology_service",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "sodium_lt_135",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "procedure",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "urgent_or_emergent_admission",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "admissions_12mo",
                      "points": 0,
                      "present": false,
                      "value": 0
                    },
                    {
                      "factor": "los_ge_5_days",
                      "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.",
                  "formula": "hospital",
                  "formula_expression": "HOSPITAL = hemoglobin_lt_12 (1) + oncology_service (2) + sodium_lt_135 (1) + procedure (1) + urgent_or_emergent_admission (1) + admissions_12mo (0-1: 0, 2-5: 2, >5: 5) + los_ge_5_days (2); Donze 2013 acronym table; max 13; 0-4 low, 5-6 intermediate, >=7 high",
                  "max_score": 13,
                  "risk_band": "low",
                  "score": 0
                },
                {
                  "admissions_12mo": 0,
                  "citation": {
                    "authors": "Donze J, Aujesky D, Williams D, Schnipper JL",
                    "doi": "10.1001/jamainternmed.2013.3023",
                    "id": "donze-2013",
                    "pmid": "23529115",
                    "source": "JAMA Intern Med. 2013;173(8):632-638",
                    "title": "Potentially Avoidable 30-Day Hospital Readmissions in Medical Patients: Derivation and Validation of a Prediction Model"
                  },
                  "components": [
                    {
                      "factor": "hemoglobin_lt_12",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "oncology_service",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "sodium_lt_135",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "procedure",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "urgent_or_emergent_admission",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "admissions_12mo",
                      "points": 0,
                      "present": false,
                      "value": 0
                    },
                    {
                      "factor": "los_ge_5_days",
                      "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.",
                  "formula": "hospital",
                  "formula_expression": "HOSPITAL = hemoglobin_lt_12 (1) + oncology_service (2) + sodium_lt_135 (1) + procedure (1) + urgent_or_emergent_admission (1) + admissions_12mo (0-1: 0, 2-5: 2, >5: 5) + los_ge_5_days (2); Donze 2013 acronym table; max 13; 0-4 low, 5-6 intermediate, >=7 high",
                  "max_score": 13,
                  "risk_band": "low",
                  "score": 0
                }
              ],
              "path": "/api/calc/hospital"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "admissions_12mo": {
                            "description": "Hospital admissions during the previous year (integer 0-50, magent clamp). Donze 2013 A: 0-1 scores 0; 2-5 scores 2; >5 scores 5. Count 0 and 1 both score 0; 2 scores 2; 5 scores 2; 6 scores 5.",
                            "type": "integer"
                          },
                          "hemoglobin_lt_12": {
                            "description": "Last hemoglobin <12 g/dL as assigned by the caller (Donze 2013 H). true scores 1. magent does not assay hemoglobin. Do not send a hemoglobin number.",
                            "type": "boolean"
                          },
                          "los_ge_5_days": {
                            "description": "Length of stay ≥5 days as assigned by the caller (Donze 2013 L). true scores 2. magent does not compute length of stay from dates.",
                            "type": "boolean"
                          },
                          "oncology_service": {
                            "description": "Discharge from an oncology service as assigned by the caller (Donze 2013 O). true scores 2.",
                            "type": "boolean"
                          },
                          "procedure": {
                            "description": "Any ICD-coded procedure during the stay as assigned by the caller (Donze 2013 P). true scores 1. magent does not read the chart.",
                            "type": "boolean"
                          },
                          "sodium_lt_135": {
                            "description": "Last sodium <135 mmol/L as assigned by the caller (Donze 2013 S). true scores 1. magent does not assay sodium. Do not send a sodium number.",
                            "type": "boolean"
                          },
                          "urgent_or_emergent_admission": {
                            "description": "Index admission type urgent or emergent, not elective, as assigned by the caller (Donze 2013 I). true scores 1.",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "hemoglobin_lt_12",
                          "oncology_service",
                          "sodium_lt_135",
                          "procedure",
                          "urgent_or_emergent_admission",
                          "admissions_12mo",
                          "los_ge_5_days"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}