Clinical Commander

All dossiers
symptom.gi_bleed.ed.v1

GI bleed (ED workup — upper + lower undifferentiated)

symptomacuteundifferentiatedadultacute

Phase C shard-3-neuro-sym wave-8 expansion (2026-05-15) — pattern-matches symptom.chest_pain.ed_undifferentiated.v1 (be7b7d2f) and symptom.abdominal_pain.ed.v1 / symptom.back_pain.ed.v1 (10eb1bcb wave-7). Engine scope: ED triage + risk-stratification + disposition for the adult undifferentiated GI bleed presentation, covering BOTH upper (hematemesis / coffee-ground / melena) and lower (hematochezia / occult anemia) sources. Downstream confirmed diagnoses route to: gi.ugib.core.v1 (UGI non-variceal), gi.variceal_bleed.v1 (variceal), gi.cirrhosis.core.v1 (cirrhotic decompensation), gi.lgib.core.v1 (LGI bleed), gi.peptic-ulcer.core.v1 (PUD), gi.acute-pancreatitis.core.v1 (hemorrhagic), gi.hepatic-encephalopathy.core.v1 (HE overlay), cardio.nstemi.core.v1 (demand ischemia), id.sepsis.core.v1 (sepsis overlap), symptom.abdominal_pain.ed.v1, symptom.jaundice.v1. Bayesian linkage (LR+, LR−, T_treat, T_test, pre-test priors by source + age, Glasgow-Blatchford / AIMS65 / Rockall / Oakland thresholds) lives in companion depth bundle _briefs/symptom.gi_bleed.ed.v1.depth.md — schema has no first-class likelihood-ratio field. 11 sibling-differentiation rows cover the key look-alikes (UGI / variceal / cirrhosis / LGI / PUD / pancreatitis / NSTEMI / sepsis / hepatic encephalopathy / abdominal pain symptom / jaundice symptom). 14 severity triggers (≥10 per spec): massive_bleed_hemodynamic_instability + upper_gi_bleed_hematemesis + variceal_bleed_cirrhosis + lower_gi_bleed_hematochezia + occult_iron_deficiency_anemia + nsaid_anticoag_induced_bleed + aorto_enteric_fistula + dieulafoy_lesion + mallory_weiss_boerhaave + colonic_diverticular_bleed + angiodysplasia_avm + demand_ischemia_type2_mi + sepsis_post_endoscopy + hepatic_encephalopathy_overlay. Schema-blocked emitted: Glasgow-Blatchford (GBS) / Rockall (clinical + complete) / AIMS65 / Forrest classification / Oakland (LGIB) / workup.gi_bleed — none in clinical-tools-registry; manual application in setting playbook required_assessments + ticketed in shard-3 state file. Regimen_axes intentionally empty — engine is triage-only. Supportive drug actions (LR/pRBC, IV PPI, octreotide, ceftriaxone, erythromycin pre-EGD, 4F-PCC / andexanet / idarucizumab for anticoag reversal, platelets, FFP, esmolol/labetalol for impulse control in suspected AEF) live in setting_playbooks.ed.drug_actions; definitive treatment is owned by downstream routed engines. Setting playbook: single `ed` per user spec — outpatient GI bleed workup is a future engine. SCAFFOLDED status: no workup.gi_bleed in clinical-tools-registry; PRODUCTION audit would fail. Will promote once registry entries land.

