{
  "x402Version": 2,
  "id": 38854,
  "slug": "38854",
  "resource": "https://api.magentlab.com/api/calc/rockall_pre",
  "description": "Rockall 1996 pre-endoscopy (admission) score after acute upper GI haemorrhage: age <60 0, 60-79 1, >=80 2; shock SBP<100 2 (hypotension; tachycardia not added), else HR>=100 1, else 0; comorbidity none 0, cardiac (failure, IHD, or any major) 2, renal/liver/metastatic 3. Max 7. Not complete Rockall, AIMS65, or GBS. Caller assigns comorbidity.",
  "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": [
              {
                "age": 50,
                "comorbidity": "none",
                "heart_rate_bpm": 80,
                "systolic_mm_hg": 120
              },
              {
                "age": 50,
                "comorbidity": "none",
                "heart_rate_bpm": 80,
                "systolic_mm_hg": 120
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "age_years": 50,
                "citation": {
                  "authors": "Rockall TA, Logan RF, Devlin HB, Northfield TC",
                  "doi": "10.1136/gut.38.3.316",
                  "id": "rockall-1996",
                  "source": "Gut. 1996;38(3):316-321",
                  "title": "Risk assessment after acute upper gastrointestinal haemorrhage"
                },
                "comorbidity": "none",
                "components": [
                  {
                    "factor": "age",
                    "points": 0,
                    "present": false,
                    "value": 50
                  },
                  {
                    "factor": "shock",
                    "points": 0,
                    "present": false,
                    "value": {
                      "heart_rate_bpm": 80,
                      "systolic_mm_hg": 120
                    }
                  },
                  {
                    "factor": "comorbidity",
                    "points": 0,
                    "present": false,
                    "value": "none"
                  }
                ],
                "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": "rockall_pre",
                "formula_expression": "pre-endoscopy Rockall = age (<60: 0, 60-79: 1, >=80: 2) + shock (SBP<100: 2; else HR>=100: 1; else 0) + comorbidity (none: 0, cardiac: 2, renal_liver_metastatic: 3); max 7",
                "heart_rate_bpm": 80,
                "max_score": 7,
                "score": 0,
                "systolic_mm_hg": 120
              },
              {
                "age_years": 50,
                "citation": {
                  "authors": "Rockall TA, Logan RF, Devlin HB, Northfield TC",
                  "doi": "10.1136/gut.38.3.316",
                  "id": "rockall-1996",
                  "source": "Gut. 1996;38(3):316-321",
                  "title": "Risk assessment after acute upper gastrointestinal haemorrhage"
                },
                "comorbidity": "none",
                "components": [
                  {
                    "factor": "age",
                    "points": 0,
                    "present": false,
                    "value": 50
                  },
                  {
                    "factor": "shock",
                    "points": 0,
                    "present": false,
                    "value": {
                      "heart_rate_bpm": 80,
                      "systolic_mm_hg": 120
                    }
                  },
                  {
                    "factor": "comorbidity",
                    "points": 0,
                    "present": false,
                    "value": "none"
                  }
                ],
                "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": "rockall_pre",
                "formula_expression": "pre-endoscopy Rockall = age (<60: 0, 60-79: 1, >=80: 2) + shock (SBP<100: 2; else HR>=100: 1; else 0) + comorbidity (none: 0, cardiac: 2, renal_liver_metastatic: 3); max 7",
                "heart_rate_bpm": 80,
                "max_score": 7,
                "score": 0,
                "systolic_mm_hg": 120
              }
            ],
            "path": "/api/calc/rockall_pre"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "age": {
                          "description": "Age in years (18-120). <60 scores 0; 60-79 scores 1; ≥80 scores 2. 59 does not score; 60 scores 1; 79 scores 1; 80 scores 2.",
                          "type": "integer"
                        },
                        "comorbidity": {
                          "description": "Caller-assigned comorbidity: none (0), cardiac (2; cardiac failure, IHD, or any major comorbidity), or renal_liver_metastatic (3; renal failure, liver failure, or disseminated malignancy). magent does not assign comorbidity.",
                          "type": "string"
                        },
                        "heart_rate_bpm": {
                          "description": "Heart rate in beats per minute (integer 30-220). With SBP ≥100, HR ≥100 scores 1 (tachycardia); 99 does not. Not added when SBP <100.",
                          "type": "integer"
                        },
                        "systolic_mm_hg": {
                          "description": "Systolic blood pressure in mm Hg (50-250). SBP <100 scores 2 (hypotension) and tachycardia is not added; 100 does not score hypotension.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "age",
                        "heart_rate_bpm",
                        "systolic_mm_hg",
                        "comorbidity"
                      ],
                      "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": [
    "rockall",
    "gi",
    "bleed",
    "score",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T12:46:44.133Z",
  "quality": {
    "calls30d": 6,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T12:46:44.012Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "age": 50,
                  "comorbidity": "none",
                  "heart_rate_bpm": 80,
                  "systolic_mm_hg": 120
                },
                {
                  "age": 50,
                  "comorbidity": "none",
                  "heart_rate_bpm": 80,
                  "systolic_mm_hg": 120
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "age_years": 50,
                  "citation": {
                    "authors": "Rockall TA, Logan RF, Devlin HB, Northfield TC",
                    "doi": "10.1136/gut.38.3.316",
                    "id": "rockall-1996",
                    "source": "Gut. 1996;38(3):316-321",
                    "title": "Risk assessment after acute upper gastrointestinal haemorrhage"
                  },
                  "comorbidity": "none",
                  "components": [
                    {
                      "factor": "age",
                      "points": 0,
                      "present": false,
                      "value": 50
                    },
                    {
                      "factor": "shock",
                      "points": 0,
                      "present": false,
                      "value": {
                        "heart_rate_bpm": 80,
                        "systolic_mm_hg": 120
                      }
                    },
                    {
                      "factor": "comorbidity",
                      "points": 0,
                      "present": false,
                      "value": "none"
                    }
                  ],
                  "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": "rockall_pre",
                  "formula_expression": "pre-endoscopy Rockall = age (<60: 0, 60-79: 1, >=80: 2) + shock (SBP<100: 2; else HR>=100: 1; else 0) + comorbidity (none: 0, cardiac: 2, renal_liver_metastatic: 3); max 7",
                  "heart_rate_bpm": 80,
                  "max_score": 7,
                  "score": 0,
                  "systolic_mm_hg": 120
                },
                {
                  "age_years": 50,
                  "citation": {
                    "authors": "Rockall TA, Logan RF, Devlin HB, Northfield TC",
                    "doi": "10.1136/gut.38.3.316",
                    "id": "rockall-1996",
                    "source": "Gut. 1996;38(3):316-321",
                    "title": "Risk assessment after acute upper gastrointestinal haemorrhage"
                  },
                  "comorbidity": "none",
                  "components": [
                    {
                      "factor": "age",
                      "points": 0,
                      "present": false,
                      "value": 50
                    },
                    {
                      "factor": "shock",
                      "points": 0,
                      "present": false,
                      "value": {
                        "heart_rate_bpm": 80,
                        "systolic_mm_hg": 120
                      }
                    },
                    {
                      "factor": "comorbidity",
                      "points": 0,
                      "present": false,
                      "value": "none"
                    }
                  ],
                  "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": "rockall_pre",
                  "formula_expression": "pre-endoscopy Rockall = age (<60: 0, 60-79: 1, >=80: 2) + shock (SBP<100: 2; else HR>=100: 1; else 0) + comorbidity (none: 0, cardiac: 2, renal_liver_metastatic: 3); max 7",
                  "heart_rate_bpm": 80,
                  "max_score": 7,
                  "score": 0,
                  "systolic_mm_hg": 120
                }
              ],
              "path": "/api/calc/rockall_pre"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "age": {
                            "description": "Age in years (18-120). <60 scores 0; 60-79 scores 1; ≥80 scores 2. 59 does not score; 60 scores 1; 79 scores 1; 80 scores 2.",
                            "type": "integer"
                          },
                          "comorbidity": {
                            "description": "Caller-assigned comorbidity: none (0), cardiac (2; cardiac failure, IHD, or any major comorbidity), or renal_liver_metastatic (3; renal failure, liver failure, or disseminated malignancy). magent does not assign comorbidity.",
                            "type": "string"
                          },
                          "heart_rate_bpm": {
                            "description": "Heart rate in beats per minute (integer 30-220). With SBP ≥100, HR ≥100 scores 1 (tachycardia); 99 does not. Not added when SBP <100.",
                            "type": "integer"
                          },
                          "systolic_mm_hg": {
                            "description": "Systolic blood pressure in mm Hg (50-250). SBP <100 scores 2 (hypotension) and tachycardia is not added; 100 does not score hypotension.",
                            "type": "number"
                          }
                        },
                        "required": [
                          "age",
                          "heart_rate_bpm",
                          "systolic_mm_hg",
                          "comorbidity"
                        ],
                        "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"
  }
}