{
  "x402Version": 2,
  "id": 38834,
  "slug": "38834",
  "resource": "https://api.magentlab.com/api/calc/rome_iv_oic",
  "description": "Mearin 2016 Rome IV C6 OIC. rome_iv_oic is true iff new or worsening constipation when initiating, changing, or increasing opioid therapy, at least 2 of 6 symptoms (straining, lumpy/hard stools, incomplete evacuation, anorectal obstruction, manual maneuvers, fewer than 3 SBM/week), and loose stools rare without laxatives. symptom_count is 0-6. Caller assigns eight flags. magent does not examine the patient or prescribe opioids. Not a diagnosis, not functional constipation C2, not IBS, not child.",
  "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": [
              {
                "anorectal_obstruction_gt_25_percent": false,
                "fewer_than_3_sbm_per_week": true,
                "incomplete_evacuation_gt_25_percent": false,
                "loose_stools_rare_without_laxatives": true,
                "lumpy_or_hard_stools_gt_25_percent": false,
                "manual_maneuvers_gt_25_percent": false,
                "new_or_worsening_constipation_on_opioid_change": true,
                "straining_gt_25_percent": true
              },
              {
                "anorectal_obstruction_gt_25_percent": false,
                "fewer_than_3_sbm_per_week": true,
                "incomplete_evacuation_gt_25_percent": false,
                "loose_stools_rare_without_laxatives": true,
                "lumpy_or_hard_stools_gt_25_percent": false,
                "manual_maneuvers_gt_25_percent": false,
                "new_or_worsening_constipation_on_opioid_change": true,
                "straining_gt_25_percent": 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": "new_or_worsening_constipation_on_opioid_change",
                    "met": true
                  },
                  {
                    "factor": "straining_gt_25_percent",
                    "met": true
                  },
                  {
                    "factor": "lumpy_or_hard_stools_gt_25_percent",
                    "met": false
                  },
                  {
                    "factor": "incomplete_evacuation_gt_25_percent",
                    "met": false
                  },
                  {
                    "factor": "anorectal_obstruction_gt_25_percent",
                    "met": false
                  },
                  {
                    "factor": "manual_maneuvers_gt_25_percent",
                    "met": false
                  },
                  {
                    "factor": "fewer_than_3_sbm_per_week",
                    "met": true
                  },
                  {
                    "factor": "symptom_count_ge_2",
                    "met": true,
                    "value": 2
                  },
                  {
                    "factor": "loose_stools_rare_without_laxatives",
                    "met": true
                  }
                ],
                "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_oic",
                "formula_expression": "rome_iv_oic iff new_or_worsening_constipation_on_opioid_change and symptom_count >= 2 and loose_stools_rare_without_laxatives; symptom_count counts straining_gt_25_percent, lumpy_or_hard_stools_gt_25_percent, incomplete_evacuation_gt_25_percent, anorectal_obstruction_gt_25_percent, manual_maneuvers_gt_25_percent, and fewer_than_3_sbm_per_week (Mearin 2016 Rome IV C6 opioid-induced constipation)",
                "rome_iv_oic": true,
                "symptom_count": 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": "new_or_worsening_constipation_on_opioid_change",
                    "met": true
                  },
                  {
                    "factor": "straining_gt_25_percent",
                    "met": true
                  },
                  {
                    "factor": "lumpy_or_hard_stools_gt_25_percent",
                    "met": false
                  },
                  {
                    "factor": "incomplete_evacuation_gt_25_percent",
                    "met": false
                  },
                  {
                    "factor": "anorectal_obstruction_gt_25_percent",
                    "met": false
                  },
                  {
                    "factor": "manual_maneuvers_gt_25_percent",
                    "met": false
                  },
                  {
                    "factor": "fewer_than_3_sbm_per_week",
                    "met": true
                  },
                  {
                    "factor": "symptom_count_ge_2",
                    "met": true,
                    "value": 2
                  },
                  {
                    "factor": "loose_stools_rare_without_laxatives",
                    "met": true
                  }
                ],
                "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_oic",
                "formula_expression": "rome_iv_oic iff new_or_worsening_constipation_on_opioid_change and symptom_count >= 2 and loose_stools_rare_without_laxatives; symptom_count counts straining_gt_25_percent, lumpy_or_hard_stools_gt_25_percent, incomplete_evacuation_gt_25_percent, anorectal_obstruction_gt_25_percent, manual_maneuvers_gt_25_percent, and fewer_than_3_sbm_per_week (Mearin 2016 Rome IV C6 opioid-induced constipation)",
                "rome_iv_oic": true,
                "symptom_count": 2
              }
            ],
            "path": "/api/calc/rome_iv_oic"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "anorectal_obstruction_gt_25_percent": {
                          "description": "Sensation of anorectal obstruction/blockage more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller.",
                          "type": "boolean"
                        },
                        "fewer_than_3_sbm_per_week": {
                          "description": "Fewer than three spontaneous bowel movements per week (one of six C6 symptom items; at least two required). true or false as assigned by the caller.",
                          "type": "boolean"
                        },
                        "incomplete_evacuation_gt_25_percent": {
                          "description": "Sensation of incomplete evacuation more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller.",
                          "type": "boolean"
                        },
                        "loose_stools_rare_without_laxatives": {
                          "description": "Loose stools are rarely present without the use of laxatives, as assigned (Mearin 2016 C6). true or false as assigned by the caller. magent does not examine the patient.",
                          "type": "boolean"
                        },
                        "lumpy_or_hard_stools_gt_25_percent": {
                          "description": "Lumpy or hard stools (Bristol stool form types 1-2) more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller. magent does not inspect stool.",
                          "type": "boolean"
                        },
                        "manual_maneuvers_gt_25_percent": {
                          "description": "Manual maneuvers to facilitate more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller.",
                          "type": "boolean"
                        },
                        "new_or_worsening_constipation_on_opioid_change": {
                          "description": "New or worsening constipation when initiating, changing, or increasing opioid therapy, as assigned (Mearin 2016 C6). true or false as assigned by the caller. magent does not take a history or prescribe opioids.",
                          "type": "boolean"
                        },
                        "straining_gt_25_percent": {
                          "description": "Straining during more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller. magent does not examine the patient.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "new_or_worsening_constipation_on_opioid_change",
                        "straining_gt_25_percent",
                        "lumpy_or_hard_stools_gt_25_percent",
                        "incomplete_evacuation_gt_25_percent",
                        "anorectal_obstruction_gt_25_percent",
                        "manual_maneuvers_gt_25_percent",
                        "fewer_than_3_sbm_per_week",
                        "loose_stools_rare_without_laxatives"
                      ],
                      "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-oic",
    "opioid-constipation",
    "gi",
    "constipation",
    "rome-iv",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T13:37:37.691Z",
  "quality": {
    "calls30d": 6,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T13:37:37.555Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "anorectal_obstruction_gt_25_percent": false,
                  "fewer_than_3_sbm_per_week": true,
                  "incomplete_evacuation_gt_25_percent": false,
                  "loose_stools_rare_without_laxatives": true,
                  "lumpy_or_hard_stools_gt_25_percent": false,
                  "manual_maneuvers_gt_25_percent": false,
                  "new_or_worsening_constipation_on_opioid_change": true,
                  "straining_gt_25_percent": true
                },
                {
                  "anorectal_obstruction_gt_25_percent": false,
                  "fewer_than_3_sbm_per_week": true,
                  "incomplete_evacuation_gt_25_percent": false,
                  "loose_stools_rare_without_laxatives": true,
                  "lumpy_or_hard_stools_gt_25_percent": false,
                  "manual_maneuvers_gt_25_percent": false,
                  "new_or_worsening_constipation_on_opioid_change": true,
                  "straining_gt_25_percent": 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": "new_or_worsening_constipation_on_opioid_change",
                      "met": true
                    },
                    {
                      "factor": "straining_gt_25_percent",
                      "met": true
                    },
                    {
                      "factor": "lumpy_or_hard_stools_gt_25_percent",
                      "met": false
                    },
                    {
                      "factor": "incomplete_evacuation_gt_25_percent",
                      "met": false
                    },
                    {
                      "factor": "anorectal_obstruction_gt_25_percent",
                      "met": false
                    },
                    {
                      "factor": "manual_maneuvers_gt_25_percent",
                      "met": false
                    },
                    {
                      "factor": "fewer_than_3_sbm_per_week",
                      "met": true
                    },
                    {
                      "factor": "symptom_count_ge_2",
                      "met": true,
                      "value": 2
                    },
                    {
                      "factor": "loose_stools_rare_without_laxatives",
                      "met": true
                    }
                  ],
                  "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_oic",
                  "formula_expression": "rome_iv_oic iff new_or_worsening_constipation_on_opioid_change and symptom_count >= 2 and loose_stools_rare_without_laxatives; symptom_count counts straining_gt_25_percent, lumpy_or_hard_stools_gt_25_percent, incomplete_evacuation_gt_25_percent, anorectal_obstruction_gt_25_percent, manual_maneuvers_gt_25_percent, and fewer_than_3_sbm_per_week (Mearin 2016 Rome IV C6 opioid-induced constipation)",
                  "rome_iv_oic": true,
                  "symptom_count": 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": "new_or_worsening_constipation_on_opioid_change",
                      "met": true
                    },
                    {
                      "factor": "straining_gt_25_percent",
                      "met": true
                    },
                    {
                      "factor": "lumpy_or_hard_stools_gt_25_percent",
                      "met": false
                    },
                    {
                      "factor": "incomplete_evacuation_gt_25_percent",
                      "met": false
                    },
                    {
                      "factor": "anorectal_obstruction_gt_25_percent",
                      "met": false
                    },
                    {
                      "factor": "manual_maneuvers_gt_25_percent",
                      "met": false
                    },
                    {
                      "factor": "fewer_than_3_sbm_per_week",
                      "met": true
                    },
                    {
                      "factor": "symptom_count_ge_2",
                      "met": true,
                      "value": 2
                    },
                    {
                      "factor": "loose_stools_rare_without_laxatives",
                      "met": true
                    }
                  ],
                  "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_oic",
                  "formula_expression": "rome_iv_oic iff new_or_worsening_constipation_on_opioid_change and symptom_count >= 2 and loose_stools_rare_without_laxatives; symptom_count counts straining_gt_25_percent, lumpy_or_hard_stools_gt_25_percent, incomplete_evacuation_gt_25_percent, anorectal_obstruction_gt_25_percent, manual_maneuvers_gt_25_percent, and fewer_than_3_sbm_per_week (Mearin 2016 Rome IV C6 opioid-induced constipation)",
                  "rome_iv_oic": true,
                  "symptom_count": 2
                }
              ],
              "path": "/api/calc/rome_iv_oic"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "anorectal_obstruction_gt_25_percent": {
                            "description": "Sensation of anorectal obstruction/blockage more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller.",
                            "type": "boolean"
                          },
                          "fewer_than_3_sbm_per_week": {
                            "description": "Fewer than three spontaneous bowel movements per week (one of six C6 symptom items; at least two required). true or false as assigned by the caller.",
                            "type": "boolean"
                          },
                          "incomplete_evacuation_gt_25_percent": {
                            "description": "Sensation of incomplete evacuation more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller.",
                            "type": "boolean"
                          },
                          "loose_stools_rare_without_laxatives": {
                            "description": "Loose stools are rarely present without the use of laxatives, as assigned (Mearin 2016 C6). true or false as assigned by the caller. magent does not examine the patient.",
                            "type": "boolean"
                          },
                          "lumpy_or_hard_stools_gt_25_percent": {
                            "description": "Lumpy or hard stools (Bristol stool form types 1-2) more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller. magent does not inspect stool.",
                            "type": "boolean"
                          },
                          "manual_maneuvers_gt_25_percent": {
                            "description": "Manual maneuvers to facilitate more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller.",
                            "type": "boolean"
                          },
                          "new_or_worsening_constipation_on_opioid_change": {
                            "description": "New or worsening constipation when initiating, changing, or increasing opioid therapy, as assigned (Mearin 2016 C6). true or false as assigned by the caller. magent does not take a history or prescribe opioids.",
                            "type": "boolean"
                          },
                          "straining_gt_25_percent": {
                            "description": "Straining during more than 25% of defecations (one of six C6 symptom items; at least two required). true or false as assigned by the caller. magent does not examine the patient.",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "new_or_worsening_constipation_on_opioid_change",
                          "straining_gt_25_percent",
                          "lumpy_or_hard_stools_gt_25_percent",
                          "incomplete_evacuation_gt_25_percent",
                          "anorectal_obstruction_gt_25_percent",
                          "manual_maneuvers_gt_25_percent",
                          "fewer_than_3_sbm_per_week",
                          "loose_stools_rare_without_laxatives"
                        ],
                        "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"
  }
}