{"uid":"cap_4fMqX72KXQV2a_GiYUDY6","slug":"rockall-pre-endoscopy-score-calculator-magent-03be0d10","name":"Rockall Pre-Endoscopy Score Calculator (magent)","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.","url":"https://api.magentlab.com/api/calc/rockall_pre","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"],"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."},"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_pre","count":2,"items":[{"score":0,"formula":"rockall_pre","citation":{"id":"rockall-1996","doi":"10.1136/gut.38.3.316","title":"Risk assessment after acute upper gastrointestinal haemorrhage","source":"Gut. 1996;38(3):316-321","authors":"Rockall TA, Logan RF, Devlin HB, Northfield TC"},"age_years":50,"max_score":7,"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}],"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":"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"},{"score":0,"formula":"rockall_pre","citation":{"id":"rockall-1996","doi":"10.1136/gut.38.3.316","title":"Risk assessment after acute upper gastrointestinal haemorrhage","source":"Gut. 1996;38(3):316-321","authors":"Rockall TA, Logan RF, Devlin HB, Northfield TC"},"age_years":50,"max_score":7,"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}],"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":"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"}]}},"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_GTndSe419uXH8fR6aypnJ","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":"Calculates the Rockall 1996 pre-endoscopy admission score for acute upper GI haemorrhage from age, blood pressure, heart rate, and comorbidity.","exampleAgentPrompt":"Calculate the Rockall pre-endoscopy score for a 72-year-old patient with a systolic BP of 88 mmHg, heart rate of 110 bpm, and known ischaemic heart disease — so comorbidity is cardiac.","exampleUseCases":[{"title":"ED triage for acute GI bleed","prompt":"My patient in the ED is 65 years old, systolic BP is 105 mmHg, heart rate is 102 bpm, and they have no significant comorbidities — what's their Rockall pre-endoscopy admission score?"},{"title":"High-risk elderly patient with liver failure","prompt":"Compute the Rockall admission score for an 81-year-old with a systolic of 92 mmHg, heart rate of 95 bpm, and known liver failure — comorbidity is renal_liver_metastatic."},{"title":"Low-risk young patient assessment","prompt":"What's the pre-endoscopy Rockall score for a 45-year-old presenting with upper GI bleed, systolic BP 120 mmHg, heart rate 88 bpm, and no comorbidities?"}],"resultDescription":"Returns the integer Rockall pre-endoscopy score (0–7) broken down by component contributions: age band (0–2), shock/haemodynamic status (0–2), and comorbidity tier (0–3). Does not include post-endoscopy Rockall components (stigmata, diagnosis). Not equivalent to full Rockall, AIMS65, or Glasgow-Blatchford.","failureModes":["Age outside 18–120 range returns validation error","Heart rate outside 30–220 range returns validation error","Systolic BP outside 50–250 returns validation error","Invalid comorbidity string (not 'none', 'cardiac', or 'renal_liver_metastatic') returns error","Missing required query parameters return 400-level error","Payment failure (x402) blocks the call if USDC not provided"],"whenToPreferThis":"Use this endpoint when you need a fast, explainable pre-endoscopy triage score for acute upper GI haemorrhage and the caller can assign comorbidity category from the clinical record. Prefer over full Rockall when endoscopy findings are not yet available. Not a substitute for AIMS65 or Glasgow-Blatchford if those are needed; choose based on which score is required by the clinical workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:13:14.917Z","isFirstParty":false}