# Kruis 1984 IBS diagnostic score

Kruis

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/kruis`
HTML: https://magentlab.com/docs/kruis
Markdown: https://magentlab.com/docs/kruis.md

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

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

## Worked example

### All IBS-positive history features, no organic flags

Given: `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`

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=false, alternating_constipation_diarrhea=false, anemia=false, blood_in_stool=false, characteristic_pain_descriptors=false, duration_gt_2_years=false, esr_gt_10_mm_h=false, leukocytosis=false, symptom_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=false, alternating_constipation_diarrhea=false, anemia=false, blood_in_stool=false, characteristic_pain_descriptors=true, duration_gt_2_years=false, esr_gt_10_mm_h=true, leukocytosis=false, symptom_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

## Parameters

- `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.

Method: `POST /api/calc/kruis`
Max items: 25
Price: unit_amount + extra_item_amount * (n - 1) (unit 5000 atomic, extra 2000 atomic)
Status: 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:

```json
{
  "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"
    }
  ]
}
```

Human paywall (two-item fixture): https://api.magentlab.com/paywall/bulk/kruis

Example 200:

```json
{
  "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 fields

- `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

Frozen fixture. Not a live lookup.

```json
{
  "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
}
```

## Errors

- HTTP 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.
- HTTP 400 `invalid_items`: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
- HTTP 400 `invalid_item_count`: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
- HTTP 400 `invalid_item`: each items entry must be a JSON object Returned before settlement; you are not charged.

Shared HTTP 402 and 503: https://magentlab.com/docs/payments

## Related tools

- [Manning](https://magentlab.com/docs/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](https://magentlab.com/docs/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](https://magentlab.com/docs/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.

- GET the tool with Accept: application/json (do not send Accept: text/html unless you want the human paywall).
- HTTP 402 means you have not paid. Decode the base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote.
- Sign accepts[0] (exact, EIP-3009) with validBefore = now + maxTimeoutSeconds (600 seconds), or accepts[1] (batch-settlement deposit/voucher) on product GET. Ping and POST {items} stay exact. Magent retries transient facilitator 429/5xx before answering.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON of accepted and payload). Magent attaches canonical extensions.bazaar on CDP verify/settle; echoing 402 bazaar is optional.
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. exact settles before the tool. batch-settlement verifies (and deposit-settles) before the tool and commits the charge after HTTP 2xx. HTTP 503: retry the same PAYMENT-SIGNATURE. Mint a new exact nonce only after a new HTTP 402.

- offered `exact` on eip155:8453: Fixed-price USDC on Base. The buyer authorizes the advertised amount (EIP-3009). magent settles before the tool runs (paymentFlow upfront). extra.assetTransferMethod=eip3009 extra.paymentFlow=upfront.
- offered `batch-settlement` on eip155:8453: Payment-channel vouchers claimed later in batches. Exact stays accepts[0]. Same-path POST {items} is still exact. extra.assetTransferMethod=eip3009 extra.paymentFlow=authorization.

- not offered `upto`: Not offered. Usage-based: buyer authorizes a ceiling, seller settles the actual amount after work. Reserved for a future metered tool. Not for current calculators or code search.

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for GET unit plus $0.002 per extra item. That is not x402 batch-settlement (payment channels / vouchers).

Shared HTTP 402 and 503 table: https://magentlab.com/docs/payments

Stdio MCP (one process per host): https://magentlab.com/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.
