{
  "x402Version": 2,
  "id": 38839,
  "slug": "38839",
  "resource": "https://api.magentlab.com/api/calc/rome_iv_ibs",
  "description": "Mearin 2016 Rome IV IBS. rome_iv_ibs is true iff recurrent abdominal pain at least 1 day per week in the last 3 months, onset at least 6 months prior, and at least two of: related to defecation, change in stool frequency, and change in stool form. supporting_features_met is 0-3. Caller assigns five flags. magent does not examine the patient. Not a diagnosis, not Rome III, 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": [
              {
                "associated_change_stool_form": false,
                "associated_change_stool_frequency": true,
                "pain_1_day_per_week_last_3_months": true,
                "related_to_defecation": true,
                "symptom_onset_at_least_6_months_prior": true
              },
              {
                "associated_change_stool_form": false,
                "associated_change_stool_frequency": true,
                "pain_1_day_per_week_last_3_months": true,
                "related_to_defecation": true,
                "symptom_onset_at_least_6_months_prior": true
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "citation": {
                  "authors": "Mearin F, Lacy BE, Chang L, Chey WD, Lembo AJ, Simren M, Spiller RC",
                  "doi": "10.1053/j.gastro.2016.02.031",
                  "id": "mearin-2016",
                  "pmid": "27144627",
                  "source": "Gastroenterology. 2016;150(6):1393-1407",
                  "title": "Bowel Disorders"
                },
                "criteria": [
                  {
                    "factor": "pain_1_day_per_week_last_3_months",
                    "met": true
                  },
                  {
                    "factor": "symptom_onset_at_least_6_months_prior",
                    "met": true
                  },
                  {
                    "factor": "related_to_defecation",
                    "met": true
                  },
                  {
                    "factor": "associated_change_stool_frequency",
                    "met": true
                  },
                  {
                    "factor": "associated_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_iv_ibs",
                "formula_expression": "rome_iv_ibs iff pain_1_day_per_week_last_3_months and symptom_onset_at_least_6_months_prior and supporting_features_met >= 2; supporting_features_met counts related_to_defecation, associated_change_stool_frequency, and associated_change_stool_form (Mearin 2016 Rome IV IBS diagnostic criteria)",
                "rome_iv_ibs": true,
                "supporting_features_met": 2
              },
              {
                "citation": {
                  "authors": "Mearin F, Lacy BE, Chang L, Chey WD, Lembo AJ, Simren M, Spiller RC",
                  "doi": "10.1053/j.gastro.2016.02.031",
                  "id": "mearin-2016",
                  "pmid": "27144627",
                  "source": "Gastroenterology. 2016;150(6):1393-1407",
                  "title": "Bowel Disorders"
                },
                "criteria": [
                  {
                    "factor": "pain_1_day_per_week_last_3_months",
                    "met": true
                  },
                  {
                    "factor": "symptom_onset_at_least_6_months_prior",
                    "met": true
                  },
                  {
                    "factor": "related_to_defecation",
                    "met": true
                  },
                  {
                    "factor": "associated_change_stool_frequency",
                    "met": true
                  },
                  {
                    "factor": "associated_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_iv_ibs",
                "formula_expression": "rome_iv_ibs iff pain_1_day_per_week_last_3_months and symptom_onset_at_least_6_months_prior and supporting_features_met >= 2; supporting_features_met counts related_to_defecation, associated_change_stool_frequency, and associated_change_stool_form (Mearin 2016 Rome IV IBS diagnostic criteria)",
                "rome_iv_ibs": true,
                "supporting_features_met": 2
              }
            ],
            "path": "/api/calc/rome_iv_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": {
                        "associated_change_stool_form": {
                          "description": "Pain 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"
                        },
                        "associated_change_stool_frequency": {
                          "description": "Pain 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_1_day_per_week_last_3_months": {
                          "description": "Recurrent abdominal pain on average at least 1 day per week in the last 3 months (Mearin 2016). Pain only, not discomfort. true or false as assigned by the caller. magent does not examine the patient.",
                          "type": "boolean"
                        },
                        "related_to_defecation": {
                          "description": "Pain related to defecation (one of three supporting features; at least two required). true or false as assigned by the caller.",
                          "type": "boolean"
                        },
                        "symptom_onset_at_least_6_months_prior": {
                          "description": "Criteria fulfilled for the last 3 months with symptom onset at least 6 months before diagnosis, as assigned (Mearin 2016). true or false as assigned by the caller. magent does not take a history.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "pain_1_day_per_week_last_3_months",
                        "symptom_onset_at_least_6_months_prior",
                        "related_to_defecation",
                        "associated_change_stool_frequency",
                        "associated_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-iv-ibs",
    "ibs",
    "gi",
    "functional-bowel",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T13:26:43.458Z",
  "quality": {
    "calls30d": 6,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T13:26:43.345Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "associated_change_stool_form": false,
                  "associated_change_stool_frequency": true,
                  "pain_1_day_per_week_last_3_months": true,
                  "related_to_defecation": true,
                  "symptom_onset_at_least_6_months_prior": true
                },
                {
                  "associated_change_stool_form": false,
                  "associated_change_stool_frequency": true,
                  "pain_1_day_per_week_last_3_months": true,
                  "related_to_defecation": true,
                  "symptom_onset_at_least_6_months_prior": true
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "citation": {
                    "authors": "Mearin F, Lacy BE, Chang L, Chey WD, Lembo AJ, Simren M, Spiller RC",
                    "doi": "10.1053/j.gastro.2016.02.031",
                    "id": "mearin-2016",
                    "pmid": "27144627",
                    "source": "Gastroenterology. 2016;150(6):1393-1407",
                    "title": "Bowel Disorders"
                  },
                  "criteria": [
                    {
                      "factor": "pain_1_day_per_week_last_3_months",
                      "met": true
                    },
                    {
                      "factor": "symptom_onset_at_least_6_months_prior",
                      "met": true
                    },
                    {
                      "factor": "related_to_defecation",
                      "met": true
                    },
                    {
                      "factor": "associated_change_stool_frequency",
                      "met": true
                    },
                    {
                      "factor": "associated_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_iv_ibs",
                  "formula_expression": "rome_iv_ibs iff pain_1_day_per_week_last_3_months and symptom_onset_at_least_6_months_prior and supporting_features_met >= 2; supporting_features_met counts related_to_defecation, associated_change_stool_frequency, and associated_change_stool_form (Mearin 2016 Rome IV IBS diagnostic criteria)",
                  "rome_iv_ibs": true,
                  "supporting_features_met": 2
                },
                {
                  "citation": {
                    "authors": "Mearin F, Lacy BE, Chang L, Chey WD, Lembo AJ, Simren M, Spiller RC",
                    "doi": "10.1053/j.gastro.2016.02.031",
                    "id": "mearin-2016",
                    "pmid": "27144627",
                    "source": "Gastroenterology. 2016;150(6):1393-1407",
                    "title": "Bowel Disorders"
                  },
                  "criteria": [
                    {
                      "factor": "pain_1_day_per_week_last_3_months",
                      "met": true
                    },
                    {
                      "factor": "symptom_onset_at_least_6_months_prior",
                      "met": true
                    },
                    {
                      "factor": "related_to_defecation",
                      "met": true
                    },
                    {
                      "factor": "associated_change_stool_frequency",
                      "met": true
                    },
                    {
                      "factor": "associated_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_iv_ibs",
                  "formula_expression": "rome_iv_ibs iff pain_1_day_per_week_last_3_months and symptom_onset_at_least_6_months_prior and supporting_features_met >= 2; supporting_features_met counts related_to_defecation, associated_change_stool_frequency, and associated_change_stool_form (Mearin 2016 Rome IV IBS diagnostic criteria)",
                  "rome_iv_ibs": true,
                  "supporting_features_met": 2
                }
              ],
              "path": "/api/calc/rome_iv_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": {
                          "associated_change_stool_form": {
                            "description": "Pain 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"
                          },
                          "associated_change_stool_frequency": {
                            "description": "Pain 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_1_day_per_week_last_3_months": {
                            "description": "Recurrent abdominal pain on average at least 1 day per week in the last 3 months (Mearin 2016). Pain only, not discomfort. true or false as assigned by the caller. magent does not examine the patient.",
                            "type": "boolean"
                          },
                          "related_to_defecation": {
                            "description": "Pain related to defecation (one of three supporting features; at least two required). true or false as assigned by the caller.",
                            "type": "boolean"
                          },
                          "symptom_onset_at_least_6_months_prior": {
                            "description": "Criteria fulfilled for the last 3 months with symptom onset at least 6 months before diagnosis, as assigned (Mearin 2016). true or false as assigned by the caller. magent does not take a history.",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "pain_1_day_per_week_last_3_months",
                          "symptom_onset_at_least_6_months_prior",
                          "related_to_defecation",
                          "associated_change_stool_frequency",
                          "associated_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"
  }
}