MAGENT

GI · LIVE

Kruis 1984 IBS diagnostic score

Kruis

Sum the Kruis 1984 signed weights (history items plus physical and laboratory flags) and return whether the published IBS cutoff of 44 is met.

LIVE $0.005 USDC GET /api/calc/kruis

Markdown: /docs/kruis.md · Canonical: https://magentlab.com/docs/kruis

Not a medical device. Not a diagnosis, dose, or listing recommendation.

What it computes

Sum the Kruis 1984 signed weights (history items plus physical and laboratory flags) and return whether the published IBS cutoff of 44 is met.

When to use

When an agent already has the nine caller-assigned Kruis 1984 flags and needs the published weighted total and IBS-versus-organic cutoff. magent does not examine the patient or run labs.

When not to use

  • Not a medical device.
  • Not a diagnosis. magent does not diagnose irritable bowel syndrome or exclude organic disease.
  • The caller assigns every flag. magent does not examine the patient or run labs.
  • IBS versus organic uses the Kruis 1984 minimum score of 44 (kruis_ibs is true iff score >= 44). This is a published operating point, not a clinical order.
  • This tool is the Kruis 1984 weighted score only. Not Manning criteria and not Rome II, Rome III, or Rome IV.

Formula

kruis = symptom_triad 34 + duration_gt_2_years 16 + characteristic_pain_descriptors 23 + alternating_constipation_diarrhea 14 + abnormal_physical_or_pathognomonic_history -47 + esr_gt_10_mm_h -13 + leukocytosis -50 + anemia -98 + blood_in_stool -98; IBS iff score >= 44 (Kruis 1984 minimum score 44)

Citation

Title
A diagnostic score for the irritable bowel syndrome. Its value in the exclusion of organic disease
Authors
Kruis W, Thieme C, Weinzierl M, Schüssler P, Holl J, Paulus W
Source
Gastroenterology. 1984;87(1):1-7
DOI
10.1016/0016-5085(84)90119-7

Worked example

All IBS-positive history features, no organic flags

Given: abnormal_physical_or_pathognomonic_history=falsealternating_constipation_diarrhea=trueanemia=falseblood_in_stool=falsecharacteristic_pain_descriptors=trueduration_gt_2_years=trueesr_gt_10_mm_h=falseleukocytosis=falsesymptom_triad=true

  1. Triad +34, duration >2 years +16, characteristic pain +23, alternating habits +14
  2. Abnormal physical, ESR, leukocytosis, anemia, and blood in stool are false (0)
  3. score = 87, which is >= 44; kruis_ibs true; band ibs

Triad only

Given: abnormal_physical_or_pathognomonic_history=falsealternating_constipation_diarrhea=falseanemia=falseblood_in_stool=falsecharacteristic_pain_descriptors=falseduration_gt_2_years=falseesr_gt_10_mm_h=falseleukocytosis=falsesymptom_triad=true

  1. Pain, flatulence, and irregularity triad only (+34)
  2. Remaining flags false
  3. score = 34, which is < 44; kruis_ibs false; band organic

Cutoff boundary 44

Given: abnormal_physical_or_pathognomonic_history=falsealternating_constipation_diarrhea=falseanemia=falseblood_in_stool=falsecharacteristic_pain_descriptors=trueduration_gt_2_years=falseesr_gt_10_mm_h=trueleukocytosis=falsesymptom_triad=true

  1. Triad +34 and characteristic pain descriptors +23
  2. ESR >10 mm/h -13; remaining flags false
  3. score = 44, the 1984 minimum; kruis_ibs true; band ibs

Also searched as

  • Kruis score
  • Kruis IBS
  • Kruis 1984
  • irritable bowel Kruis
  • Kruis diagnostic score
  • IBS versus organic Kruis
  • Kruis criteria
  • Kruis weighted IBS score

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/kruis?symptom_triad=true&duration_gt_2_years=true&characteristic_pain_descriptors=true&alternating_constipation_diarrhea=true&abnormal_physical_or_pathognomonic_history=false&esr_gt_10_mm_h=false&leukocytosis=false&anemia=false&blood_in_stool=false

Full URL: https://api.magentlab.com/api/calc/kruis?symptom_triad=true&duration_gt_2_years=true&characteristic_pain_descriptors=true&alternating_constipation_diarrhea=true&abnormal_physical_or_pathognomonic_history=false&esr_gt_10_mm_h=false&leukocytosis=false&anemia=false&blood_in_stool=false

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/kruis?symptom_triad=true&duration_gt_2_years=true&characteristic_pain_descriptors=true&alternating_constipation_diarrhea=true&abnormal_physical_or_pathognomonic_history=false&esr_gt_10_mm_h=false&leukocytosis=false&anemia=false&blood_in_stool=false"

Parameters