Entry points (10)

  • symptom
    Hematemesis (bright red OR coffee-ground emesis) — upper GI bleed proximal to ligament of Treitz (Laine Am J Gastro 2012 PMID 22825597; ACG 2023 PMID 36038243)
    hematemesis
  • symptom
    Melena (black tarry stool) — usually upper GI source (~90%); lower source if right-sided + slow transit (Laine 2012)
    melena
  • symptom
    Hematochezia (bright red blood per rectum) — lower GI source ~85%; massive UGI bleed ~15% (Strate ACG 2016 PMID 24042191)
    hematochezia
  • symptom
    Occult bleed — positive FOBT / iron-deficiency anemia without overt bleeding (Strate 2016)
    occult_gi_bleed
  • vital_abnormality
    SBP <90 OR HR >120 OR shock index >1 OR Hgb drop ≥2 g/dL with GI bleed — life-threat triage (massive UGI bleed, variceal bleed, aorto-enteric fistula, ruptured AAA)
    hemodynamic_instability_gi_bleed
  • lab_abnormality
    Acute Hgb drop ≥2 g/dL or BUN:Cr >30 (UGI bleed signature from absorbed blood protein) (Laine 2012)
    acute_drop_in_hgb
  • history
    Known cirrhosis / portal HTN / prior varices / EGD banding → variceal bleed phenotype (Garcia-Tsao AASLD 2017 PMID 21670378)
    known_cirrhosis_or_portal_htn
  • history
    Recent AAA repair or aortic graft + UGI bleed → aorto-enteric fistula STAT (Laine 2012)
    recent_aaa_repair_or_aortic_graft
  • history
    NSAID / DOAC / warfarin / antiplatelet use → drug-induced bleed; deprescribe + reversal (Laine 2012)
    nsaid_or_anticoag_use
  • history
    Repeated retching before hematemesis → Mallory-Weiss tear (usually self-limited) OR Boerhaave (transmural — surgical emergency)
    post_emetic_retching

