Massive (Life-Threatening) Hemoptysis (acute airway emergency)
NEW acute airway-emergency engine; mirrors the pulm.pe.core.v1 / pulm.pneumothorax.core.v1 acute time-critical shape (resuscitation-first, ICU-mandatory, no outpatient). Supplies the previously-missing escalation DESTINATION for pulm.bronchiectasis.core.v1, pulm.tuberculosis.v1, pulm.abpa.v1 (and pulm.pe.core.v1, onc.lung-cancer.core.v1) whose "massive hemoptysis" red-flag dead-ended. §5.5.1 effect sizes wired with PMIDs (≥8): conservative-management mortality up to 50-80% vs <20% with intervention (34527355); BAE/TAE immediate control ~85-90% / immediate success 91.2% / no-recurrence 68% (18210312); BAE rebleed 27.1% (17052307) and 30.2% with mycobacterial+CPA, cumulative control 79.1/73.8/63.3% at 1/2/3y (26718145); nebulized-TXA RCT resolution 96% vs 50% by day 5 (p<.0005), invasive procedures 0% vs 18.2% (30321510); nebulized-vs-IV TXA BAE 13 vs 21 (p=.024) (36410494); TXA meta bleeding volume MD −56.21 mL, further-intervention Peto OR 0.24, LOS −1.62 d (32661913); Cochrane bleeding-duration WMD −19.47 h (27806184); bronchial-artery source ~90% vs pulmonary-artery ~5% (12816036); emergency-vs-elective surgical mortality ~20-40% vs ~5-18% (34527355/17052307); PEXIVAS plasma-exchange non-benefit + reduced-dose-steroid non-inferiority (32053298); RAVE rituximab non-inferior to cyclophosphamide (20647199). §5.5.2 Bayesian/differential encoded as DATA across severity_triggers + phase purpose/advance_when + sibling_differentiation + the .depth.md source-localization LR table: Pivot 1 hemoptysis-vs-hematemesis-vs-pseudohemoptysis (FRAME gate); Pivot 2 massive-vs-non-massive physiologic trigger (RED_FLAGS, physiology>volume); Pivot 3 source localization bronchial ~90% (BAE) vs pulmonary artery ~5% (Rasmussen/AVM/iatrogenic — PA-targeted) vs nonbronchial collaterals. Conditional dependency explicitly modeled (do-not-multiply): localization-test yield (CTA + bronchoscopy) is CONDITIONAL on ACTIVE bleeding — encoded in INITIAL_WORKUP phase logic + severity_trigger negative_localization_in_quiescent_interval. Cross-dossier routing via workups[].branches_to + sibling_differentiation[].sibling_engine_id using engine_ids CONFIRMED on disk: pulm.bronchiectasis.core.v1, pulm.tuberculosis.v1, pulm.abpa.v1, pulm.pe.core.v1, onc.lung-cancer.core.v1, id.sepsis.core.v1 (5 sibling blocks + multi-engine branch lists). This engine routes BACK to the chronic engines for definitive underlying-disease management once the airway is secured. Special-population branches (≥4): anticoagulated/coagulopathic (4F-PCC+vitK / idarucizumab-andexanet / protamine + TXA), DAH/vasculitis (pulse methylprednisolone + cyclophosphamide/rituximab ± plasma exchange — PEXIVAS/RAVE; NOT a BAE target), CF/bronchiectasis (BAE + airway-clearance route), post-TB/mycetoma (anti-TB/antifungal + BAE, aspergilloma rebleed driver), malignancy (BAE + palliative RT), iatrogenic Swan-Ganz/PA rupture (balloon tamponade + PA-targeted embolization). Contraindications encoded as data in contraindication_rules. RxCUIs RxNav-validated [IN] 2026-05-16 (https://rxnav.nlm.nih.gov/REST/rxcui/{cui}/properties.json): tranexamic acid 10691, methylprednisolone 6902, cyclophosphamide 3002, rituximab 121191, prednisone 8640, norepinephrine 7512, vitamin K1 8308, epinephrine 3992. Blood products / 4F-PCC / idarucizumab / andexanet / procedures (BAE, surgery, plasma exchange, bronchoscopic tamponade) have no single small-molecule MIN → non_pharm:true, no hand-authored CUI. Registry IDs reused — only ids that RESOLVE in clinical-tools-registry.ts: workups workup.tb / workup.bronchiectasis_exac / workup.dic / workup.pe_full / workup.transfusion_reaction; calculators calc.aa_gradient / calc.news2 / calc.sofa / calc.map / calc.has_bled. NOTE: the design brief stated "workup.hemoptysis exists, reuse it" — it does NOT exist in clinical-tools-registry.ts (verified by grep 2026-05-16); a dedicated hemoptysis workup/cascade is a REGISTRY GAP. No invented/unresolved ids were used; registry/_registry.ts untouched per scope. SCHEMA-GAP NOTES: (1) _types.ts has no first-class Bayesian LR / source-localization / decision-threshold field — the bronchial-vs-pulmonary-artery LR table + cause-discrimination test characteristics live in pulm.massive-hemoptysis.v1.depth.md and are encoded narratively here via severity_triggers + phase purpose/advance_when + sibling_differentiation + regimen rationale; (2) no conditional-dependency graph type — the active-bleeding|localization-yield dependency is modeled in INITIAL_WORKUP phase logic + the negative_localization_in_quiescent_interval trigger; (3) RequiredCalculator.drives enum lacks a "diagnostic_gate"/"resuscitation" value — reused severity_classification/risk_stratification/monitoring_threshold; (4) no airway-isolation/positioning action type — encoded as non_pharm regimen drugs + non_drug_actions + severity_trigger fires; (5) DossierSetting has no "acute" — used settings:["acute","inpatient"] at the EngineDossier level (its own union) and setting_playbooks setting:"ed"/"icu"/"inpatient"; (6) manifest pointer reuses prisma/seed/manifests/id.sepsis.core.v1.ts as a placeholder (no dedicated massive-hemoptysis manifest — out of scope; flagged for future authoring). NEXT STEPS (out of scope this pass — no registry/seed/manifest/sibling-dossier/git changes): (a) author a dedicated prisma/seed/manifests/pulm.massive-hemoptysis.v1.ts manifest + a workup.massive_hemoptysis / cascade in clinical-tools-registry.ts (current registry gap); (b) add an engine-specific test under tests/; (c) DailyMed dose confirmation for nebulized TXA (off-label route); (d) OpenFDA TXA/cyclophosphamide/rituximab labels; (e) LOINC/ICD-10 terminology validation; (f) wire the chronic engines’ red-flag escalation to point at pulm.massive-hemoptysis.v1 (sibling-dossier edits — separate dispatch). Status PLANNED until manifest + ≥1 registry-resolved workup + test land.
Entry points (5)
- symptomExpectoration of blood / blood-streaked sputum — quantify volume + rate (Earwood AFP 2015 PMID 25955625)expectorated_blood
- vital_abnormalityHemoptysis WITH hypoxia / respiratory distress / hypotension — physiologic-massive trigger (Charya 2021 PMID 34527355)hypoxia_or_hemodynamic_compromise
- problem_listRed-flag escalation from pulm.bronchiectasis.core.v1 / pulm.tuberculosis.v1 / pulm.abpa.v1 when bleeding becomes life-threateningred_flag_from_chronic_engine
- historyRecent Swan-Ganz/PA catheter, transbronchial biopsy, or lung procedure — iatrogenic PA rupture risk (Charya 2021 PMID 34527355)recent_pa_catheter_or_lung_procedure
- imagingKnown TB cavity / mycetoma / lung mass / AVM with new bleeding (Mal 2003 PMID 12816036)cavity_or_mass_on_imaging
Required inputs (17)
- hemoptysis_volume_raterequiredsymptom • used at ENTRYMassive defined by physiology — gas-exchange/hemodynamic compromise, or surrogate ≥150 mL single expectoration / ≥100 mL/h / >100-600 mL/24h (Earwood AFP 2015 PMID 25955625; Charya 2021 PMID 34527355)
- blood_source_featuresrequiredsymptom • used at FRAMEHemoptysis (frothy, bright red, alkaline, cough, respiratory history) vs hematemesis (acidic, dark/coffee-ground, food, GI history) vs pseudohemoptysis (nasopharyngeal/oral source) — the entry-classification gate (Earwood AFP 2015 PMID 25955625)
- spo2requiredvital • used at CONTEXTHypoxia from alveolar flooding = the lethal physiology; defines massive (Charya 2021 PMID 34527355)
- rrrequiredvital • used at CONTEXTRespiratory distress / work of breathing — airway-compromise severity
- sbprequiredvital • used at CONTEXTHypotension → hemodynamic-massive trigger + resuscitation target
- hrrequiredvital • used at CONTEXTTachycardia — shock surrogate during ongoing airway bleeding
- underlying_lung_diseaserequiredhistory • used at CONTEXTCause discrimination — bronchiectasis/CF, post-TB, mycetoma/aspergilloma, malignancy (Mal 2003 PMID 12816036; Allwood Respiration 2021 PMID 33401266)
- anticoagulant_or_antiplateletrequiredmedication • used at CONTEXTAnticoagulation/antiplatelet amplifies any source and is reversible — first modifiable factor (Charya 2021 PMID 34527355)
- coagulation_panelrequiredlab • used at CONTEXTINR/aPTT/fibrinogen/platelets — reversible coagulopathy is a treatable amplifier (Charya 2021 PMID 34527355)
- hemoglobinrequiredlab • used at CONTEXTTransfusion threshold + trend; volume status (Charya 2021 PMID 34527355)
- type_and_crossmatchrequiredlab • used at CONTEXTType & cross for transfusion / peri-procedural support
- vasculitis_or_pulmonary_renalhistory • used at CONTEXTDAH from ANCA vasculitis / anti-GBM — pulse steroids + immunosuppression, NOT BAE (PEXIVAS PMID 32053298; RAVE PMID 20647199; Flores-Suárez PMID 28752492)
- cxrimaging • used at INITIAL_WORKUPRapid bedside lateralization clue (side of infiltrate/mass) — low sensitivity, never the localization endpoint (Earwood AFP 2015 PMID 25955625)
- ct_angiography_chestimaging • used at INITIAL_WORKUPMultidetector CT-angiography localizes side + bleeding vessel (bronchial vs pulmonary artery, Rasmussen, AVM) and maps it for BAE; yield is CONDITIONAL on active bleeding (Charya 2021 PMID 34527355)
- bronchoscopyimaging • used at BRANCHING_WORKUPLateralizes the bleeding lung and enables tamponade; rigid bronchoscopy preferred for true massive (airway control + suction) (Charya 2021 PMID 34527355)
- afb_xpertlab • used at BRANCHING_WORKUPAFB smear / Xpert MTB-RIF when TB / post-TB / mycetoma plausible (Allwood Respiration 2021 PMID 33401266)
- anca_anti_gbmlab • used at BRANCHING_WORKUPANCA / anti-GBM when pulmonary-renal or DAH pattern — diagnostic for vasculitic source (Flores-Suárez PMID 28752492)
12-phase flow (12)
- 1FRAMEAcute AIRWAY EMERGENCY, adult. Confirm TRUE hemoptysis vs hematemesis vs pseudohemoptysis — the entry-classification gate; misclassification routes to the wrong engine (GI bleed / ENT). The killer is asphyxiation, not exsanguination (Earwood AFP 2015 PMID 25955625)inputs: blood_source_featuresadvance: True hemoptysis confirmed (not hematemesis/pseudohemoptysis)
- 2ENTRYExpectorated blood ± dyspnea/hypoxia, OR red-flag escalation from pulm.bronchiectasis.core.v1 / pulm.tuberculosis.v1 / pulm.abpa.v1 / PE / lung cancer / vasculitis (Earwood AFP 2015 PMID 25955625)inputs: hemoptysis_volume_rateadvance: Volume + rate captured and engine entered
- 3CONTEXTAnticoagulation/antiplatelet, known bronchiectasis/CF/TB/aspergilloma/malignancy/vasculitis, mitral stenosis, recent Swan-Ganz/lung procedure (iatrogenic PA), airway + gas-exchange status, coagulation panel, Hgb, type & cross (Charya 2021 PMID 34527355)inputs: spo2, rr, sbp, hr, underlying_lung_disease, anticoagulant_or_antiplatelet, coagulation_panel, hemoglobin, type_and_crossmatch, vasculitis_or_pulmonary_renalactions: calc.news2advance: Substrate + modifiable amplifiers (anticoagulation/coagulopathy) identified
- 4RED_FLAGSMASSIVE-vs-NON-MASSIVE TRIAGE (physiology > volume): gas-exchange or hemodynamic compromise = life_threatening → ABCs NOW — bleeding-side-DOWN lateral decubitus, high-flow O2, large-bore suction, selective intubation / lung isolation (large single-lumen ETT advanced to good lung, bronchial blocker, or DLT), prepare massive-transfusion + reverse anticoagulation/coagulopathy. Tension-physiology-equivalent: do not delay airway control for imaging (Charya 2021 PMID 34527355)inputs: spo2, sbpactions: calc.aa_gradientadvance: Airway protected + bleeding lung isolated/positioned, or non-massive confirmed
- 5INITIAL_WORKUPCXR for rapid lateralization clue (low sensitivity); multidetector CT-ANGIOGRAPHY to localize side + source (bronchial ~90% vs pulmonary artery ~5% — Rasmussen aneurysm / AVM / iatrogenic PA rupture) and MAP for BAE; coags / Hgb / type & cross; AFB-Xpert if TB risk; ANCA / anti-GBM if pulmonary-renal. CONDITIONAL DEPENDENCY: CTA + bronchoscopy yield is far higher during ACTIVE bleeding — a negative study in a quiescent interval does NOT exclude a bronchial source (Charya 2021 PMID 34527355; Mal 2003 PMID 12816036)inputs: cxr, ct_angiography_chest, coagulation_panel, afb_xpert, anca_anti_gbmactions: workup.tb, workup.dicadvance: Side localized and bleeding bed (bronchial vs pulmonary vs collateral vs diffuse/DAH) identified, or active-bleeding window noted for repeat
- 6BRANCHING_WORKUPBRONCHOSCOPY (rigid preferred for massive — airway control + large-bore suction + tamponade) to lateralize and temporize. Cause cascade — bronchiectasis/CF (pulm.bronchiectasis.core.v1), TB/post-TB + Rasmussen (pulm.tuberculosis.v1), mycetoma/aspergilloma (pulm.abpa.v1), malignancy (onc.lung-cancer.core.v1), DAH/vasculitis, AVM/HHT, iatrogenic PA rupture, sepsis-associated coagulopathy (id.sepsis.core.v1) (Charya 2021 PMID 34527355; Allwood Respiration 2021 PMID 33401266)inputs: bronchoscopy, afb_xpert, anca_anti_gbmactions: workup.bronchiectasis_exac, workup.tb, workup.pe_full, workup.transfusion_reactionadvance: Cause assigned + lateralization confirmed bronchoscopically
- 7DIFFERENTIALHemoptysis vs hematemesis vs pseudohemoptysis; MASSIVE vs non-massive; BRONCHIAL ARTERY (~90%, systemic pressure, BAE-amenable) vs PULMONARY ARTERY (~5% — Rasmussen in TB cavity, AVM in HHT, iatrogenic Swan-Ganz: PA-targeted coil/balloon NOT bronchial BAE) vs nonbronchial systemic collaterals; cause discrimination (bronchiectasis/CF, TB/post-TB, mycetoma, malignancy, DAH/vasculitis, AVM, mitral stenosis, iatrogenic) — full LR table in .depth.md (Mal 2003 PMID 12816036; Earwood AFP 2015 PMID 25955625)advance: Source bed + cause assigned (or DAH/diffuse pattern recognized)
- 8RISK_STRATIFICATIONVolume/rate + gas-exchange + hemodynamics + comorbidity + source bed = death risk. Conservative (non-intervention) management mortality up to 50-80% in true massive vs <20% with definitive intervention; pulmonary-artery source and DAH carry independent excess mortality (Charya 2021 PMID 34527355; Flores-Suárez PMID 28752492)inputs: spo2, sbp, hemoglobinactions: calc.sofa, calc.mapadvance: Death-risk tier + intervention urgency assigned
- 9TREATMENTAirway-first resuscitation + bleeding-side-down + lung isolation → reverse anticoagulation/coagulopathy → tranexamic acid (IV 1 g + nebulized 500 mg-1 g) → BAE (definitive first-line, immediate control ~85-90%) → bronchoscopic tamponade (balloon/blocker, iced saline/epinephrine lavage, topical hemostatics) → surgery (last resort) → cause-specific (DAH → pulse methylprednisolone + cyclophosphamide/rituximab ± plasma exchange; mycetoma → antifungal + BAE; malignancy → BAE/palliative RT; iatrogenic PA rupture → balloon tamponade + PA-targeted embolization) (Charya 2021 PMID 34527355; Wand CHEST 2018 PMID 30321510; Kim PMID 17052307; RAVE PMID 20647199; PEXIVAS PMID 32053298)inputs: anticoagulant_or_antiplatelet, coagulation_panel, vasculitis_or_pulmonary_renaladvance: Airway secured + definitive control pathway (BAE / surgery / immunosuppression) executed or activated
- 10DISPOSITIONICU mandatory for massive; activate interventional radiology (BAE) + thoracic surgery + interventional pulmonology simultaneously (MDT). Surgery (emergency lobectomy/pneumonectomy) if BAE fails / is contraindicated / unavailable, or for non-embolizable focal lesion (e.g., resectable aspergilloma after stabilization) (Charya 2021 PMID 34527355; Kim PMID 17052307)advance: ICU bed + MDT (IR / surgery / IP) engaged and disposition set
- 11MONITORINGRebleed surveillance (BAE rebleed ~10-30%, higher with aspergilloma / complicated pneumoconiosis / chronic pulmonary aspergillosis), airway/gas-exchange, serial Hgb + coags, repeat CTA/bronchoscopy if rebleed, treat underlying disease; DAH → titrate immunosuppression + monitor for respiratory failure (Kim PMID 17052307; Okuda PMID 26718145; Lee PMID 18210312; PEXIVAS PMID 32053298)advance: Bleeding controlled ≥24-48 h + rebleed plan (repeat-BAE vs surgery) documented
- 12FOLLOWUPRoute BACK to the underlying-disease engine for definitive management once airway secured — bronchiectasis airway clearance (pulm.bronchiectasis.core.v1), TB therapy (pulm.tuberculosis.v1), ABPA/aspergilloma steroids+antifungal (pulm.abpa.v1), vasculitis maintenance immunosuppression, malignancy oncology (onc.lung-cancer.core.v1); recurrence-prevention + repeat-BAE/surgery planning (Allwood Respiration 2021 PMID 33401266)advance: Underlying-disease engine engaged + recurrence-prevention plan documented