Name Type Required Description
symptom_triad boolean required Abdominal pain, flatulence, and irregularities of bowel movement in the same patient (Kruis 1984 Table 4 A+B+C triad). true scores +34. true or false as assigned by the caller. magent does not examine the patient.
duration_gt_2_years boolean required Those symptoms for more than 2 years as assigned by the caller (Kruis 1984). true scores +16. magent does not take a history.
characteristic_pain_descriptors boolean required Abdominal pain described as burning, cutting, very strong, terrible, feeling of pressure, dull, boring, or not so bad (Kruis 1984 Figure 1). true scores +23. magent does not examine the patient.
alternating_constipation_diarrhea boolean required Alternating bowel movements (constipation/diarrhea) as assigned by the caller (Kruis 1984). true scores +14.
abnormal_physical_or_pathognomonic_history boolean required Abnormal physical findings and/or history pathognomonic for any diagnosis other than IBS as assigned by the caller (Kruis 1984). true scores -47. magent does not examine the patient.
esr_gt_10_mm_h boolean required Erythrocyte sedimentation rate >10 mm/h (>20 mm/2 h on the 1984 Westergren form) as assigned by the caller (Kruis 1984). true scores -13. magent does not run labs.
leukocytosis boolean required Leukocytosis, white-cell count >10,000/µL, as assigned by the caller (Kruis 1984). true scores -50. magent does not run labs.
anemia boolean required Anemia: hemoglobin <12 g/dL in females or <14 g/dL in males as assigned by the caller (Kruis 1984). true scores -98. magent does not run labs.
blood_in_stool boolean required History of blood in stool as assigned by the caller (Kruis 1984; retained at -98 though not independently significant in the logistic model). magent does not examine stool.

Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

POST /api/calc/kruis Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 PREVIEW

  • 1 to 25 items. Each item uses the same keys as the GET query parameters.
  • POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
  • The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
  • HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
  • Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
  • x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request (fixture)

