Acute cough (ED triage — undifferentiated adult)
Phase C shard-3-neuro-sym wave-10 expansion (2026-05-15) — pattern-matches symptom.weakness.ed.v1 (c1c2bc96 wave-9), symptom.chest_pain.ed_undifferentiated.v1 (be7b7d2f), symptom.altered_mental_status.ed.v1 (2ce6d299 wave-8). Engine scope: ED triage + risk-stratification + disposition for adult acute cough, covering CAP / asthma / COPD / acute HF / PE-with-cough / aspiration / TB / pertussis / FB aspiration / hemoptysis / COVID / influenza / chronic-cough lung cancer screen. Downstream confirmed diagnoses route to: pulm.cap.core.v1, pulm.asthma.core.v1, pulm.copd.core.v1, cardio.acute-hf.core.v1, pulm.pe.core.v1, pulm.aspiration-pneumonia.core.v1, pulm.tuberculosis.v1, symptom.hemoptysis.v1, id.covid19.core.v1, id.influenza.core.v1. Bayesian linkage (LR+, LR−, T_treat, T_test, pre-test priors by age, CURB-65 + Wells + NEWS2 thresholds) lives in companion depth bundle _briefs/symptom.cough.ed.v1.depth.md — schema has no first-class likelihood-ratio field. 12 sibling-differentiation rows cover key look-alikes (CAP / asthma / COPD / acute HF / PE / aspiration / TB / COVID / influenza / hemoptysis / dyspnea overlay / chest-pain overlay). 12 severity triggers (≥10 per spec): hypoxic_respiratory_failure + severe_cap + severe_asthma + severe_copd + cardiogenic_cough_hf + pe_with_cough + aspiration_pneumonia + active_tb + massive_hemoptysis + fb_aspiration + covid_or_influenza_severe + chronic_cough_red_flag_features. Calculators wired (3): calc.wells_pe + calc.perc (PE-with-cough phenotype) + calc.heart (chest pain + cough overlay). CURB-65 + PSI + SMART-COP + Anthonisen / PEF severity / NEWS2 — schema-blocked; ticketed in shard-3 state file. Panels wired: panel.cbc + panel.renal + panel.inflammation + panel.cardiac + panel.coag. Schema-blocked: workup.cough / workup.respiratory_exam / calc.curb65 / calc.psi / calc.smartcop / calc.news2 — NOT 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 (O2, albuterol/ipratropium, methylprednisolone, ceftriaxone/azithro, amox-clav/doxy, pip-tazo/vanc, IV furosemide, nitroglycerin, oseltamivir, azithromycin pertussis, RIPE, tranexamic acid) live in setting_playbooks.ed.drug_actions; definitive treatment is owned by downstream routed engines. Setting playbook: single `ed` per user spec — outpatient chronic cough algorithm (UACS/asthma/GERD/ACE-i) is a future engine. SCAFFOLDED status: no workup.cough in clinical-tools-registry; PRODUCTION audit would fail. Will promote once registry entries land.
Entry points (14)
- symptomAcute cough <3 weeks — usually viral URI / acute bronchitis / pneumonia / asthma / COPD exacerbation (Irwin CHEST 2006 PMID 16428686; CHEST 2018 PMID 29080708)acute_cough_under_3_weeks
- symptomCough + fever + dyspnea + purulent sputum + crackles — community-acquired pneumonia → route pulm.cap.core.v1 (ATS PMID 31573350)cough_with_fever_dyspnea_sputum
- symptomCough + wheeze + chest tightness + diurnal variability — asthma exacerbation → route pulm.asthma.core.v1 (GINA 2025)cough_with_wheeze_chest_tightness
- symptomCough + dyspnea + smoker + sputum production — COPD exacerbation → route pulm.copd.core.v1 (GOLD 2026)cough_with_chronic_smoker_dyspnea
- symptomParoxysmal cough + whoop + post-tussive emesis (adult or peds) — pertussis (CDC; macrolide treatment + droplet precautions)paroxysmal_cough_with_post_tussive_emesis
- symptomCough + orthopnea + PND + bilateral leg edema + JVD — acute decompensated HF "cardiac cough" → route cardio.acute-hf.core.v1 (AHA/ACC/HFSA 2022)cough_with_orthopnea_pnd_edema
- symptomCough + pleuritic pain + dyspnea + DVT signs OR risk factors — PE-with-cough phenotype → route pulm.pe.core.v1 (Wells/PERC; YEARS algorithm)cough_with_pleuritic_pain_unilateral_leg_swell
- symptomCough + witnessed aspiration / dysphagia / RLL infiltrate / poor dentition / altered LOC — aspiration pneumonia → route pulm.aspiration-pneumonia.core.v1cough_post_aspiration_witnessed
- symptomSubacute/chronic cough (>3 weeks) + weight loss + night sweats + hemoptysis — active TB OR lung cancer concern → route pulm.tuberculosis.v1 OR oncology referral (USPSTF LDCT 2021 PMID 33687470)cough_chronic_subacute_weight_loss_hemoptysis
- symptomSudden-onset cough + choking + unilateral breath-sound asymmetry — foreign-body aspiration (adult or peds) → STAT bronchoscopycough_with_choking_sudden_onset
- symptomCough + frank hemoptysis OR blood-streaked sputum — route symptom.hemoptysis.v1 overlay (anchor PMID; cancer / TB / bronchiectasis / PE / vasculitis)cough_with_hemoptysis
- symptomCough + fever + recent travel / outbreak / sick contact — COVID-19 OR influenza → route id.covid19.core.v1 OR id.influenza.core.v1cough_with_recent_covid_or_influenza_exposure
- lab_abnormalitySpO2 <92% on room air with cough — significant respiratory compromise; rule out pneumonia / asthma / COPD / PE / HF (NEWS2 ≥5 triggers escalation)spo2_under_92
- historyImmunocompromised host (transplant, HIV, chemo, biologics) + cough — broaden DDx (PCP, fungal, CMV, atypical TB) → route id.candidemia.core.v1 or pulm.cap.core.v1 with empiric broad coverageimmunocompromised_with_cough
Required inputs (43)
- agerequireddemographic • used at CONTEXTAge shifts priors: pneumonia mortality doubles each decade after 65; lung cancer screening 50-80 with 20 pack-year history (USPSTF 2021 PMID 33687470)
- sexrequireddemographic • used at CONTEXTSex-based smoking patterns + pertussis epidemiology + asthma phenotypes (female-predominant adult onset)
- cough_durationrequiredsymptom • used at FRAMEAcute <3 wk vs subacute 3-8 wk vs chronic >8 wk (Irwin CHEST 2006 PMID 16428686) — anchors DDx; >8 wk shifts toward asthma/UACS/GERD/CB/cancer/TB
- cough_quality_sputumrequiredsymptom • used at FRAMEProductive vs dry; purulent sputum → bacterial pneumonia; pink frothy → pulmonary edema; rust-colored → pneumococcal; currant-jelly → Klebsiella; foul-smelling → anaerobic/aspiration
- associated_fever_chillsrequiredsymptom • used at ENTRYFever + chills + rigors → pneumonia / influenza / TB / abscess; afebrile → asthma / COPD / HF / GERD / cancer
- associated_dyspnearequiredsymptom • used at ENTRYDyspnea + cough → pneumonia / asthma / COPD / HF / PE; resting dyspnea raises severity; PNDis pathognomonic for HF
- associated_chest_pain_pleuriticrequiredsymptom • used at ENTRYPleuritic chest pain + cough → PE / pneumonia / pleurisy / pericarditis; sharp non-pleuritic + cough → MSK / costochondritis
- associated_hemoptysisrequiredsymptom • used at ENTRYFrank hemoptysis → route symptom.hemoptysis.v1; blood-streak common in URI/bronchitis; massive hemoptysis (>200 mL/24 h) is emergent — protect non-bleeding lung
- associated_wheeze_chest_tightnessrequiredsymptom • used at ENTRYWheeze + tightness + diurnal variability → asthma; expiratory wheeze + smoker → COPD; biphasic stridor → upper airway
- associated_orthopnea_pnd_edemarequiredsymptom • used at ENTRYOrthopnea + PND + bilateral leg edema + JVD → cardiogenic cough (acute HF)
- associated_weight_loss_night_sweatsrequiredsymptom • used at ENTRYWeight loss + night sweats + subacute cough → TB / lymphoma / lung cancer (USPSTF LDCT 2021 PMID 33687470)
- aspiration_eventsymptom • used at ENTRYWitnessed aspiration / dysphagia / impaired LOC / poor dentition → aspiration pneumonia / pneumonitis (route pulm.aspiration-pneumonia.core.v1)
- foreign_body_aspiration_historysymptom • used at ENTRYSudden cough/choking during eating (peanut, dental hardware, button battery) → FB aspiration → STAT bronchoscopy
- paroxysmal_cough_with_whoopsymptom • used at ENTRYParoxysmal cough + whoop + post-tussive emesis (adult) → pertussis; transmissible; macrolide + droplet precautions
- sbprequiredvital • used at CONTEXTHypotension + cough → septic / cardiogenic / obstructive shock (PE, tamponade); ARDS phase; hypertensive emergency-flash pulmonary edema overlay
- hrrequiredvital • used at CONTEXTTachycardia + cough → infection / PE / HF / dehydration; relative bradycardia in atypical pneumonia (Legionella, typhoid)
- rrrequiredvital • used at CONTEXTTachypnea + cough → pneumonia / asthma / COPD / HF / PE / DKA; RR ≥30 → severity escalation
- spo2requiredvital • used at CONTEXTSpO2 <92% on RA → significant respiratory compromise; <90% → escalate; PE often has normal SpO2 early
- temprequiredvital • used at CONTEXTFever + cough → infectious DDx (bacterial pneumonia, TB, influenza, COVID-19); afebrile + cough → cardiogenic / asthma / GERD / cancer
- smoking_pack_yearsrequiredhistory • used at CONTEXTPack-year history drives COPD / lung cancer prior; ≥20 PYH + age 50-80 triggers LDCT screening (USPSTF 2021 PMID 33687470)
- asthma_copd_diagnosisrequiredhistory • used at CONTEXTKnown asthma → exacerbation workup (PEF, GINA Track); known COPD → exacerbation workup (GOLD 2026 ABE)
- recent_tb_exposure_travelrequiredhistory • used at CONTEXTRecent TB endemic travel / homeless / incarcerated / HIV → active TB workup + airborne isolation (sputum AFB × 3, NAAT, chest CT)
- recent_covid_influenza_exposurerequiredhistory • used at CONTEXTOutbreak / household contact / unvaccinated → COVID-19 / influenza route + droplet precautions + PCR / antigen
- chf_or_known_hfrefrequiredhistory • used at CONTEXTKnown HF → "cardiac cough" + decompensation workup (BNP, CXR, echo); diuresis + GDMT review
- immunocompromised_staterequiredhistory • used at CONTEXTTransplant / HIV / chemo / biologics / chronic steroids → broaden DDx (PCP, fungal, CMV, atypical mycobacteria, nocardia, aspergillus); empiric broad coverage
- ace_inhibitor_userequiredhistory • used at CONTEXTACE-inhibitor dry cough (10-15%) — discontinue trial; ARB substitute; chronic cough cause
- gerd_uacs_historyhistory • used at CONTEXTGERD / UACS (post-nasal drip) → top causes of chronic cough in non-smoker non-asthma adults (Irwin CHEST 2006 PMID 16428686)
- pe_risk_factorsrequiredhistory • used at CONTEXTRecent surgery / immobility / malignancy / OCP / pregnancy / DVT → Wells/PERC for PE-with-cough phenotype
- cbc_with_diffrequiredlab • used at INITIAL_WORKUPLeukocytosis + left shift → bacterial pneumonia; lymphocytosis → viral / pertussis; eosinophilia → asthma / Loeffler / EGPA
- bmprequiredlab • used at INITIAL_WORKUPHyponatremia → SIADH (Legionella, lung cancer); AKI in severe pneumonia / septic shock; glucose for DKA-mimics
- lactate_venouslab • used at INITIAL_WORKUPLactate ≥4 → severe sepsis / shock; supports sepsis bundle activation (SSC 2026)
- crp_pctlab • used at INITIAL_WORKUPCRP + PCT (panel.inflammation) — PCT-guided antibiotic decisions; CRP >100 + PCT >0.25 supports bacterial pneumonia (ProACT, Schuetz)
- troponin_hslab • used at INITIAL_WORKUPTroponin in severe pneumonia (myocardial injury), HF cough, suspected PE, ACS overlay (panel.cardiac)
- bnp_ntprobnplab • used at INITIAL_WORKUPNT-proBNP age-adjusted (panel.cardiac) — supports cardiogenic cough phenotype (acute HF)
- d_dimer_age_adjustedlab • used at INITIAL_WORKUPAge-adjusted D-dimer (panel.coag, ADJUST-PE) — PE rule-out in low/intermediate Wells
- covid_pcr_or_antigenlab • used at INITIAL_WORKUPNasopharyngeal PCR or antigen for COVID-19; route id.covid19.core.v1 if positive
- influenza_pcrlab • used at INITIAL_WORKUPRapid influenza PCR / antigen — early oseltamivir if positive (<48 h symptoms)
- sputum_culture_gram_afblab • used at INITIAL_WORKUPSputum gram stain + culture + AFB × 3 if TB suspected; NAAT for TB (Xpert MTB/RIF)
- cxr_pa_lateralrequiredimaging • used at INITIAL_WORKUPCXR PA + lateral — first-line imaging for cough with abnormal vitals / fever / pleuritic pain / hypoxia; consolidation, effusion, cavitation, infiltrate, masses, edema (ATS PMID 31573350)
- ecg_12_leadimaging • used at INITIAL_WORKUPECG for HF cough (afib, LVH), PE (S1Q3T3, RBBB, T inversion V1-V4), ACS overlay
- lung_pocusimaging • used at INITIAL_WORKUPLung POCUS for B-lines (pulmonary edema), consolidation, effusion, pneumothorax (BLUE protocol)
- cta_chest_for_peimaging • used at BRANCHING_WORKUPCTA chest if PE suspected after positive D-dimer OR high Wells (>6); diagnostic gold standard
- chest_ct_for_mass_tbimaging • used at BRANCHING_WORKUPNon-contrast chest CT for chronic cough + weight loss / hemoptysis / smoker → TB / cancer / bronchiectasis / ILD
12-phase flow (12)
- 1FRAMECough duration (acute / subacute / chronic), quality (dry / productive / paroxysmal), sputum (color / volume / blood) — anchors initial DDx (Irwin CHEST 2006 PMID 16428686)inputs: cough_duration, cough_quality_sputumadvance: pattern characterized
- 2ENTRYAssociated fever, dyspnea, pleuritic pain, hemoptysis, wheeze/tightness, orthopnea/PND/edema, weight loss/night sweats, aspiration, FB choking, paroxysmal/whoopinputs: associated_fever_chills, associated_dyspnea, associated_chest_pain_pleuritic, associated_hemoptysis, associated_wheeze_chest_tightness, associated_orthopnea_pnd_edema, associated_weight_loss_night_sweatsadvance: phenotype-defining features captured
- 3CONTEXTAge, sex, vitals + temp, smoking pack-years, asthma/COPD diagnosis, TB exposure, COVID/influenza exposure, HF, immunocompromised state, ACE-inhibitor, GERD/UACS, PE risk factors (ATS PMID 31573350; GOLD 2026; GINA 2025; USPSTF PMID 33687470)inputs: age, sex, sbp, hr, rr, spo2, temp, smoking_pack_years, asthma_copd_diagnosis, recent_tb_exposure_travel, recent_covid_influenza_exposure, chf_or_known_hfref, immunocompromised_state, ace_inhibitor_use, pe_risk_factorsadvance: context complete
- 4RED_FLAGSHypoxia (SpO2 <92%), respiratory failure (RR ≥30 / tripoding / accessory muscles), shock (SBP <90), massive hemoptysis (>200 mL/24 h), PE high-suspicion, FB aspiration, immunocompromised severe infection, pertussis with apnea/pedsinputs: spo2, rr, sbp, associated_hemoptysis, foreign_body_aspiration_historyadvance: no immediate life-threat OR emergent intervention activated
- 5INITIAL_WORKUPCXR PA/lat, ECG (selective), CBC, BMP, lactate (if septic), CRP+PCT (selective), troponin/BNP (selective), D-dimer (selective for PE), COVID/flu PCR (selective), sputum culture/AFB (selective), lung POCUS (B-lines, consolidation, effusion)inputs: cxr_pa_lateral, cbc_with_diff, bmp, lactate_venous, crp_pct, covid_pcr_or_antigen, influenza_pcractions: panel.cbc, panel.renal, panel.inflammation, panel.cardiac, panel.coagadvance: initial workup reviewed + phenotype narrowed
- 6BRANCHING_WORKUPPneumonia: CURB-65 + ATS criteria, blood culture, sputum, urinary Legionella/pneumococcal antigen → pulm.cap.core.v1. Asthma exac: PEF + ABG → pulm.asthma.core.v1. COPD exac: ABG + AECOPD severity → pulm.copd.core.v1. HF cough: BNP + echo → cardio.acute-hf.core.v1. PE: Wells + age-adj D-dimer → CTA chest → pulm.pe.core.v1. Aspiration: RLL infiltrate → pulm.aspiration-pneumonia.core.v1. TB: sputum AFB × 3 + Xpert + airborne → pulm.tuberculosis.v1. Hemoptysis: route symptom.hemoptysis.v1. FB: STAT bronchoscopy. Pertussis: NAAT + macrolide + dropletinputs: cta_chest_for_pe, chest_ct_for_mass_tb, sputum_culture_gram_afbactions: calc.wells_pe, calc.percadvance: definitive pathway selected
- 7DIFFERENTIALAcute: viral URI/acute bronchitis (≥50%), CAP, asthma exac, COPD exac, influenza, COVID-19, PE-with-cough, acute HF, aspiration, pertussis, FB aspiration. Subacute: post-viral cough, pertussis tail, asthma-cough variant, UACS. Chronic >8 wk: UACS, asthma, GERD, ACE-i, chronic bronchitis, bronchiectasis, lung cancer, TB, ILD, eosinophilic bronchitis (Irwin CHEST 2006 PMID 16428686; CHEST 2018 PMID 29080708)advance: phenotype ranked with pre-test priors
- 8RISK_STRATIFICATIONPneumonia: CURB-65 (schema-blocked), PSI / SMART-COP; sepsis qSOFA + lactate. Asthma exac: severity (mild/moderate/severe/life-threatening; PEF, SpO2). COPD exac: severity (Anthonisen; ABE). PE: Wells (calc.wells_pe) + PERC (calc.perc) + age-adjusted D-dimer (panel.coag). HF cough: BNP threshold + clinical congestion scoreactions: calc.wells_pe, calc.percadvance: risk scores documented
- 9TREATMENTCAP: empiric antibiotics (amoxicillin/macrolide outpatient; ceftriaxone+azithro inpatient) per ATS 2019 PMID 31573350. Asthma exac: SABA + ipratropium + systemic steroids + O2 + Mg ± NIV. COPD exac: SABA/SAMA + steroids + antibiotics (Anthonisen) + NIV. HF cough: IV diuretic + nitrates + O2 ± NIV. PE: anticoagulation (LMWH/DOAC; thrombolysis if massive). Aspiration: airway protection + antibiotics if pneumonia. TB: airborne + 4-drug RIPE pending sensitivities. Influenza: oseltamivir <48 h. COVID-19: per id.covid19.core.v1. Pertussis: azithromycin + droplet × 5 d. FB: STAT bronchoscopy. Hemoptysis: protect non-bleeding lung + IR/IR consultationinputs: spo2, sbp, rradvance: definitive intervention initiated
- 10DISPOSITIONPneumonia: outpatient (CURB-65 0-1), ward (2), ICU (3-5 or SMART-COP / IDSA major). Asthma exac: discharge after sustained improvement vs ward vs ICU. COPD exac: ward vs respiratory care unit vs ICU (NIV failure). HF cough: telemetry / cardiology ward / CCU. PE: PESI low-risk outpatient vs ward vs ICU (massive PE). Aspiration: ward vs ICU. TB: airborne-isolated room. Hemoptysis: IR / thoracic surgery. FB: bronchoscopy suite. Pertussis: outpatient + droplet + close contacts treatedadvance: disposition assigned + downstream handoff complete
- 11MONITORINGPneumonia: vitals q4h, sputum, fever curve, follow CXR. Asthma: PEF + symptoms; ABG if severe. COPD: NIV tolerance, ABG. HF cough: diuresis, weight, BUN/Cr, K. PE: anticoagulation safety. TB: airborne until 3 neg AFB; LFT on RIPE. Pertussis: cough paroxysms; secondary bacterial superinfection. Cancer-concern: outpatient pulm/onc clinic + CT chestinputs: spo2, rr, sbp, tempadvance: stability achieved or escalation triggered
- 12FOLLOWUPPneumonia: CXR at 6-8 wk in >50 y or smoker (rule out cancer); pneumococcal/flu vaccines. Asthma: ICS + GINA Track 1; spirometry + plan. COPD: GOLD ABE; pulm rehab; smoking cessation. HF cough: GDMT optimization. TB: DOT + contact tracing + ID f/u. ACE-i cough: discontinue + ARB. Smoker + cough: USPSTF LDCT screen (PMID 33687470). Chronic cough algorithm (Irwin 2006 PMID 16428686): UACS/asthma/GERD empiric trialsadvance: discharge bundle prescribed + follow-up scheduled