# RIPASA Score Calculator

> RIPASA 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 Chong 2010 RIPASA appendicitis scoring from 15 caller-assigned clinical findings, returning a numeric score and cutoff classification.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/ripasa
- 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/ripasa-score-calculator-6283d745
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HLKACx7M3sPu13PcvILMW

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 ripasa-score-calculator-6283d745
```

Example prompt: Calculate the RIPASA score for a 32-year-old male with RIF pain, migration to RIF, nausea, anorexia, symptoms for less than 48 hours, RIF tenderness, guarding present, rebound tenderness present, Rovsing sign positive, fever flagged, raised WCC flagged, negative urinalysis, and no foreign NRIC.

## When to prefer this

Use this endpoint when you need a reproducible, deterministic RIPASA arithmetic computation from caller-supplied clinical findings and do not need the API to interpret vitals, read lab values, or perform physical examination — all 15 inputs must be pre-assessed by the caller. Prefer this over general LLM-based clinical reasoning when you need a traceable, guideline-referenced score output with a documented cutoff.

## Known failure modes

- Missing required query parameters returns a validation error
- Age outside 1–120 integer range is rejected
- Invalid sex enum value (not 'male' or 'female') causes a bad request
- Boolean fields supplied as strings may cause parsing errors
- Score near the 7.5 threshold may be clinically ambiguous — not a diagnosis

## How this service works

Chong 2010 RIPASA score from 15 caller-assigned findings (half-points; max 16). Age <40 scores 1.0, ≥40 scores 0.5; male 1.0, female 0.5; symptoms <48h 1.0, otherwise 0.5. Guarding and Rovsing 2.0 each. Fever, raised WCC, and foreign NRIC are caller-assigned; magent does not apply a °C or WBC cutoff. Derivation ROC: <7.5 below_cutoff, ≥7.5 at_or_above_cutoff. Not a diagnosis or operating-room protocol. magent does not examine the abdomen.

## Output

Returns a numeric RIPASA total score (half-point increments, maximum 16) and a cutoff classification: 'below_cutoff' if the score is less than 7.5 or 'at_or_above_cutoff' if the score is 7.5 or higher, based on the Chong 2010 derivation ROC threshold.

## 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",
      "rif_pain",
      "migration_to_rif",
      "nausea_vomiting",
      "anorexia",
      "symptoms_lt_48h",
      "rif_tenderness",
      "guarding",
      "rebound_tenderness",
      "rovsing_sign",
      "fever",
      "raised_wcc",
      "negative_urinalysis",
      "foreign_nric"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years as an integer from 1 to 120 (Chong 2010). <40 scores 1.0; ≥40 scores 0.5 (age 40 is the ≥40 arm). magent does not assign age."
      },
      "sex": {
       "enum": [
        "female",
        "male"
       ],
       "type": "string",
       "description": "Caller-assigned sex (Chong 2010). male scores 1.0; female scores 0.5. magent does not assign sex."
      },
      "fever": {
       "type": "boolean",
       "description": "Caller-assigned fever flag (Chong 2010). true scores 1.0. magent does not apply a °C cutoff."
      },
      "anorexia": {
       "type": "boolean",
       "description": "Anorexia (Chong 2010). true scores 1.0. magent does not take a history."
      },
      "guarding": {
       "type": "boolean",
       "description": "Guarding (Chong 2010). true scores 2.0. magent does not examine the abdomen."
      },
      "rif_pain": {
       "type": "boolean",
       "description": "Pain in the right iliac fossa (Chong 2010). true scores 0.5. magent does not take a history."
      },
      "raised_wcc": {
       "type": "boolean",
       "description": "Caller-assigned raised white-cell-count flag (Chong 2010). true scores 1.0. magent does not apply a WBC cutoff."
      },
      "foreign_nric": {
       "type": "boolean",
       "description": "Caller-assigned foreign national registration identity card item (Chong 2010). true scores 1.0. magent does not read identity documents."
      },
      "rovsing_sign": {
       "type": "boolean",
       "description": "Rovs
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/ripasa",
  "count": 2,
  "items": [
   {
    "age": 50,
    "sex": "female",
    "score": 1.5,
    "formula": "ripasa",
    "citation": {
     "id": "chong-2010",
     "pmid": "20428744",
     "title": "Development of the RIPASA score: a new appendicitis scoring system for the diagnosis of acute appendicitis",
     "source": "Singapore Med J. 2010;51(3):220-225",
     "authors": "Chong CF, Adi MIW, Thien A, Suyoi A, Mackie AJ, Tin AS, Tripathi S, Jaman NH, Tan KK, Kok KY, Mathew VV, Paw O, Chua HB, Yapp SK"
    },
    "max_score": 16,
    "components": [
     {
      "value": 50,
      "factor": "age",
      "points": 0.5,
      "present": true
     },
     {
      "value": "female",
      "factor": "sex",
      "points": 0.5,
      "present": true
     },
     {
      "factor": "rif_pain",
      "points": 0,
      "present": false
     },
     {
      "factor": "migration_to_rif",
      "points": 0,
      "present": false
     },
     {
      "factor": "nausea_vomiting",
      "points": 0,
      "present": false
     },
     {
      "factor": "anorexia",
      "points": 0,
      "present": false
     },
     {
      "value": false,
      "factor": "symptoms_lt_48h",
      "points": 0.5,
      "present": true
     },
     {
      "factor": "rif_tenderness",
      "points": 0,
      "present": false
     },
     {
      "factor": "guarding",
      "points": 0,
      "present": false
     },
     {
      "factor": "rebound_tenderness",
      "points": 0,
      "present": false
     },
     {
      "factor": "rovsing_sign",
      "points": 0,
      "present": false
     },
     {
      "factor": "fever",
      "points": 0,
      "present": false
     },
     {
      "factor": "raised_wcc",
      "points": 0,
      "present": false
     },
     {
      "factor": "negative_urinalysis",
      "points": 0,
      "present": false
     },
     {
      "factor": "foreign_nric",
      "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.",
    "ripasa_band": "below_cutoff",
    "formula_expression": "RIPASA = (age<40 → 1.0; age≥40 → 0.5) + (male 1.0; female 0.5) + 0.5*rif_pain + 0.5*migration_to_rif + nausea_vomiting + anorexia + (symptoms_lt_48h 1.0; else 0.5) + rif_tenderness + 2*guarding + rebound_tenderness + 2*ro
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ripasa-score-calculator-6283d745/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)