{
  "items": [
    {
      "abnormal_physical_or_pathognomonic_history": "false",
      "alternating_constipation_diarrhea": "true",
      "anemia": "false",
      "blood_in_stool": "false",
      "characteristic_pain_descriptors": "true",
      "duration_gt_2_years": "true",
      "esr_gt_10_mm_h": "false",
      "leukocytosis": "false",
      "symptom_triad": "true"
    },
    {
      "abnormal_physical_or_pathognomonic_history": "false",
      "alternating_constipation_diarrhea": "true",
      "anemia": "false",
      "blood_in_stool": "false",
      "characteristic_pain_descriptors": "true",
      "duration_gt_2_years": "true",
      "esr_gt_10_mm_h": "false",
      "leukocytosis": "false",
      "symptom_triad": "true"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/kruis",
  "items": [
    {
      "band": "ibs",
      "components": [
        {
          "factor": "symptom_triad",
          "points": 34,
          "present": true
        },
        {
          "factor": "duration_gt_2_years",
          "points": 16,
          "present": true
        },
        {
          "factor": "characteristic_pain_descriptors",
          "points": 23,
          "present": true
        },
        {
          "factor": "alternating_constipation_diarrhea",
          "points": 14,
          "present": true
        },
        {
          "factor": "abnormal_physical_or_pathognomonic_history",
          "points": 0,
          "present": false
        },
        {
          "factor": "esr_gt_10_mm_h",
          "points": 0,
          "present": false
        },
        {
          "factor": "leukocytosis",
          "points": 0,
          "present": false
        },
        {
          "factor": "anemia",
          "points": 0,
          "present": false
        },
        {
          "factor": "blood_in_stool",
          "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.",
      "citation": {
        "authors": "Kruis W, Thieme C, Weinzierl M, Schüssler P, Holl J, Paulus W",
        "doi": "10.1016/0016-5085(84)90119-7",
        "id": "kruis-1984",
        "pmid": "6724251",
        "source": "Gastroenterology. 1984;87(1):1-7",
        "title": "A diagnostic score for the irritable bowel syndrome. Its value in the exclusion of organic disease"
      },
      "formula": "kruis",
      "formula_expression": "kruis = symptom_triad 34 + duration_gt_2_years 16 + characteristic_pain_descriptors 23 + alternating_constipation_diarrhea 14 + abnormal_physical_or_pathognomonic_history -47 + esr_gt_10_mm_h -13 + leukocytosis -50 + anemia -98 + blood_in_stool -98; IBS iff score >= 44 (Kruis 1984 minimum score 44)",
      "max_score": 87,
      "score": 87,
      "cutoff": 44,
      "kruis_ibs": true
    },
    {
      "band": "ibs",
      "components": [
        {
          "factor": "symptom_triad",
          "points": 34,
          "present": true
        },
        {
          "factor": "duration_gt_2_years",
          "points": 16,
          "present": true
        },
        {
          "factor": "characteristic_pain_descriptors",
          "points": 23,
          "present": true
        },
        {
          "factor": "alternating_constipation_diarrhea",
          "points": 14,
          "present": true
        },
        {
          "factor": "abnormal_physical_or_pathognomonic_history",
          "points": 0,
          "present": false
        },
        {
          "factor": "esr_gt_10_mm_h",
          "points": 0,
          "present": false
        },
        {
          "factor": "leukocytosis",
          "points": 0,
          "present": false
        },
        {
          "factor": "anemia",
          "points": 0,
          "present": false
        },
        {
          "factor": "blood_in_stool",
          "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.",
      "citation": {
        "authors": "Kruis W, Thieme C, Weinzierl M, Schüssler P, Holl J, Paulus W",
        "doi": "10.1016/0016-5085(84)90119-7",
        "id": "kruis-1984",
        "pmid": "6724251",
        "source": "Gastroenterology. 1984;87(1):1-7",
        "title": "A diagnostic score for the irritable bowel syndrome. Its value in the exclusion of organic disease"
      },
      "formula": "kruis",
      "formula_expression": "kruis = symptom_triad 34 + duration_gt_2_years 16 + characteristic_pain_descriptors 23 + alternating_constipation_diarrhea 14 + abnormal_physical_or_pathognomonic_history -47 + esr_gt_10_mm_h -13 + leukocytosis -50 + anemia -98 + blood_in_stool -98; IBS iff score >= 44 (Kruis 1984 minimum score 44)",
      "max_score": 87,
      "score": 87,
      "cutoff": 44,
      "kruis_ibs": true
    }
  ]
}

Response

Field Type Description
formula string kruis
formula_expression string Kruis 1984 signed-weight expression and >= 44 cutoff
score integer Kruis 1984 weighted total. Integer; may be negative when organic flags are present.
max_score integer 87 (sum of the four history weights)
cutoff integer 44. Kruis 1984 minimum score to exclude organic disease with 99% accuracy (IBS iff score >= 44).
kruis_ibs boolean true iff score >= 44. Published 1984 operating point, not a diagnosis. magent does not examine the patient.
band string ibs when score >= 44; organic otherwise. Not a diagnosis.
components array Per-item Kruis 1984 signed points
citation object Kruis et al. Gastroenterology 1984 citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "band": "ibs",
  "components": [
    {
      "factor": "symptom_triad",
      "points": 34,
      "present": true
    },
    {
      "factor": "duration_gt_2_years",
      "points": 16,
      "present": true
    },
    {
      "factor": "characteristic_pain_descriptors",
      "points": 23,
      "present": true
    },
    {
      "factor": "alternating_constipation_diarrhea",
      "points": 14,
      "present": true
    },
    {
      "factor": "abnormal_physical_or_pathognomonic_history",
      "points": 0,
      "present": false
    },
    {
      "factor": "esr_gt_10_mm_h",
      "points": 0,
      "present": false
    },
    {
      "factor": "leukocytosis",
      "points": 0,
      "present": false
    },
    {
      "factor": "anemia",
      "points": 0,
      "present": false
    },
    {
      "factor": "blood_in_stool",
      "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.",
  "citation": {
    "authors": "Kruis W, Thieme C, Weinzierl M, Schüssler P, Holl J, Paulus W",
    "doi": "10.1016/0016-5085(84)90119-7",
    "id": "kruis-1984",
    "pmid": "6724251",
    "source": "Gastroenterology. 1984;87(1):1-7",
    "title": "A diagnostic score for the irritable bowel syndrome. Its value in the exclusion of organic disease"
  },
  "formula": "kruis",
  "formula_expression": "kruis = symptom_triad 34 + duration_gt_2_years 16 + characteristic_pain_descriptors 23 + alternating_constipation_diarrhea 14 + abnormal_physical_or_pathognomonic_history -47 + esr_gt_10_mm_h -13 + leukocytosis -50 + anemia -98 + blood_in_stool -98; IBS iff score >= 44 (Kruis 1984 minimum score 44)",
  "max_score": 87,
  "score": 87,
  "cutoff": 44,
  "kruis_ibs": true
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_kruis Kruis 1984 IBS versus organic items must use the published 1984 weights and cutoff from that paper only. Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • Manning — Count the six Manning 1978 IBS symptoms and return the integer score (0-6). Manning 1978 does not publish a diagnostic cutoff.
  • Rome IV IBS — Apply the Mearin 2016 Rome IV IBS diagnostic criteria and return supporting_features_met (0-3) and whether the published IBS box holds (rome_iv_ibs).
  • Rome II IBS — Apply the Thompson 1999 Rome II IBS diagnostic criteria and return supporting_features_met (0-3) and whether the published IBS box holds (rome_ii_ibs).

Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /docs/mcp.

Guarantees

  • HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
  • exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
  • HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
  • Execution is timeout-bounded and concurrency-capped.
  • Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.