Clinical Commander

All dossiers
symptom.cough.ed.v1

Acute cough (ED triage — undifferentiated adult)

symptomacuteundifferentiatedadultacute

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)

  • symptom
    Acute 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
  • symptom
    Cough + fever + dyspnea + purulent sputum + crackles — community-acquired pneumonia → route pulm.cap.core.v1 (ATS PMID 31573350)
    cough_with_fever_dyspnea_sputum
  • symptom
    Cough + wheeze + chest tightness + diurnal variability — asthma exacerbation → route pulm.asthma.core.v1 (GINA 2025)
    cough_with_wheeze_chest_tightness
  • symptom
    Cough + dyspnea + smoker + sputum production — COPD exacerbation → route pulm.copd.core.v1 (GOLD 2026)
    cough_with_chronic_smoker_dyspnea
  • symptom
    Paroxysmal cough + whoop + post-tussive emesis (adult or peds) — pertussis (CDC; macrolide treatment + droplet precautions)
    paroxysmal_cough_with_post_tussive_emesis
  • symptom
    Cough + 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
  • symptom
    Cough + 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
  • symptom
    Cough + witnessed aspiration / dysphagia / RLL infiltrate / poor dentition / altered LOC — aspiration pneumonia → route pulm.aspiration-pneumonia.core.v1
    cough_post_aspiration_witnessed
  • symptom
    Subacute/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
  • symptom
    Sudden-onset cough + choking + unilateral breath-sound asymmetry — foreign-body aspiration (adult or peds) → STAT bronchoscopy
    cough_with_choking_sudden_onset
  • symptom
    Cough + frank hemoptysis OR blood-streaked sputum — route symptom.hemoptysis.v1 overlay (anchor PMID; cancer / TB / bronchiectasis / PE / vasculitis)
    cough_with_hemoptysis
  • symptom
    Cough + fever + recent travel / outbreak / sick contact — COVID-19 OR influenza → route id.covid19.core.v1 OR id.influenza.core.v1
    cough_with_recent_covid_or_influenza_exposure
  • lab_abnormality
    SpO2 <92% on room air with cough — significant respiratory compromise; rule out pneumonia / asthma / COPD / PE / HF (NEWS2 ≥5 triggers escalation)
    spo2_under_92
  • history
    Immunocompromised 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 coverage
    immunocompromised_with_cough

