# Oakland Score for Safe Discharge After Acute Lower GI Bleeding

> Oakland Score for Safe Discharge After Acute Lower GI Bleeding 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 Oakland 2017 risk score (0–35) to determine whether a patient with acute lower gastrointestinal bleeding can be safely discharged from the emergency setting.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/oakland
- 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/oakland-score-for-safe-discharge-after-acute-lower-gi-bleeding-5a511a28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_U2hkW9iF8DDkqODs8X_Bp

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 oakland-score-for-safe-discharge-after-acute-lower-gi-bleeding-5a511a28
```

Example prompt: Compute the Oakland 2017 LGIB safe-discharge score for a 74-year-old male with a heart rate of 95 bpm, systolic BP of 115 mmHg, hemoglobin of 9.2 g/dL, no previous LGIB admission, and blood found on digital rectal exam.

## When to prefer this

Use this endpoint when you need to programmatically compute the Oakland 2017 score for acute lower gastrointestinal bleeding and assess whether a patient meets the derivation-defined safe-discharge threshold (≤8 points). Prefer this over manual calculation when integrating into clinical decision-support workflows, EMR automation, or agent-driven triage pipelines. Note that this is a scoring aid, not a discharge order — clinical judgment is required.

## Known failure modes

- Missing required parameter (age, sex, heart rate, systolic BP, previous_lgib_admission, or dre_blood) returns a validation error
- Hemoglobin value below 3.6 g/dL (after conversion) is rejected with an out-of-range error
- Providing both hemoglobin_g_dl and hemoglobin_g_l simultaneously is rejected
- Age outside 16–120 or heart rate outside 30–220 fails input validation
- Invalid enum for sex (not 'male' or 'female') returns a schema error

## How this service works

Oakland 2017 risk score for safe discharge after acute lower gastrointestinal bleeding. Points from age (0-2), sex (male 1), previous LGIB admission (1), caller-assigned blood on digital rectal examination (1), heart rate (0-3), systolic BP (0-5), and hemoglobin g/dL (0-22); max 35. safe_discharge when score ≤8 (derivation cutoff, not a later US validation). Not a discharge order or LGIB diagnosis. magent does not examine the rectum or assay hemoglobin. Hemoglobin g/dL or g/L.

## Output

Returns the total Oakland score (integer 0–35) and a safe_discharge flag (true when score ≤8, based on the original derivation cutoff). May also return individual point contributions per variable (age, sex, previous LGIB, DRE blood, heart rate, systolic BP, hemoglobin).

## 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": [
      "age",
      "sex",
      "previous_lgib_admission",
      "dre_blood",
      "heart_rate_bpm",
      "systolic_mm_hg"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (integer 16-120). Oakland 2017: ≤39 → 0, 40-69 → 1, ≥70 → 2."
      },
      "sex": {
       "enum": [
        "female",
        "male"
       ],
       "type": "string",
       "description": "Sex as assigned by the caller. female scores 0; male scores 1."
      },
      "dre_blood": {
       "type": "boolean",
       "description": "Blood on digital rectal examination as assigned by the caller (Oakland 2017). true scores 1. magent does not examine the rectum."
      },
      "heart_rate_bpm": {
       "type": "integer",
       "description": "Heart rate in beats per minute (integer 30-220). Oakland 2017: <70 → 0, 70-89 → 1, 90-109 → 2, ≥110 → 3."
      },
      "hemoglobin_g_l": {
       "type": "number",
       "description": "Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both. Values <3.6 g/dL after conversion are rejected."
      },
      "systolic_mm_hg": {
       "type": "number",
       "description": "Systolic blood pressure in mm Hg (50-250). Oakland 2017: 50-89 → 5, 90-119 → 4, 120-129 → 3, 130-159 → 2, ≥160 → 0. magent does not read a blood pressure."
      },
      "hemoglobin_g_dl": {
       "type": "number",
       "description": "Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. Oakland 2017 bands start at 3.6 g/dL: 3.6-6.9 → 22, 7.0-8.9 → 17, 9.0-10.9 → 13, 11.0-12.9 → 8, 13.0-15.9 → 4, ≥16.0 → 0. Values <3.6 after conversion are rejected. magent does not assay hemoglobin."
      },
      "previous_lgib_admission": {
       "type": "boolean",
       "description": "Previous admission for lower GI bleeding as assigned by the caller (Oakland 2017). true scores 1."
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/oakland",
  "count": 2,
  "items": [
   {
    "sex": "female",
    "score": 0,
    "formula": "oakland",
    "citation": {
     "id": "oakland-2017",
     "doi": "10.1016/s2468-1253(17)30150-4",
     "pmid": "28651935",
     "title": "Derivation and validation of a novel risk score for safe discharge after acute lower gastrointestinal bleeding: a modelling study",
     "source": "Lancet Gastroenterol Hepatol. 2017;2(9):635-643",
     "authors": "Oakland K, Jairath V, Uberoi R, Guy R, Ayaru L, Mortensen N, Murphy MF, Collins GS"
    },
    "age_years": 35,
    "dre_blood": false,
    "max_score": 35,
    "components": [
     {
      "value": 35,
      "factor": "age",
      "points": 0,
      "present": false
     },
     {
      "value": "female",
      "factor": "sex",
      "points": 0,
      "present": false
     },
     {
      "factor": "previous_lgib_admission",
      "points": 0,
      "present": false
     },
     {
      "factor": "dre_blood",
      "points": 0,
      "present": false
     },
     {
      "value": 65,
      "factor": "heart_rate",
      "points": 0,
      "present": false
     },
     {
      "value": 165,
      "factor": "systolic",
      "points": 0,
      "present": false
     },
     {
      "value": 16.5,
      "factor": "hemoglobin",
      "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.",
    "oakland_band": "safe_discharge",
    "heart_rate_bpm": 65,
    "systolic_mm_hg": 165,
    "hemoglobin_g_dl": 16.5,
    "formula_expression": "Oakland = age (≤39:0, 40-69:1, ≥70:2) + male 1 + previous_lgib_admission 1 + dre_blood 1 + HR (<70:0, 70-89:1, 90-109:2, ≥110:3) + SBP (50-89:5, 90-119:4, 120-129:3, 130-159:2, ≥160:0) + Hb g/dL (3.6-6.9:22, 7.0-8.9:17, 9.0-10.9:13, 11.0-12.9:8, 13.0-15.9:4, ≥16.0:0); Oakland 2017 derivation; max 35; safe_discharge ≤8",
    "previous_lgib_admission": false
   },
   {
    "sex": "female",
    "score": 0,
    "formula": "oakland",
    "citation": {
     "id": "oakland-2017",
     "doi": "10.1016/s2468-1253(17)30150-4",
     "pmid": "28651935",
     "title": "Derivation and validation of a novel risk score for safe discharge after acute lower gastrointestinal bleeding: a modelling study",
     "source": "Lancet Gastroenterol Hepatol. 2017;2(9):
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/oakland-score-for-safe-discharge-after-acute-lower-gi-bleeding-5a511a28/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)
