{"uid":"cap_QYtk8y4fv1_08MW8k0H3n","slug":"rockall-score-calculator-post-endoscopy-1996-c9058abf","name":"Rockall Score Calculator (Post-Endoscopy, 1996)","description":"Rockall 1996 complete (post-endoscopy) 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 2, renal/liver/metastatic 3; diagnosis none or mallory_weiss 0, other 1, malignancy 2; stigmata none_or_spot 0, blood_clot_vessel 2. Max 11. Not pre-endoscopy-only Rockall, AIMS65, or GBS. Caller assigns comorbidity, diagnosis, and stigmata.","url":"https://api.magentlab.com/api/calc/rockall","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","required":["age","heart_rate_bpm","systolic_mm_hg","comorbidity","diagnosis","stigmata"],"properties":{"age":{"type":"integer","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."},"stigmata":{"type":"string","description":"Caller-assigned stigmata of recent haemorrhage: none_or_spot (0; none or dark spot only) or blood_clot_vessel (2; blood in the upper GI tract, adherent clot, visible or spurting vessel). magent does not assign stigmata."},"diagnosis":{"type":"string","description":"Caller-assigned diagnosis: none (0; no lesion identified and no stigmata of recent haemorrhage), mallory_weiss (0), other (1; all other diagnoses), or malignancy (2; malignancy of the upper GI tract). magent does not assign diagnosis."},"comorbidity":{"type":"string","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."},"heart_rate_bpm":{"type":"integer","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."},"systolic_mm_hg":{"type":"number","description":"Systolic blood pressure in mm Hg (50-250). SBP <100 scores 2 (hypotension) and tachycardia is not added; 100 does not score hypotension."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"path":"/api/calc/rockall","count":2,"items":[{"score":0,"formula":"rockall","citation":{"id":"rockall-1996","doi":"10.1136/gut.38.3.316","pmid":"8675081","title":"Risk assessment after acute upper gastrointestinal haemorrhage","source":"Gut. 1996;38(3):316-321","authors":"Rockall TA, Logan RF, Devlin HB, Northfield TC"},"stigmata":"none_or_spot","age_years":50,"diagnosis":"none","max_score":11,"components":[{"value":50,"factor":"age","points":0,"present":false},{"value":{"heart_rate_bpm":80,"systolic_mm_hg":120},"factor":"shock","points":0,"present":false},{"value":"none","factor":"comorbidity","points":0,"present":false},{"value":"none","factor":"diagnosis","points":0,"present":false},{"value":"none_or_spot","factor":"stigmata","points":0,"present":false}],"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.","comorbidity":"none","heart_rate_bpm":80,"systolic_mm_hg":120,"formula_expression":"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) + diagnosis (none: 0, mallory_weiss: 0, other: 1, malignancy: 2) + stigmata (none_or_spot: 0, blood_clot_vessel: 2); max 11"},{"score":0,"formula":"rockall","citation":{"id":"rockall-1996","doi":"10.1136/gut.38.3.316","pmid":"8675081","title":"Risk assessment after acute upper gastrointestinal haemorrhage","source":"Gut. 1996;38(3):316-321","authors":"Rockall TA, Logan RF, Devlin HB, Northfield TC"},"stigmata":"none_or_spot","age_years":50,"diagnosis":"none","max_score":11,"components":[{"value":50,"factor":"age","points":0,"present":false},{"value":{"heart_rate_bpm":80,"systolic_mm_hg":120},"factor":"shock","points":0,"present":false},{"value":"none","factor":"comorbidity","points":0,"present":false},{"value":"none","factor":"diagnosis","points":0,"present":false},{"value":"none_or_spot","factor":"stigmata","points":0,"present":false}],"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.","comorbidity":"none","heart_rate_bpm":80,"systolic_mm_hg":120,"formula_expression":"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) + diagnosis (none: 0, mallory_weiss: 0, other: 1, malignancy: 2) + stigmata (none_or_spot: 0, blood_clot_vessel: 2); max 11"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_BuKCZG1ZFuvuVIwCY1RCD","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the complete post-endoscopy Rockall score for risk-stratifying acute upper GI haemorrhage patients, returning a score from 0 to 11.","exampleAgentPrompt":"Calculate the complete post-endoscopy Rockall score for a 72-year-old patient with heart rate 105 bpm and systolic BP 110 mmHg, no comorbidities, diagnosed with peptic ulcer (other), and stigmata showing an adherent clot (blood_clot_vessel).","exampleUseCases":[{"title":"ED triage after urgent endoscopy","prompt":"My patient is 68 years old, HR 112, SBP 95, has known cardiac failure, endoscopy showed a peptic ulcer with a visible spurting vessel — what's their post-endoscopy Rockall score?"},{"title":"Low-risk UGIB discharge assessment","prompt":"Can you calculate the Rockall score for a 55-year-old with HR 80, SBP 125, no comorbidities, Mallory-Weiss tear on scope, and no stigmata of recent haemorrhage?"},{"title":"High-risk GI bleed mortality stratification","prompt":"Calculate the complete Rockall score for an 82-year-old with HR 98, systolic BP 88, liver failure, upper GI malignancy found on endoscopy, and blood visible in the GI tract (blood_clot_vessel stigmata)."}],"resultDescription":"Returns the integer total Rockall score (0–11) derived from the five post-endoscopy components: age band (0–2), shock status (0–2), comorbidity (0–3), endoscopic diagnosis (0–2), and stigmata of recent haemorrhage (0–2). Higher scores indicate greater risk of rebleeding and mortality.","failureModes":["Missing required parameters (age, heart_rate_bpm, systolic_mm_hg, comorbidity, diagnosis, stigmata) returns a 400 error","Invalid enum value for comorbidity, diagnosis, or stigmata returns a validation error","Age or heart rate outside allowed range (age 18–120, HR 30–220) returns a validation error","Systolic BP outside 50–250 mmHg returns a validation error","Payment failure via x402 protocol returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need the complete (post-endoscopy) 1996 Rockall score specifically — not the pre-endoscopy-only Rockall variant, AIMS65, or Glasgow-Blatchford Score (GBS). It is the correct tool when endoscopic findings (diagnosis and stigmata) are available. Caller must supply comorbidity, diagnosis, and stigmata categories based on clinical assessment, as the API does not infer these from raw clinical notes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:50:48.828Z","isFirstParty":false}