Required inputs (43)

  • agerequired
    demographic • used at CONTEXT
    Age shifts priors: pneumonia mortality doubles each decade after 65; lung cancer screening 50-80 with 20 pack-year history (USPSTF 2021 PMID 33687470)
  • sexrequired
    demographic • used at CONTEXT
    Sex-based smoking patterns + pertussis epidemiology + asthma phenotypes (female-predominant adult onset)
  • cough_durationrequired
    symptom • used at FRAME
    Acute <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_sputumrequired
    symptom • used at FRAME
    Productive vs dry; purulent sputum → bacterial pneumonia; pink frothy → pulmonary edema; rust-colored → pneumococcal; currant-jelly → Klebsiella; foul-smelling → anaerobic/aspiration
  • associated_fever_chillsrequired
    symptom • used at ENTRY
    Fever + chills + rigors → pneumonia / influenza / TB / abscess; afebrile → asthma / COPD / HF / GERD / cancer
  • associated_dyspnearequired
    symptom • used at ENTRY
    Dyspnea + cough → pneumonia / asthma / COPD / HF / PE; resting dyspnea raises severity; PNDis pathognomonic for HF
  • associated_chest_pain_pleuriticrequired
    symptom • used at ENTRY
    Pleuritic chest pain + cough → PE / pneumonia / pleurisy / pericarditis; sharp non-pleuritic + cough → MSK / costochondritis
  • associated_hemoptysisrequired
    symptom • used at ENTRY
    Frank 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_tightnessrequired
    symptom • used at ENTRY
    Wheeze + tightness + diurnal variability → asthma; expiratory wheeze + smoker → COPD; biphasic stridor → upper airway
  • associated_orthopnea_pnd_edemarequired
    symptom • used at ENTRY
    Orthopnea + PND + bilateral leg edema + JVD → cardiogenic cough (acute HF)
  • associated_weight_loss_night_sweatsrequired
    symptom • used at ENTRY
    Weight loss + night sweats + subacute cough → TB / lymphoma / lung cancer (USPSTF LDCT 2021 PMID 33687470)
  • aspiration_event
    symptom • used at ENTRY
    Witnessed aspiration / dysphagia / impaired LOC / poor dentition → aspiration pneumonia / pneumonitis (route pulm.aspiration-pneumonia.core.v1)
  • foreign_body_aspiration_history
    symptom • used at ENTRY
    Sudden cough/choking during eating (peanut, dental hardware, button battery) → FB aspiration → STAT bronchoscopy
  • paroxysmal_cough_with_whoop
    symptom • used at ENTRY
    Paroxysmal cough + whoop + post-tussive emesis (adult) → pertussis; transmissible; macrolide + droplet precautions
  • sbprequired
    vital • used at CONTEXT
    Hypotension + cough → septic / cardiogenic / obstructive shock (PE, tamponade); ARDS phase; hypertensive emergency-flash pulmonary edema overlay
  • hrrequired
    vital • used at CONTEXT
    Tachycardia + cough → infection / PE / HF / dehydration; relative bradycardia in atypical pneumonia (Legionella, typhoid)
  • rrrequired
    vital • used at CONTEXT
    Tachypnea + cough → pneumonia / asthma / COPD / HF / PE / DKA; RR ≥30 → severity escalation
  • spo2required
    vital • used at CONTEXT
    SpO2 <92% on RA → significant respiratory compromise; <90% → escalate; PE often has normal SpO2 early
  • temprequired
    vital • used at CONTEXT
    Fever + cough → infectious DDx (bacterial pneumonia, TB, influenza, COVID-19); afebrile + cough → cardiogenic / asthma / GERD / cancer
  • smoking_pack_yearsrequired
    history • used at CONTEXT
    Pack-year history drives COPD / lung cancer prior; ≥20 PYH + age 50-80 triggers LDCT screening (USPSTF 2021 PMID 33687470)
  • asthma_copd_diagnosisrequired
    history • used at CONTEXT
    Known asthma → exacerbation workup (PEF, GINA Track); known COPD → exacerbation workup (GOLD 2026 ABE)
  • recent_tb_exposure_travelrequired
    history • used at CONTEXT
    Recent TB endemic travel / homeless / incarcerated / HIV → active TB workup + airborne isolation (sputum AFB × 3, NAAT, chest CT)
  • recent_covid_influenza_exposurerequired
    history • used at CONTEXT
    Outbreak / household contact / unvaccinated → COVID-19 / influenza route + droplet precautions + PCR / antigen
  • chf_or_known_hfrefrequired
    history • used at CONTEXT
    Known HF → "cardiac cough" + decompensation workup (BNP, CXR, echo); diuresis + GDMT review
  • immunocompromised_staterequired
    history • used at CONTEXT
    Transplant / HIV / chemo / biologics / chronic steroids → broaden DDx (PCP, fungal, CMV, atypical mycobacteria, nocardia, aspergillus); empiric broad coverage
  • ace_inhibitor_userequired
    history • used at CONTEXT
    ACE-inhibitor dry cough (10-15%) — discontinue trial; ARB substitute; chronic cough cause
  • gerd_uacs_history
    history • used at CONTEXT
    GERD / UACS (post-nasal drip) → top causes of chronic cough in non-smoker non-asthma adults (Irwin CHEST 2006 PMID 16428686)
  • pe_risk_factorsrequired
    history • used at CONTEXT
    Recent surgery / immobility / malignancy / OCP / pregnancy / DVT → Wells/PERC for PE-with-cough phenotype
  • cbc_with_diffrequired
    lab • used at INITIAL_WORKUP
    Leukocytosis + left shift → bacterial pneumonia; lymphocytosis → viral / pertussis; eosinophilia → asthma / Loeffler / EGPA
  • bmprequired
    lab • used at INITIAL_WORKUP
    Hyponatremia → SIADH (Legionella, lung cancer); AKI in severe pneumonia / septic shock; glucose for DKA-mimics
  • lactate_venous
    lab • used at INITIAL_WORKUP
    Lactate ≥4 → severe sepsis / shock; supports sepsis bundle activation (SSC 2026)
  • crp_pct
    lab • used at INITIAL_WORKUP
    CRP + PCT (panel.inflammation) — PCT-guided antibiotic decisions; CRP >100 + PCT >0.25 supports bacterial pneumonia (ProACT, Schuetz)
  • troponin_hs
    lab • used at INITIAL_WORKUP
    Troponin in severe pneumonia (myocardial injury), HF cough, suspected PE, ACS overlay (panel.cardiac)
  • bnp_ntprobnp
    lab • used at INITIAL_WORKUP
    NT-proBNP age-adjusted (panel.cardiac) — supports cardiogenic cough phenotype (acute HF)
  • d_dimer_age_adjusted
    lab • used at INITIAL_WORKUP
    Age-adjusted D-dimer (panel.coag, ADJUST-PE) — PE rule-out in low/intermediate Wells
  • covid_pcr_or_antigen
    lab • used at INITIAL_WORKUP
    Nasopharyngeal PCR or antigen for COVID-19; route id.covid19.core.v1 if positive
  • influenza_pcr
    lab • used at INITIAL_WORKUP
    Rapid influenza PCR / antigen — early oseltamivir if positive (<48 h symptoms)
  • sputum_culture_gram_afb
    lab • used at INITIAL_WORKUP
    Sputum gram stain + culture + AFB × 3 if TB suspected; NAAT for TB (Xpert MTB/RIF)
  • cxr_pa_lateralrequired
    imaging • used at INITIAL_WORKUP
    CXR 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_lead
    imaging • used at INITIAL_WORKUP
    ECG for HF cough (afib, LVH), PE (S1Q3T3, RBBB, T inversion V1-V4), ACS overlay
  • lung_pocus
    imaging • used at INITIAL_WORKUP
    Lung POCUS for B-lines (pulmonary edema), consolidation, effusion, pneumothorax (BLUE protocol)
  • cta_chest_for_pe
    imaging • used at BRANCHING_WORKUP
    CTA chest if PE suspected after positive D-dimer OR high Wells (>6); diagnostic gold standard
  • chest_ct_for_mass_tb
    imaging • used at BRANCHING_WORKUP
    Non-contrast chest CT for chronic cough + weight loss / hemoptysis / smoker → TB / cancer / bronchiectasis / ILD

