{
  "x402Version": 2,
  "id": 38775,
  "slug": "38775",
  "resource": "https://api.magentlab.com/api/calc/rome_ii_ibs",
  "description": "Thompson 1999 Rome II IBS. rome_ii_ibs is true iff at least 12 weeks (need not be consecutive) in the preceding 12 months of abdominal discomfort or pain and at least two of: relieved with defecation, onset associated with a change in stool frequency, and onset associated with a change in stool form. supporting_features_met is 0-3. Caller assigns four flags. magent does not examine the patient. Not a diagnosis, not Rome III, not Rome IV, not Manning, not IBS subtype.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "items": [
              {
                "onset_change_stool_form": false,
                "onset_change_stool_frequency": true,
                "pain_or_discomfort_12_weeks_of_12_months": true,
                "relieved_with_defecation": true
              },
              {
                "onset_change_stool_form": false,
                "onset_change_stool_frequency": true,
                "pain_or_discomfort_12_weeks_of_12_months": true,
                "relieved_with_defecation": true
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "citation": {
                  "authors": "Thompson WG, Longstreth GF, Drossman DA, Heaton KW, Irvine EJ, Müller-Lissner SA",
                  "doi": "10.1136/gut.45.2008.ii43",
                  "id": "thompson-1999",
                  "pmid": "10457044",
                  "source": "Gut. 1999;45 Suppl 2:II43-II47",
                  "title": "Functional bowel disorders and functional abdominal pain"
                },
                "criteria": [
                  {
                    "factor": "pain_or_discomfort_12_weeks_of_12_months",
                    "met": true
                  },
                  {
                    "factor": "relieved_with_defecation",
                    "met": true
                  },
                  {
                    "factor": "onset_change_stool_frequency",
                    "met": true
                  },
                  {
                    "factor": "onset_change_stool_form",
                    "met": false
                  },
                  {
                    "factor": "supporting_features_ge_2",
                    "met": true,
                    "value": 2
                  }
                ],
                "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.",
                "formula": "rome_ii_ibs",
                "formula_expression": "rome_ii_ibs iff pain_or_discomfort_12_weeks_of_12_months and supporting_features_met >= 2; supporting_features_met counts relieved_with_defecation, onset_change_stool_frequency, and onset_change_stool_form (Thompson 1999 Rome II IBS diagnostic criteria)",
                "rome_ii_ibs": true,
                "supporting_features_met": 2
              },
              {
                "citation": {
                  "authors": "Thompson WG, Longstreth GF, Drossman DA, Heaton KW, Irvine EJ, Müller-Lissner SA",
                  "doi": "10.1136/gut.45.2008.ii43",
                  "id": "thompson-1999",
                  "pmid": "10457044",
                  "source": "Gut. 1999;45 Suppl 2:II43-II47",
                  "title": "Functional bowel disorders and functional abdominal pain"
                },
                "criteria": [
                  {
                    "factor": "pain_or_discomfort_12_weeks_of_12_months",
                    "met": true
                  },
                  {
                    "factor": "relieved_with_defecation",
                    "met": true
                  },
                  {
                    "factor": "onset_change_stool_frequency",
                    "met": true
                  },
                  {
                    "factor": "onset_change_stool_form",
                    "met": false
                  },
                  {
                    "factor": "supporting_features_ge_2",
                    "met": true,
                    "value": 2
                  }
                ],
                "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.",
                "formula": "rome_ii_ibs",
                "formula_expression": "rome_ii_ibs iff pain_or_discomfort_12_weeks_of_12_months and supporting_features_met >= 2; supporting_features_met counts relieved_with_defecation, onset_change_stool_frequency, and onset_change_stool_form (Thompson 1999 Rome II IBS diagnostic criteria)",
                "rome_ii_ibs": true,
                "supporting_features_met": 2
              }
            ],
            "path": "/api/calc/rome_ii_ibs"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "onset_change_stool_form": {
                          "description": "Onset associated with a change in form (appearance) of stool (one of three supporting features; at least two required). true or false as assigned by the caller.",
                          "type": "boolean"
                        },
                        "onset_change_stool_frequency": {
                          "description": "Onset associated with a change in frequency of stool (one of three supporting features; at least two required). true or false as assigned by the caller.",
                          "type": "boolean"
                        },
                        "pain_or_discomfort_12_weeks_of_12_months": {
                          "description": "At least 12 weeks (need not be consecutive) in the preceding 12 months of abdominal discomfort or pain (Thompson 1999). true or false as assigned by the caller. magent does not examine the patient.",
                          "type": "boolean"
                        },
                        "relieved_with_defecation": {
                          "description": "Abdominal discomfort or pain relieved with defecation (one of three supporting features; at least two required). true or false as assigned by the caller.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "pain_or_discomfort_12_weeks_of_12_months",
                        "relieved_with_defecation",
                        "onset_change_stool_frequency",
                        "onset_change_stool_form"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "rome-ii-ibs",
    "ibs",
    "gi",
    "functional-bowel",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T07:01:15.318Z",
  "quality": {
    "calls30d": 6,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T07:01:15.213Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "onset_change_stool_form": false,
                  "onset_change_stool_frequency": true,
                  "pain_or_discomfort_12_weeks_of_12_months": true,
                  "relieved_with_defecation": true
                },
                {
                  "onset_change_stool_form": false,
                  "onset_change_stool_frequency": true,
                  "pain_or_discomfort_12_weeks_of_12_months": true,
                  "relieved_with_defecation": true
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "citation": {
                    "authors": "Thompson WG, Longstreth GF, Drossman DA, Heaton KW, Irvine EJ, Müller-Lissner SA",
                    "doi": "10.1136/gut.45.2008.ii43",
                    "id": "thompson-1999",
                    "pmid": "10457044",
                    "source": "Gut. 1999;45 Suppl 2:II43-II47",
                    "title": "Functional bowel disorders and functional abdominal pain"
                  },
                  "criteria": [
                    {
                      "factor": "pain_or_discomfort_12_weeks_of_12_months",
                      "met": true
                    },
                    {
                      "factor": "relieved_with_defecation",
                      "met": true
                    },
                    {
                      "factor": "onset_change_stool_frequency",
                      "met": true
                    },
                    {
                      "factor": "onset_change_stool_form",
                      "met": false
                    },
                    {
                      "factor": "supporting_features_ge_2",
                      "met": true,
                      "value": 2
                    }
                  ],
                  "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.",
                  "formula": "rome_ii_ibs",
                  "formula_expression": "rome_ii_ibs iff pain_or_discomfort_12_weeks_of_12_months and supporting_features_met >= 2; supporting_features_met counts relieved_with_defecation, onset_change_stool_frequency, and onset_change_stool_form (Thompson 1999 Rome II IBS diagnostic criteria)",
                  "rome_ii_ibs": true,
                  "supporting_features_met": 2
                },
                {
                  "citation": {
                    "authors": "Thompson WG, Longstreth GF, Drossman DA, Heaton KW, Irvine EJ, Müller-Lissner SA",
                    "doi": "10.1136/gut.45.2008.ii43",
                    "id": "thompson-1999",
                    "pmid": "10457044",
                    "source": "Gut. 1999;45 Suppl 2:II43-II47",
                    "title": "Functional bowel disorders and functional abdominal pain"
                  },
                  "criteria": [
                    {
                      "factor": "pain_or_discomfort_12_weeks_of_12_months",
                      "met": true
                    },
                    {
                      "factor": "relieved_with_defecation",
                      "met": true
                    },
                    {
                      "factor": "onset_change_stool_frequency",
                      "met": true
                    },
                    {
                      "factor": "onset_change_stool_form",
                      "met": false
                    },
                    {
                      "factor": "supporting_features_ge_2",
                      "met": true,
                      "value": 2
                    }
                  ],
                  "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.",
                  "formula": "rome_ii_ibs",
                  "formula_expression": "rome_ii_ibs iff pain_or_discomfort_12_weeks_of_12_months and supporting_features_met >= 2; supporting_features_met counts relieved_with_defecation, onset_change_stool_frequency, and onset_change_stool_form (Thompson 1999 Rome II IBS diagnostic criteria)",
                  "rome_ii_ibs": true,
                  "supporting_features_met": 2
                }
              ],
              "path": "/api/calc/rome_ii_ibs"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "onset_change_stool_form": {
                            "description": "Onset associated with a change in form (appearance) of stool (one of three supporting features; at least two required). true or false as assigned by the caller.",
                            "type": "boolean"
                          },
                          "onset_change_stool_frequency": {
                            "description": "Onset associated with a change in frequency of stool (one of three supporting features; at least two required). true or false as assigned by the caller.",
                            "type": "boolean"
                          },
                          "pain_or_discomfort_12_weeks_of_12_months": {
                            "description": "At least 12 weeks (need not be consecutive) in the preceding 12 months of abdominal discomfort or pain (Thompson 1999). true or false as assigned by the caller. magent does not examine the patient.",
                            "type": "boolean"
                          },
                          "relieved_with_defecation": {
                            "description": "Abdominal discomfort or pain relieved with defecation (one of three supporting features; at least two required). true or false as assigned by the caller.",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "pain_or_discomfort_12_weeks_of_12_months",
                          "relieved_with_defecation",
                          "onset_change_stool_frequency",
                          "onset_change_stool_form"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}