# HAPS (Harmless Acute Pancreatitis Score) Calculator

> HAPS (Harmless Acute Pancreatitis 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-15).

Computes the HAPS (Lankisch 2009) harmless acute pancreatitis score from three caller-supplied boolean clinical flags: rebound tenderness/guarding, hematocrit, and serum creatinine.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/haps
- 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/haps-harmless-acute-pancreatitis-score-calculator-6f58555c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_INYCdeGFEFd8dY7jhvUdU

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 haps-harmless-acute-pancreatitis-score-calculator-6f58555c
```

Example prompt: Can you run the HAPS harmless acute pancreatitis score for my patient? Rebound tenderness and guarding are absent, hematocrit is normal, and serum creatinine is normal.

## When to prefer this

Use this endpoint when you need to programmatically apply the HAPS (Lankisch 2009) harmless acute pancreatitis score and already have clinical determinations for rebound/guarding, hematocrit, and creatinine as boolean flags. Prefer this over manual scoring when building clinical workflows, decision-support agents, or documentation pipelines that handle pancreatitis triage.

## Known failure modes

- Missing required boolean flags (rebound_or_guarding, hematocrit_normal, creatinine_normal) returns a validation error
- Non-boolean values for flag parameters cause schema rejection
- Payment not provided returns 402 Payment Required

## How this service works

HAPS (Lankisch 2009). Harmless iff rebound tenderness and/or guarding is absent, hematocrit is normal, and serum creatinine is normal. The caller assigns each flag as already determined. magent does not examine the abdomen and does not measure hematocrit or creatinine. No millimetre or sex lab cutoffs. Not a medical device, not a diagnosis, and not a discharge order.

## Output

Returns a structured HAPS result indicating whether the acute pancreatitis case is classified as 'harmless' per the Lankisch 2009 criteria — i.e., all three conditions met: rebound tenderness/guarding absent, hematocrit normal, and serum creatinine normal. Not a diagnosis or discharge order.

## 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": [
      "rebound_or_guarding",
      "hematocrit_normal",
      "creatinine_normal"
     ],
     "properties": {
      "creatinine_normal": {
       "type": "boolean",
       "description": "Serum creatinine is normal as assigned by the caller. true means normal and the harmless criterion holds; false means not normal. magent does not measure creatinine and does not apply a millimetre or sex cutoff."
      },
      "hematocrit_normal": {
       "type": "boolean",
       "description": "Hematocrit is normal as assigned by the caller. true means normal and the harmless criterion holds; false means not normal. magent does not measure hematocrit and does not apply a millimetre or sex cutoff."
      },
      "rebound_or_guarding": {
       "type": "boolean",
       "description": "Rebound tenderness and/or guarding. true means present and the harmless criterion fails. true or false as assigned by the caller. magent does not examine the abdomen."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/haps",
  "count": 2,
  "items": [
   {
    "formula": "haps",
    "citation": {
     "id": "lankisch-2009",
     "doi": "10.1016/j.cgh.2009.02.020",
     "pmid": "19245846",
     "title": "The harmless acute pancreatitis score: a clinical algorithm for rapid initial stratification of nonsevere disease",
     "source": "Clin Gastroenterol Hepatol. 2009;7(6):702-705",
     "authors": "Lankisch PG, Weber-Dany B, Hebel K, Maisonneuve P, Lowenfels AB"
    },
    "criteria": [
     {
      "met": true,
      "factor": "no_rebound_or_guarding"
     },
     {
      "met": true,
      "factor": "hematocrit_normal"
     },
     {
      "met": true,
      "factor": "creatinine_normal"
     }
    ],
    "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.",
    "haps_harmless": true,
    "formula_expression": "harmless iff no rebound tenderness and/or guarding and normal hematocrit and normal serum creatinine"
   },
   {
    "formula": "haps",
    "citation": {
     "id": "lankisch-2009",
     "doi": "10.1016/j.cgh.2009.02.020",
     "pmid": "19245846",
     "title": "The harmless acute pancreatitis score: a clinical algorithm for rapid initial stratification of nonsevere disease",
     "source": "Clin Gastroenterol Hepatol. 2009;7(6):702-705",
     "authors": "Lankisch PG, Weber-Dany B, Hebel K, Maisonneuve P, Lowenfels AB"
    },
    "criteria": [
     {
      "met": true,
      "factor": "no_rebound_or_guarding"
     },
     {
      "met": true,
      "factor": "hematocrit_normal"
     },
     {
      "met": true,
      "factor": "creatinine_normal"
     }
    ],
    "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.",
    "haps_harmless": true,
    "formula_expression": "harmless iff no rebound tenderness and/or guarding and normal hematocrit and normal serum creatinine"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/haps-harmless-acute-pancreatitis-score-calculator-6f58555c/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)