12-phase flow (12)

  1. 1FRAME
    Cough 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_sputum
    advance: pattern characterized
  2. 2ENTRY
    Associated fever, dyspnea, pleuritic pain, hemoptysis, wheeze/tightness, orthopnea/PND/edema, weight loss/night sweats, aspiration, FB choking, paroxysmal/whoop
    inputs: associated_fever_chills, associated_dyspnea, associated_chest_pain_pleuritic, associated_hemoptysis, associated_wheeze_chest_tightness, associated_orthopnea_pnd_edema, associated_weight_loss_night_sweats
    advance: phenotype-defining features captured
  3. 3CONTEXT
    Age, 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_factors
    advance: context complete
  4. 4RED_FLAGS
    Hypoxia (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/peds
    inputs: spo2, rr, sbp, associated_hemoptysis, foreign_body_aspiration_history
    advance: no immediate life-threat OR emergent intervention activated
  5. 5INITIAL_WORKUP
    CXR 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_pcr
    actions: panel.cbc, panel.renal, panel.inflammation, panel.cardiac, panel.coag
    advance: initial workup reviewed + phenotype narrowed
  6. 6BRANCHING_WORKUP
    Pneumonia: 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 + droplet
    inputs: cta_chest_for_pe, chest_ct_for_mass_tb, sputum_culture_gram_afb
    actions: calc.wells_pe, calc.perc
    advance: definitive pathway selected
  7. 7DIFFERENTIAL
    Acute: 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
  8. 8RISK_STRATIFICATION
    Pneumonia: 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 score
    actions: calc.wells_pe, calc.perc
    advance: risk scores documented
  9. 9TREATMENT
    CAP: 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 consultation
    inputs: spo2, sbp, rr
    advance: definitive intervention initiated
  10. 10DISPOSITION
    Pneumonia: 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 treated
    advance: disposition assigned + downstream handoff complete
  11. 11MONITORING
    Pneumonia: 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 chest
    inputs: spo2, rr, sbp, temp
    advance: stability achieved or escalation triggered
  12. 12FOLLOWUP
    Pneumonia: 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 trials
    advance: discharge bundle prescribed + follow-up scheduled