{
  "x402Version": 2,
  "id": 38911,
  "slug": "38911",
  "resource": "https://api.magentlab.com/api/calc/wexner_constipation",
  "description": "Agachan 1996 constipation scoring system from eight caller-assigned table bands (frequency, painful evacuation, incomplete evacuation, abdominal pain, time per attempt, assistance 0-2, unsuccessful attempts per 24 hours, duration). Total 0-30. constipation true iff score > 15. magent does not take a bowel history. Not a medical device, not a laxative order, not Jorge 1993 fecal incontinence scoring.",
  "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": [
              {
                "abdominal_pain": "never",
                "assistance": "without_assistance",
                "duration": "0",
                "frequency": "1_2_times_per_1_2_days",
                "incomplete_evacuation": "never",
                "painful_evacuation": "never",
                "time_per_attempt": "less_than_5",
                "unsuccessful_attempts": "never"
              },
              {
                "abdominal_pain": "never",
                "assistance": "without_assistance",
                "duration": "0",
                "frequency": "1_2_times_per_1_2_days",
                "incomplete_evacuation": "never",
                "painful_evacuation": "never",
                "time_per_attempt": "less_than_5",
                "unsuccessful_attempts": "never"
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "citation": {
                  "authors": "Agachan F, Chen T, Pfeifer J, Reissman P, Wexner SD",
                  "doi": "10.1007/BF02056950",
                  "id": "agachan-1996",
                  "pmid": "8646957",
                  "source": "Dis Colon Rectum. 1996;39(6):681-685",
                  "title": "A constipation scoring system to simplify evaluation and management of constipated patients"
                },
                "components": [
                  {
                    "factor": "frequency",
                    "points": 0,
                    "present": false,
                    "value": "1_2_times_per_1_2_days"
                  },
                  {
                    "factor": "painful_evacuation",
                    "points": 0,
                    "present": false,
                    "value": "never"
                  },
                  {
                    "factor": "incomplete_evacuation",
                    "points": 0,
                    "present": false,
                    "value": "never"
                  },
                  {
                    "factor": "abdominal_pain",
                    "points": 0,
                    "present": false,
                    "value": "never"
                  },
                  {
                    "factor": "time_per_attempt",
                    "points": 0,
                    "present": false,
                    "value": "less_than_5"
                  },
                  {
                    "factor": "assistance",
                    "points": 0,
                    "present": false,
                    "value": "without_assistance"
                  },
                  {
                    "factor": "unsuccessful_attempts",
                    "points": 0,
                    "present": false,
                    "value": "never"
                  },
                  {
                    "factor": "duration",
                    "points": 0,
                    "present": false,
                    "value": "0"
                  }
                ],
                "constipation": false,
                "cutoff": 15,
                "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": "wexner_constipation",
                "formula_expression": "wexner_constipation = frequency + painful_evacuation + incomplete_evacuation + abdominal_pain + time_per_attempt + assistance + unsuccessful_attempts + duration; Agachan 1996 eight-item constipation scoring system; frequency, painful_evacuation, incomplete_evacuation, abdominal_pain, time_per_attempt, unsuccessful_attempts, and duration each 0-4; assistance 0-2; max 30; constipation iff score > 15",
                "max_score": 30,
                "score": 0
              },
              {
                "citation": {
                  "authors": "Agachan F, Chen T, Pfeifer J, Reissman P, Wexner SD",
                  "doi": "10.1007/BF02056950",
                  "id": "agachan-1996",
                  "pmid": "8646957",
                  "source": "Dis Colon Rectum. 1996;39(6):681-685",
                  "title": "A constipation scoring system to simplify evaluation and management of constipated patients"
                },
                "components": [
                  {
                    "factor": "frequency",
                    "points": 0,
                    "present": false,
                    "value": "1_2_times_per_1_2_days"
                  },
                  {
                    "factor": "painful_evacuation",
                    "points": 0,
                    "present": false,
                    "value": "never"
                  },
                  {
                    "factor": "incomplete_evacuation",
                    "points": 0,
                    "present": false,
                    "value": "never"
                  },
                  {
                    "factor": "abdominal_pain",
                    "points": 0,
                    "present": false,
                    "value": "never"
                  },
                  {
                    "factor": "time_per_attempt",
                    "points": 0,
                    "present": false,
                    "value": "less_than_5"
                  },
                  {
                    "factor": "assistance",
                    "points": 0,
                    "present": false,
                    "value": "without_assistance"
                  },
                  {
                    "factor": "unsuccessful_attempts",
                    "points": 0,
                    "present": false,
                    "value": "never"
                  },
                  {
                    "factor": "duration",
                    "points": 0,
                    "present": false,
                    "value": "0"
                  }
                ],
                "constipation": false,
                "cutoff": 15,
                "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": "wexner_constipation",
                "formula_expression": "wexner_constipation = frequency + painful_evacuation + incomplete_evacuation + abdominal_pain + time_per_attempt + assistance + unsuccessful_attempts + duration; Agachan 1996 eight-item constipation scoring system; frequency, painful_evacuation, incomplete_evacuation, abdominal_pain, time_per_attempt, unsuccessful_attempts, and duration each 0-4; assistance 0-2; max 30; constipation iff score > 15",
                "max_score": 30,
                "score": 0
              }
            ],
            "path": "/api/calc/wexner_constipation"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "abdominal_pain": {
                          "description": "Caller-assigned Agachan 1996 abdominal pain. never scores 0; rarely 1; sometimes 2; usually 3; always 4. magent does not take a bowel history.",
                          "enum": [
                            "never",
                            "rarely",
                            "sometimes",
                            "usually",
                            "always"
                          ],
                          "type": "string"
                        },
                        "assistance": {
                          "description": "Caller-assigned Agachan 1996 type of assistance. without_assistance scores 0; stimulative_laxatives scores 1; digital_assistance_or_enema scores 2. This item is 0-2 in that table, not 0-4. magent does not order laxatives, enemas, or digital assistance.",
                          "enum": [
                            "without_assistance",
                            "stimulative_laxatives",
                            "digital_assistance_or_enema"
                          ],
                          "type": "string"
                        },
                        "duration": {
                          "description": "Caller-assigned Agachan 1996 duration of constipation in years. 0 scores 0; 1_5 scores 1; 5_10 scores 2; 10_20 scores 3; more_than_20 scores 4. Adjacent printed ranges overlap; the caller assigns the published band. magent does not take a bowel history.",
                          "enum": [
                            "0",
                            "1_5",
                            "5_10",
                            "10_20",
                            "more_than_20"
                          ],
                          "type": "string"
                        },
                        "frequency": {
                          "description": "Caller-assigned Agachan 1996 frequency of bowel movements. 1_2_times_per_1_2_days (1-2 times per 1-2 days) scores 0; 2_times_per_week scores 1; once_per_week scores 2; less_than_once_per_week scores 3; less_than_once_per_month scores 4. magent does not take a bowel history.",
                          "enum": [
                            "1_2_times_per_1_2_days",
                            "2_times_per_week",
                            "once_per_week",
                            "less_than_once_per_week",
                            "less_than_once_per_month"
                          ],
                          "type": "string"
                        },
                        "incomplete_evacuation": {
                          "description": "Caller-assigned Agachan 1996 feeling of incomplete evacuation. never scores 0; rarely 1; sometimes 2; usually 3; always 4. magent does not take a bowel history.",
                          "enum": [
                            "never",
                            "rarely",
                            "sometimes",
                            "usually",
                            "always"
                          ],
                          "type": "string"
                        },
                        "painful_evacuation": {
                          "description": "Caller-assigned Agachan 1996 painful evacuation effort. never scores 0; rarely 1; sometimes 2; usually 3; always 4. magent does not take a bowel history.",
                          "enum": [
                            "never",
                            "rarely",
                            "sometimes",
                            "usually",
                            "always"
                          ],
                          "type": "string"
                        },
                        "time_per_attempt": {
                          "description": "Caller-assigned Agachan 1996 minutes in lavatory per attempt. less_than_5 scores 0; 5_10 scores 1; 10_20 scores 2; 20_30 scores 3; more_than_30 scores 4. magent does not time the attempt.",
                          "enum": [
                            "less_than_5",
                            "5_10",
                            "10_20",
                            "20_30",
                            "more_than_30"
                          ],
                          "type": "string"
                        },
                        "unsuccessful_attempts": {
                          "description": "Caller-assigned Agachan 1996 unsuccessful attempts for evacuation per 24 hours. never scores 0; 1_3 scores 1; 3_6 scores 2; 6_9 scores 3; more_than_9 scores 4. Adjacent printed ranges overlap; the caller assigns the published band. magent does not take a bowel history.",
                          "enum": [
                            "never",
                            "1_3",
                            "3_6",
                            "6_9",
                            "more_than_9"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "frequency",
                        "painful_evacuation",
                        "incomplete_evacuation",
                        "abdominal_pain",
                        "time_per_attempt",
                        "assistance",
                        "unsuccessful_attempts",
                        "duration"
                      ],
                      "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": [
    "constipation-score",
    "agachan",
    "gi",
    "wexner-constipation",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T23:38:41.292Z",
  "quality": {
    "calls30d": 6,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T23:38:41.134Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "abdominal_pain": "never",
                  "assistance": "without_assistance",
                  "duration": "0",
                  "frequency": "1_2_times_per_1_2_days",
                  "incomplete_evacuation": "never",
                  "painful_evacuation": "never",
                  "time_per_attempt": "less_than_5",
                  "unsuccessful_attempts": "never"
                },
                {
                  "abdominal_pain": "never",
                  "assistance": "without_assistance",
                  "duration": "0",
                  "frequency": "1_2_times_per_1_2_days",
                  "incomplete_evacuation": "never",
                  "painful_evacuation": "never",
                  "time_per_attempt": "less_than_5",
                  "unsuccessful_attempts": "never"
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "citation": {
                    "authors": "Agachan F, Chen T, Pfeifer J, Reissman P, Wexner SD",
                    "doi": "10.1007/BF02056950",
                    "id": "agachan-1996",
                    "pmid": "8646957",
                    "source": "Dis Colon Rectum. 1996;39(6):681-685",
                    "title": "A constipation scoring system to simplify evaluation and management of constipated patients"
                  },
                  "components": [
                    {
                      "factor": "frequency",
                      "points": 0,
                      "present": false,
                      "value": "1_2_times_per_1_2_days"
                    },
                    {
                      "factor": "painful_evacuation",
                      "points": 0,
                      "present": false,
                      "value": "never"
                    },
                    {
                      "factor": "incomplete_evacuation",
                      "points": 0,
                      "present": false,
                      "value": "never"
                    },
                    {
                      "factor": "abdominal_pain",
                      "points": 0,
                      "present": false,
                      "value": "never"
                    },
                    {
                      "factor": "time_per_attempt",
                      "points": 0,
                      "present": false,
                      "value": "less_than_5"
                    },
                    {
                      "factor": "assistance",
                      "points": 0,
                      "present": false,
                      "value": "without_assistance"
                    },
                    {
                      "factor": "unsuccessful_attempts",
                      "points": 0,
                      "present": false,
                      "value": "never"
                    },
                    {
                      "factor": "duration",
                      "points": 0,
                      "present": false,
                      "value": "0"
                    }
                  ],
                  "constipation": false,
                  "cutoff": 15,
                  "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": "wexner_constipation",
                  "formula_expression": "wexner_constipation = frequency + painful_evacuation + incomplete_evacuation + abdominal_pain + time_per_attempt + assistance + unsuccessful_attempts + duration; Agachan 1996 eight-item constipation scoring system; frequency, painful_evacuation, incomplete_evacuation, abdominal_pain, time_per_attempt, unsuccessful_attempts, and duration each 0-4; assistance 0-2; max 30; constipation iff score > 15",
                  "max_score": 30,
                  "score": 0
                },
                {
                  "citation": {
                    "authors": "Agachan F, Chen T, Pfeifer J, Reissman P, Wexner SD",
                    "doi": "10.1007/BF02056950",
                    "id": "agachan-1996",
                    "pmid": "8646957",
                    "source": "Dis Colon Rectum. 1996;39(6):681-685",
                    "title": "A constipation scoring system to simplify evaluation and management of constipated patients"
                  },
                  "components": [
                    {
                      "factor": "frequency",
                      "points": 0,
                      "present": false,
                      "value": "1_2_times_per_1_2_days"
                    },
                    {
                      "factor": "painful_evacuation",
                      "points": 0,
                      "present": false,
                      "value": "never"
                    },
                    {
                      "factor": "incomplete_evacuation",
                      "points": 0,
                      "present": false,
                      "value": "never"
                    },
                    {
                      "factor": "abdominal_pain",
                      "points": 0,
                      "present": false,
                      "value": "never"
                    },
                    {
                      "factor": "time_per_attempt",
                      "points": 0,
                      "present": false,
                      "value": "less_than_5"
                    },
                    {
                      "factor": "assistance",
                      "points": 0,
                      "present": false,
                      "value": "without_assistance"
                    },
                    {
                      "factor": "unsuccessful_attempts",
                      "points": 0,
                      "present": false,
                      "value": "never"
                    },
                    {
                      "factor": "duration",
                      "points": 0,
                      "present": false,
                      "value": "0"
                    }
                  ],
                  "constipation": false,
                  "cutoff": 15,
                  "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": "wexner_constipation",
                  "formula_expression": "wexner_constipation = frequency + painful_evacuation + incomplete_evacuation + abdominal_pain + time_per_attempt + assistance + unsuccessful_attempts + duration; Agachan 1996 eight-item constipation scoring system; frequency, painful_evacuation, incomplete_evacuation, abdominal_pain, time_per_attempt, unsuccessful_attempts, and duration each 0-4; assistance 0-2; max 30; constipation iff score > 15",
                  "max_score": 30,
                  "score": 0
                }
              ],
              "path": "/api/calc/wexner_constipation"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "abdominal_pain": {
                            "description": "Caller-assigned Agachan 1996 abdominal pain. never scores 0; rarely 1; sometimes 2; usually 3; always 4. magent does not take a bowel history.",
                            "enum": [
                              "never",
                              "rarely",
                              "sometimes",
                              "usually",
                              "always"
                            ],
                            "type": "string"
                          },
                          "assistance": {
                            "description": "Caller-assigned Agachan 1996 type of assistance. without_assistance scores 0; stimulative_laxatives scores 1; digital_assistance_or_enema scores 2. This item is 0-2 in that table, not 0-4. magent does not order laxatives, enemas, or digital assistance.",
                            "enum": [
                              "without_assistance",
                              "stimulative_laxatives",
                              "digital_assistance_or_enema"
                            ],
                            "type": "string"
                          },
                          "duration": {
                            "description": "Caller-assigned Agachan 1996 duration of constipation in years. 0 scores 0; 1_5 scores 1; 5_10 scores 2; 10_20 scores 3; more_than_20 scores 4. Adjacent printed ranges overlap; the caller assigns the published band. magent does not take a bowel history.",
                            "enum": [
                              "0",
                              "1_5",
                              "5_10",
                              "10_20",
                              "more_than_20"
                            ],
                            "type": "string"
                          },
                          "frequency": {
                            "description": "Caller-assigned Agachan 1996 frequency of bowel movements. 1_2_times_per_1_2_days (1-2 times per 1-2 days) scores 0; 2_times_per_week scores 1; once_per_week scores 2; less_than_once_per_week scores 3; less_than_once_per_month scores 4. magent does not take a bowel history.",
                            "enum": [
                              "1_2_times_per_1_2_days",
                              "2_times_per_week",
                              "once_per_week",
                              "less_than_once_per_week",
                              "less_than_once_per_month"
                            ],
                            "type": "string"
                          },
                          "incomplete_evacuation": {
                            "description": "Caller-assigned Agachan 1996 feeling of incomplete evacuation. never scores 0; rarely 1; sometimes 2; usually 3; always 4. magent does not take a bowel history.",
                            "enum": [
                              "never",
                              "rarely",
                              "sometimes",
                              "usually",
                              "always"
                            ],
                            "type": "string"
                          },
                          "painful_evacuation": {
                            "description": "Caller-assigned Agachan 1996 painful evacuation effort. never scores 0; rarely 1; sometimes 2; usually 3; always 4. magent does not take a bowel history.",
                            "enum": [
                              "never",
                              "rarely",
                              "sometimes",
                              "usually",
                              "always"
                            ],
                            "type": "string"
                          },
                          "time_per_attempt": {
                            "description": "Caller-assigned Agachan 1996 minutes in lavatory per attempt. less_than_5 scores 0; 5_10 scores 1; 10_20 scores 2; 20_30 scores 3; more_than_30 scores 4. magent does not time the attempt.",
                            "enum": [
                              "less_than_5",
                              "5_10",
                              "10_20",
                              "20_30",
                              "more_than_30"
                            ],
                            "type": "string"
                          },
                          "unsuccessful_attempts": {
                            "description": "Caller-assigned Agachan 1996 unsuccessful attempts for evacuation per 24 hours. never scores 0; 1_3 scores 1; 3_6 scores 2; 6_9 scores 3; more_than_9 scores 4. Adjacent printed ranges overlap; the caller assigns the published band. magent does not take a bowel history.",
                            "enum": [
                              "never",
                              "1_3",
                              "3_6",
                              "6_9",
                              "more_than_9"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "frequency",
                          "painful_evacuation",
                          "incomplete_evacuation",
                          "abdominal_pain",
                          "time_per_attempt",
                          "assistance",
                          "unsuccessful_attempts",
                          "duration"
                        ],
                        "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"
  }
}