Required inputs (34)

  • agerequired
    demographic • used at CONTEXT
    Age shifts priors: variceal/PUD peaks 50-70; diverticular/angiodysplasia >65; Meckel diverticulum pediatric (Laine 2012; Strate 2016)
  • sexrequired
    demographic • used at CONTEXT
    Male preponderance for cirrhosis / variceal bleed; female preponderance for angiodysplasia / aortic stenosis-associated GI bleed (Heyde syndrome) (Strate 2016)
  • bleed_characterrequired
    symptom • used at FRAME
    Hematemesis / coffee-ground / melena / hematochezia / occult — each anchors location and acuity (Laine 2012)
  • bleed_onset_timerequired
    symptom • used at FRAME
    Acute vs subacute vs chronic — drives resuscitation tempo and intervention urgency (Laine 2012)
  • bleed_volume_estimaterequired
    symptom • used at FRAME
    Estimated volume (tablespoons / cups / "filled the toilet") + frequency → resuscitation magnitude (Laine 2012)
  • associated_abdominal_painrequired
    symptom • used at ENTRY
    PUD / mesenteric ischemia / pancreatitis / aorto-enteric fistula / perforation — pain pattern differentiates (route to symptom.abdominal_pain.ed.v1 overlay)
  • associated_retching_vomitingrequired
    symptom • used at ENTRY
    Retching before hematemesis = Mallory-Weiss; persistent vomiting + chest pain + subcutaneous emphysema = Boerhaave
  • syncope_or_presyncoperequired
    symptom • used at ENTRY
    Syncope/presyncope with GI bleed implies significant volume loss → high pretest for massive bleed (Laine 2012)
  • jaundice_or_ascites
    symptom • used at ENTRY
    Jaundice + ascites → cirrhosis → variceal source until proven otherwise (Garcia-Tsao 2017 PMID 21670378)
  • change_in_bowel_habit
    symptom • used at ENTRY
    New-onset change + LGI bleed + weight loss + age >50 → colorectal CA screen (Strate 2016)
  • sbprequired
    vital • used at CONTEXT
    Hypotension flags massive bleed; orthostatics (SBP drop ≥20 mmHg) indicate >15% volume loss (Laine 2012)
  • hrrequired
    vital • used at CONTEXT
    Tachycardia early; HR >120 implies >30% volume loss; shock index (HR/SBP) >1 → severe (Laine 2012)
  • rrrequired
    vital • used at CONTEXT
    Tachypnea in compensated hemorrhagic shock or aspiration (Laine 2012)
  • spo2required
    vital • used at CONTEXT
    Hypoxia → aspiration of blood / pulmonary edema from over-resuscitation
  • temprequired
    vital • used at CONTEXT
    Fever in cirrhotic + GI bleed → SBP empiric ceftriaxone per AASLD (Garcia-Tsao 2017)
  • cirrhosis_or_portal_htnrequired
    history • used at CONTEXT
    Cirrhosis triples mortality in UGI bleed; mandates variceal pathway + ceftriaxone prophylaxis + octreotide (Garcia-Tsao 2017 PMID 21670378)
  • prior_ugi_bleedrequired
    history • used at CONTEXT
    Prior PUD / varices / Mallory-Weiss / Dieulafoy raise pretest for recurrence (Laine 2012)
  • nsaid_aspirin_userequired
    history • used at CONTEXT
    NSAID-induced PUD is leading non-H. pylori cause of UGI bleed; deprescribe + PPI prophylaxis (Laine 2012; FDA PPI long-term PMID 27069334)
  • anticoagulant_antiplatelet_userequired
    history • used at CONTEXT
    Warfarin / DOAC / DAPT raise bleed severity + complicate hemostasis; reversal pathway (4F-PCC for warfarin; andexanet/idarucizumab for DOAC; transfusion for antiplatelet)
  • prior_aaa_or_aortic_graftrequired
    history • used at CONTEXT
    Aorto-enteric fistula classically presents with herald bleed → massive bleed; STAT CTA aorta + vascular surgery (Laine 2012)
  • radiation_to_pelvis
    history • used at CONTEXT
    Pelvic radiation → radiation proctitis (chronic hematochezia) (Strate 2016)
  • cardiac_disease_demand_ischemiarequired
    history • used at CONTEXT
    Underlying CAD + acute anemia → demand ischemia (type 2 MI) — keep Hgb >7-8 g/dL; route to cardio.nstemi.core.v1 if hs-cTn rise
  • cbc_with_diffrequired
    lab • used at INITIAL_WORKUP
    Hgb / Hct may be initially normal in acute bleed (equilibrium ~24 h); platelet count <50 alters transfusion threshold; serial Hgb drives transfusion decisions
  • bmprequired
    lab • used at INITIAL_WORKUP
    BUN:Cr >30 (with normal renal function) is signature of UGI bleed from absorbed Hgb protein load (Laine 2012); AKI in poor perfusion
  • lftrequired
    lab • used at INITIAL_WORKUP
    AST/ALT/bili/alb/INR for cirrhosis recognition + Child-Pugh / MELD severity (Garcia-Tsao 2017)
  • coags_inr_pttrequired
    lab • used at INITIAL_WORKUP
    INR / PTT for coagulopathy; cirrhotic patients have rebalanced hemostasis (not always corrected with FFP); on anticoagulant patients need reversal pathway
  • type_and_crossrequired
    lab • used at INITIAL_WORKUP
    MANDATORY type & cross ≥2-4 units pRBC; ≥4-6 units if hemodynamically unstable; activate massive transfusion protocol if needed
  • lactaterequired
    lab • used at INITIAL_WORKUP
    Lactate >2 raises shock / mesenteric ischemia / sepsis prior; lactate clearance tracks resuscitation adequacy (SSC 2026)
  • troponin_hs
    lab • used at INITIAL_WORKUP
    Hs-cTn for demand ischemia (type 2 MI) — common in massive bleed + underlying CAD; route to cardio.nstemi.core.v1 if rise/fall pattern
  • ecg_12_leadrequired
    imaging • used at INITIAL_WORKUP
    ECG for demand ischemia screen + baseline rhythm; ST-changes prompt cardio.nstemi.core.v1 overlay
  • upright_cxr
    imaging • used at INITIAL_WORKUP
    Free air under diaphragm = perforated viscus (PUD perforation); mediastinal widening / pneumomediastinum = Boerhaave
  • cta_abdomen_for_aef
    imaging • used at BRANCHING_WORKUP
    CTA abdomen if aorto-enteric fistula suspected (prior AAA repair / aortic graft + UGI bleed) — STAT vascular surgery (Laine 2012)
  • cta_mesenteric_for_lgib
    imaging • used at BRANCHING_WORKUP
    CT angiography for active LGIB localization (>0.3 mL/min bleed rate) → IR embolization (Strate 2016 PMID 24042191)
  • rbc_scan_for_obscure_bleed
    imaging • used at BRANCHING_WORKUP
    Tc-99m RBC scintigraphy for slow / intermittent obscure GI bleed when EGD + colonoscopy negative (Strate 2016)

