# Tokyo Guidelines 2018 Cholangitis Diagnosis & Severity Grader

> Tokyo Guidelines 2018 Cholangitis Diagnosis & Severity Grader 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).

Applies the Kiriyama 2018 TG18 criteria to classify acute cholangitis as definite, suspected, or none, and grades severity as Grade I, II, or III based on caller-supplied clinical findings.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/tokyo_cholangitis
- 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/tokyo-guidelines-2018-cholangitis-diagnosis-severity-grader-d144a73c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rDefqGiirEPuygVkCc6hr

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 tokyo-guidelines-2018-cholangitis-diagnosis-severity-grader-d144a73c
```

Example prompt: Score this patient for acute cholangitis using the Tokyo Guidelines 2018: 62-year-old with fever and chills, elevated WBC and CRP, jaundice, abnormal LFTs, biliary dilatation on imaging with a known etiology — no organ dysfunction, no fever above 39°C, bilirubin under 5, no hypoalbuminemia.

## When to prefer this

Use this endpoint when you need a structured, reproducible implementation of the Kiriyama 2018 TG18 cholangitis diagnostic and severity algorithm in an automated workflow, EHR integration, or clinical decision-support pipeline. Prefer this over manual scoring when auditability and API-level traceability are needed. Not appropriate for cholecystitis (separate condition), Alvarado/RIPASA appendicitis scoring, or any case where imaging or lab interpretation is required — callers must supply pre-interpreted findings.

## Known failure modes

- Missing required query parameters returns a validation error
- Age outside the accepted range (18–120) may be rejected
- Inconsistent flag combinations (e.g. Grade III organ flags without diagnosis criteria) will still be processed by algorithm logic with no additional warning
- No imaging, lab, or physical exam is performed — results depend entirely on caller accuracy

## How this service works

Kiriyama 2018 TG18 (=TG13) cholangitis. Definite if one A (fever/chills or elevated WBC/CRP), one B (jaundice or abnormal LFTs), and one C (dilatation or etiology); suspected if A plus B or C; else none. Grade III if any organ dysfunction, else Grade II if any two of WBC, fever >=39C, age >=75, bilirubin >=5, or hypoalbuminemia, else Grade I. Severity none if diagnosis none. Not cholecystitis or Alvarado/RIPASA. magent does not examine, assay, or read imaging. Not a medical device.

## Output

Returns the TG18 cholangitis diagnosis category (definite, suspected, or none) and severity grade (Grade I, II, III, or none if diagnosis is none), computed strictly from the caller-supplied boolean and integer inputs according to the Kiriyama 2018 algorithm.

## 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",
      "fever_or_chills",
      "elevated_wbc_or_crp",
      "jaundice",
      "abnormal_lfts",
      "biliary_dilatation",
      "etiology_on_imaging",
      "hypotension_vasopressors",
      "decreased_consciousness",
      "pfr_lt_300",
      "oliguria_or_creatinine_gt_2",
      "pt_inr_gt_1_5",
      "platelets_lt_100k",
      "wbc_gt_12k_or_lt_4k",
      "fever_ge_39",
      "bilirubin_ge_5",
      "hypoalbuminemia"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Counts as one Kiriyama 2018 TG18 Grade II item when age ≥75. Age 75 meets; age 74 does not. magent does not examine the patient."
      },
      "jaundice": {
       "type": "boolean",
       "description": "Jaundice as assigned by the caller (Kiriyama 2018 TG18 B-1). true or false. magent does not examine the patient."
      },
      "pfr_lt_300": {
       "type": "boolean",
       "description": "PaO2/FiO2 <300 as assigned by the caller (Kiriyama 2018 TG18 Grade III respiratory dysfunction). true or false. magent does not interpret blood gas or ventilator settings."
      },
      "fever_ge_39": {
       "type": "boolean",
       "description": "Fever ≥39°C as assigned by the caller (Kiriyama 2018 TG18 Grade II). true or false. magent does not measure temperature."
      },
      "abnormal_lfts": {
       "type": "boolean",
       "description": "Increased ALP, GGT, AST, or ALT as assigned by the caller (Kiriyama 2018 TG18 B-2). true or false. magent does not assay liver tests."
      },
      "pt_inr_gt_1_5": {
       "type": "boolean",
       "description": "PT-INR >1.5 as assigned by the caller (Kiriyama 2018 TG18 Grade III hepatic dysfunction). true or false. magent does not interpret coagulation assays."
      },
      "bilirubin_ge_5": {
       "type": "boolean",
       "description": "Total bilirubin ≥5 mg/dL as assigned by the caller (Kiriya
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tokyo-guidelines-2018-cholangitis-diagnosis-severity-grader-d144a73c/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)