12-phase flow (12)

  1. 1FRAME
    Bleed character (hematemesis / melena / hematochezia / occult), onset, volume, hemodynamic state, anchor source (UGI vs LGI vs occult) (Laine 2012; Strate 2016)
    inputs: bleed_character, bleed_onset_time, bleed_volume_estimate, sbp
    advance: bleed characterized + hemodynamic risk classified
  2. 2ENTRY
    Associated abdominal pain, retching, syncope/presyncope, jaundice/ascites, bowel-habit change → narrow phenotype (Laine 2012)
    inputs: associated_abdominal_pain, associated_retching_vomiting, syncope_or_presyncope, jaundice_or_ascites, change_in_bowel_habit
    advance: entry presentation captured
  3. 3CONTEXT
    Age, sex, cirrhosis/portal HTN, prior GI bleed, NSAID/aspirin, anticoagulant/antiplatelet, prior AAA/aortic graft, pelvic RT, cardiac disease, vitals + temp (Laine 2012; Garcia-Tsao 2017)
    inputs: age, sex, sbp, hr, rr, spo2, temp, cirrhosis_or_portal_htn, prior_ugi_bleed, nsaid_aspirin_use, anticoagulant_antiplatelet_use, prior_aaa_or_aortic_graft, cardiac_disease_demand_ischemia
    advance: context complete
  4. 4RED_FLAGS
    Massive bleed with hemodynamic instability; aorto-enteric fistula (prior AAA repair + UGI bleed); ruptured esophagus (Boerhaave); cirrhotic variceal bleed; demand ischemia / type 2 MI; perforated PUD; mesenteric ischemia overlap (Laine 2012; Garcia-Tsao 2017)
    inputs: sbp, hr
    advance: no immediate life-threat OR resuscitation + downstream engine activation
  5. 5INITIAL_WORKUP
    CBC + diff, BMP (BUN:Cr ratio), LFT + albumin + INR, PTT, type & cross ≥2-4 units, lactate, hs-cTn (selective), ECG, upright CXR if perforation suspected (Laine 2012; ACG 2023 PMID 36038243)
    inputs: cbc_with_diff, bmp, lft, coags_inr_ptt, type_and_cross, lactate, troponin_hs, ecg_12_lead, upright_cxr
    actions: panel.cbc, panel.renal, panel.lft, panel.coag, panel.cardiac
    advance: initial workup reviewed + risk score assigned
  6. 6BRANCHING_WORKUP
    UGI bleed: pre-endoscopy IV PPI + octreotide if cirrhotic + ceftriaxone prophylaxis + EGD within 24 h (Laine 2012; ESGE 2017 PMID 27083250). LGI bleed: hemodynamically stable → colonoscopy within 24 h after prep; unstable + active → CTA + IR embolization (Strate 2016 PMID 24042191). Obscure: capsule endoscopy / push enteroscopy / RBC scan. Suspected aorto-enteric fistula → STAT CTA + vascular surgery.
    inputs: cta_abdomen_for_aef, cta_mesenteric_for_lgib, rbc_scan_for_obscure_bleed
    advance: definitive procedure pathway selected
  7. 7DIFFERENTIAL
    UGI phenotypes (Laine 2012): PUD ~30-50%, varices ~10-15%, Mallory-Weiss ~5-10%, esophagitis ~5%, gastritis ~5%, malignancy ~5%, Dieulafoy ~1-3%, aorto-enteric fistula <1% but lethal. LGI phenotypes (Strate 2016): diverticular ~30-40%, angiodysplasia ~5-15%, colitis (ischemic/infectious/IBD) ~10-20%, neoplasm ~10%, hemorrhoidal/anorectal ~10%, post-polypectomy ~5%, radiation proctitis ~3%. Occult: angiodysplasia / NSAID-PUD / malignancy.
    advance: phenotype ranked with pre-test priors
  8. 8RISK_STRATIFICATION
    UGI: Glasgow-Blatchford (GBS) ≤1 → low risk outpatient; ≥7 → high risk endoscopy + ICU; pre-endoscopy Rockall (age + shock + comorbidity); AIMS65 (alb<3, INR>1.5, AMS, SBP<90, age>65) — schema-blocked in clinical-tools-registry. LGIB: Oakland score (age, sex, prior LGIB, HR, SBP, Hgb, exam) for outpatient triage — schema-blocked. Forrest classification at endoscopy (Ia spurter → IIc pigmented spot → III clean base) drives endoscopic Rx + rebleed risk (Laine 2012). Cirrhotic: Child-Pugh / MELD overlay (Garcia-Tsao 2017).
    inputs: age, sbp, hr
    advance: risk scores documented
  9. 9TREATMENT
    Resuscitation (restrictive Hgb 7 g/dL trigger for stable; 8 g/dL for cardiac comorbidity per Villanueva NEJM 2013); two large-bore IVs; crystalloid then pRBC; massive transfusion protocol if SBP <90 despite 2 L; reverse anticoagulation (4F-PCC for warfarin INR >1.5, andexanet for apixaban/rivaroxaban, idarucizumab for dabigatran, platelets if <50 or on antiplatelet); IV PPI (omeprazole 80 mg bolus + 8 mg/hr OR pantoprazole 80 mg IV) for ALL suspected UGI bleed pending EGD (Laine 2012); octreotide 50 mcg IV bolus + 50 mcg/hr for suspected variceal source (Garcia-Tsao 2017); ceftriaxone 1 g IV daily x 7 days for cirrhotic UGI bleed (SBP prophylaxis); erythromycin 250 mg IV 30-90 min pre-EGD for gastric blood clearance.
    inputs: sbp, cbc_with_diff
    advance: resuscitation initiated; endoscopic / IR / surgical pathway selected
  10. 10DISPOSITION
    GBS 0-1 → outpatient EGD if reliable follow-up; GBS ≥7 OR Rockall ≥3 → admit + EGD within 24 h; hemodynamically unstable / massive bleed / variceal bleed / suspected aorto-enteric fistula → ICU + emergent intervention; LGIB unstable + active → CTA + IR; LGIB stable → colonoscopy within 24 h; obscure bleed → admit for capsule / push enteroscopy; cirrhotic variceal → ICU + EGD banding + octreotide + ceftriaxone → route to gi.variceal_bleed.v1.
    advance: disposition assigned + downstream handoff complete
  11. 11MONITORING
    Serial vitals q15 min × 1 h then q30 min × 4 h; serial Hgb q4-6h × 24 h then q12-24h; lactate clearance; urine output ≥0.5 mL/kg/h; mental status; serial abdominal exams (perforation watch); telemetry if cardiac comorbidity
    inputs: cbc_with_diff, lactate, sbp
    advance: stability achieved or escalation triggered
  12. 12FOLLOWUP
    Discharged low-risk UGI bleed: PPI 8 wks + H. pylori test-and-treat + outpatient EGD ≤2 wks + return precautions; cirrhotic post-bleed: 2° prophylaxis (NSBB + endoscopic surveillance per AASLD); discharge bundle (NSAID deprescribe, alcohol cessation counseling); LGIB diverticular: low-residue diet + outpatient colonoscopy 4-8 wks; H. pylori-positive PUD → triple/quadruple therapy
    advance: discharge bundle prescribed + follow-up scheduled