Clinical Commander

All dossiers
pulm.hypersensitivity-pneumonitis.v1

Hypersensitivity pneumonitis (acute + chronic-fibrotic)

pulmonologysubacutechronicadultoutpatientinpatient

NEW HP dossier authored design-disease-first 2026-05-16 (brief → dossier → depth → research bundle). Mirrors pulm.idiopathic_pulmonary_fibrosis.v1 shape (closest sibling — fibrotic HP is its central differential; authoring this makes IPF/atypical-pneumonia HP cross-refs real). ATS/JRS/ALAT 2020 (PMID 32706311) nonfibrotic-vs-fibrotic dichotomy + diagnostic-CONFIDENCE-category Bayesian framework encoded as data (§5.5.2). Antigen identification + avoidance is the cornerstone (only survival-signal intervention). Regimen axis: antigen avoidance (non-pharm cornerstone) + corticosteroid (acute/inflammatory — taper in rationale/monitoring, NOT a taper_plan field) + steroid-sparing MMF/AZA + antifibrotic nintedanib (progressive fibrotic — INBUILD HP subgroup ΔFVC +73.1 mL/yr PMID 32145830) + transplant. ≥6 special-pop branches as data. 12 PMIDs PubMed-verified 2026-05-16 (get_article_metadata — title/journal/DOI resolved). ≥13 §5.5.1 effect-size anchors (BAL lymphocyte 42.8% vs 10.0% / >20% sens 68.1% spec 64.8%; traction-bronchiectasis HR 1.10; fibroblastic-foci HR 2.36; honeycombing HR 1.06/1.09; INBUILD HP ΔFVC +73.1 mL/yr; INBUILD overall ~107 mL/yr; AZA-response OR 1.051; mosaic-attenuation aOR 0.27; six-predictor ~95% accuracy). Cross-dossier engine_ids (real on-disk, grep-confirmed): pulm.idiopathic_pulmonary_fibrosis.v1, pulm.sarcoidosis.v1, pulm.pe.core.v1, pulm.cap.core.v1, cardio.acute-hf.core.v1. NSIP/CTD-ILD/drug-ILD have no on-disk dossier — differential-as-data (no fabricated ids). Registry ids reused (all resolve in clinical-tools-registry.ts): workup.ild_acute_exac, workup.pulmonary_nodule, calc.mmrc, calc.bode, calc.rox, calc.aa_gradient, panel.cbc, panel.lft, panel.renal, panel.abg, panel.cardiac. engine_id NAMING schema-gap: on-disk sibling pulm.atypical-pneumonia.v1 cross-refers via the underscore form pulm.hypersensitivity_pneumonitis.v1; this dossier uses the dispatch + file-naming hyphen form pulm.hypersensitivity-pneumonitis.v1. Soft string ref (not ALL_DOSSIERS-validated); atypical-pneumonia NOT modified (out of scope). See .depth.md §schema-gap. RxCUI schema-gap: prednisone 8640 / methylprednisolone 6902 / nintedanib 1592737 confirmed via sibling IPF §RxCUI-audit (RxNav 2026-05-16). mycophenolate 68149 + azathioprine 1256 NOT independently re-fetched this pass — carried with verify-flag; status PLANNED so RxCUI-on-every-drug audit gate does not fire. See .depth.md §RxCUI-audit. Not registered in _registry.ts (strict scope forbids touching it) — not exercised by ALL_DOSSIERS contract test; correctness verified by npm run lint (tsc) + standalone import-load probe. manifest repointed to existing prisma/seed/manifests/id.sepsis.core.v1.ts (id.dengue repoint pattern); atoms [], package undefined; no manifest/seed authored.

Entry points (5)

  • symptom
    Subacute/chronic exertional dyspnea + dry cough with a compatible antigen exposure (ATS/JRS/ALAT 2020)
    subacute_chronic_dyspnea_cough
  • symptom
    Recurrent influenza-like episodes (fever/chills/myalgia/cough) 4–8 h after antigen exposure (Watts/Grammer 2019 PMID 31690386)
    recurrent_influenza_like_episodes
  • symptom
    Inspiratory crackles ± inspiratory squeaks/squawks ± weight loss (ATS/JRS/ALAT 2020)
    bibasilar_inspiratory_crackles
  • imaging
    HRCT mosaic attenuation / air-trapping / three-density (headcheese) sign / centrilobular GGO nodules ± fibrosis (ATS/JRS/ALAT 2020)
    hrct_mosaic_air_trapping_three_density
  • history
    Identified antigen exposure — birds/feathers/down, mold/damp building, farming/hay/silage, hot tub/humidifier, metal-working fluid, isocyanates (ATS/JRS/ALAT 2020)
    antigen_exposure_history

Required inputs (18)

  • agerequired
    demographic • used at CONTEXT
    HP spans wide age range; fibrotic HP older; transplant candidacy (ATS/JRS/ALAT 2020)
  • sex
    demographic • used at CONTEXT
    Females more likely to manifest fibrotic-HP CT features (mosaic attenuation aOR 0.27 in males; Copeland/Salisbury 2022 PMID 35877079)
  • antigen_exposure_questionnairerequired
    history • used at CONTEXT
    Structured exposure questionnaire (birds/mold/farm/hot-tub/MWF/isocyanate, temporal symptom-exposure relationship) — first domain of the ATS/JRS/ALAT 2020 confidence framework; antigen identification is the highest-leverage intervention
  • occupational_environmental_hobbyrequired
    history • used at CONTEXT
    Occupation + hobby + home environment for avoidable-antigen branch + occupational-medicine referral (ATS/JRS/ALAT 2020)
  • smoking_status
    history • used at CONTEXT
    Smoking paradoxically lowers HP incidence but is associated with worse fibrotic prognosis/honeycombing (Copeland/Salisbury 2022 PMID 35877079)
  • serum_igg_specific_antigen_panelrequired
    lab • used at INITIAL_WORKUP
    Serum IgG / specific precipitins to suspected antigens — supports antigen domain of ATS/JRS/ALAT 2020 confidence framework (suggested test)
  • ana_rf_ccp_myositis_panelrequired
    lab • used at INITIAL_WORKUP
    Exclude CTD-ILD before labelling HP — ANA/RF/CCP/Scl-70/Jo-1/MDA5/Ro52 (ATS/JRS/ALAT 2020 differential)
  • cbcrequired
    lab • used at INITIAL_WORKUP
    Baseline before immunosuppression/antifibrotic; AZA myelosuppression surveillance (DailyMed labels)
  • bmp_lftrequired
    lab • used at INITIAL_WORKUP
    AZA/MMF/nintedanib hepatotoxicity baseline + serial LFT; renal dosing (DailyMed labels)
  • tpmt_nudt15
    lab • used at INITIAL_WORKUP
    TPMT/NUDT15 activity before azathioprine — myelosuppression risk genotyping (AZA DailyMed label)
  • hrctrequired
    imaging • used at INITIAL_WORKUP
    HRCT typical/compatible/indeterminate pattern + fibrosis grading — second domain of ATS/JRS/ALAT 2020 framework; three-density sign / mosaic air-trapping characteristic
  • spirometry_dlcorequired
    imaging • used at INITIAL_WORKUP
    FVC + DLCO baseline + serial — restrictive (or mixed for avian) physiology; FVC trend drives progression/antifibrotic/transplant (ATS/JRS/ALAT 2020)
  • six_minute_walk_testrequired
    imaging • used at INITIAL_WORKUP
    Functional capacity + exertional desaturation; prognostic + O2 prescription (ATS/JRS/ALAT 2020)
  • bal_lymphocyte_differential
    imaging • used at BRANCHING_WORKUP
    BAL lymphocyte differential — third domain; pooled 42.8% in CHP vs 10.0% IPF; >20% sens 68.1%/spec 64.8% (Adderley 2020 PMID 32265306); recommended in nonfibrotic, suggested in fibrotic (ATS/JRS/ALAT 2020)
  • lung_biopsy
    imaging • used at BRANCHING_WORKUP
    Transbronchial / cryobiopsy / surgical lung biopsy by phenotype + residual diagnostic uncertainty per ATS/JRS/ALAT 2020 algorithm
  • spo2_room_airrequired
    vital • used at CONTEXT
    Resting + ambulatory hypoxemia drives O2 prescription; acute severe HP respiratory-failure trigger (ATS/JRS/ALAT 2020)
  • current_medsrequired
    medication • used at CONTEXT
    Drug-induced ILD screen (amiodarone, nitrofurantoin, minocycline, MTX, ICI); CYP/anticoagulant interactions for nintedanib (ATS/JRS/ALAT 2020 differential; DailyMed)
  • pregnancy
    history • used at CONTEXT
    MMF is teratogenic (contraindicated in pregnancy) → azathioprine acceptable; antifibrotic contraindicated; minimise corticosteroid (special-pop branch)

12-phase flow (12)

  1. 1FRAME
    Adult subacute/chronic immune-mediated antigen-driven ILD — establish the NONFIBROTIC-vs-FIBROTIC fork (the dominant prognostic + therapeutic axis) and adjudicate via the ATS/JRS/ALAT 2020 diagnostic-confidence framework at MDD (pulm + thoracic radiology + pathology). Scope excludes IPF/UIP, NSIP, sarcoidosis, CTD-ILD, drug-induced ILD, infection (differential-as-data)
    inputs: hrct, antigen_exposure_questionnaire
    advance: HP confidence category assigned at MDD
  2. 2ENTRY
    Suspicion: subacute/chronic exertional dyspnea + dry cough (± recurrent influenza-like episodes 4–8 h post-exposure, inspiratory crackles ± squeaks, weight loss) in a patient with a compatible antigen exposure → exposure history + HRCT (ATS/JRS/ALAT 2020; six-predictor ~95% accuracy Watts/Grammer 2019 PMID 31690386)
    inputs: age
    advance: Engine entered
  3. 3CONTEXT
    Structured exposure questionnaire (birds/feathers/down/duvet, mold/damp building, farming/hay/silage, hot tub/humidifier/sauna, metal-working fluid, isocyanates, hobby — pigeon/parrot fancier), temporal symptom-exposure relationship (improvement away from exposure, recurrence on re-exposure), smoking status, full medication review (drug-induced ILD), autoimmune ROS (exclude CTD-ILD), pregnancy status (MMF teratogenicity), baseline SpO2 (ATS/JRS/ALAT 2020)
    inputs: antigen_exposure_questionnaire, occupational_environmental_hobby, smoking_status, current_meds, pregnancy, spo2_room_air, sex
    advance: Exposure + autoimmune + drug + pregnancy context complete
  4. 4RED_FLAGS
    Acute severe HP with hypoxemic respiratory failure after heavy antigen exposure (high-fever, diffuse infiltrate, hypoxemia — exclude infection); rapidly progressive fibrotic HP / acute-exacerbation-like deterioration (AE analogue, IPF-AE Collard-type definition applied to fibrotic HP) — exclude infection (viral PCR/bacterial/PCP), PE (CTPA), cardiogenic edema (BNP/echo). Severe resting hypoxemia (LTOT trigger SpO2 ≤88%)
    inputs: spo2_room_air
    actions: workup.ild_acute_exac
    advance: Stabilised or escalated
  5. 5INITIAL_WORKUP
    HRCT (typical/compatible/indeterminate pattern + fibrosis grading — mosaic attenuation, air-trapping, three-density/headcheese sign, centrilobular GGO nodules; fibrotic adds reticulation/traction bronchiectasis/honeycombing), serum IgG / specific precipitins to suspected antigens, spirometry + DLCO, 6MWT + continuous SpO2, autoimmune serology (exclude CTD-ILD), CBC, BMP/LFT (pre-immunosuppressant/antifibrotic), TPMT/NUDT15 if AZA contemplated (ATS/JRS/ALAT 2020)
    inputs: hrct, serum_igg_specific_antigen_panel, spirometry_dlco, six_minute_walk_test, ana_rf_ccp_myositis_panel, cbc, bmp_lft
    actions: panel.cbc, panel.lft, panel.renal
    advance: Stage-1 returned
  6. 6BRANCHING_WORKUP
    BAL for lymphocyte differential — RECOMMENDED in nonfibrotic HP, SUGGESTED in fibrotic HP (ATS/JRS/ALAT 2020); pooled BAL lymphocyte 42.8% CHP vs 10.0% IPF, >20% sens 68.1%/spec 64.8%, >30–40% higher specificity at the cost of sensitivity (Adderley 2020 PMID 32265306). Transbronchial lung biopsy / transbronchial cryobiopsy / surgical lung biopsy selected by phenotype + residual diagnostic uncertainty per the 2020 algorithm; exposure-elimination or inhalation challenge in selected cases
    inputs: bal_lymphocyte_differential, lung_biopsy
    actions: workup.ild_acute_exac, workup.pulmonary_nodule
    advance: BAL ± biopsy complete; MDD confidence category finalised
  7. 7DIFFERENTIAL
    §5.5.2 differential-as-data — the ATS/JRS/ALAT 2020 diagnostic-CONFIDENCE-category Bayesian framework encoded as data: confidence is a function of antigen-identification (±IgG), HRCT pattern (typical/compatible/indeterminate), and BAL-lymphocytosis ± histopathology → definite (≥90%) / high (80–89%) / moderate (70–79%) / low (51–69%) / not-excluded. Discriminators carry test characteristics — IPF/UIP (no antigen, no BAL lymphocytosis [~10%], UIP HRCT, older male → pulm.idiopathic_pulmonary_fibrosis.v1); NSIP (younger, GGO-predominant, BAL lymphocytosis overlaps, steroid-responsive); sarcoidosis (perilymphatic nodules + hilar adenopathy, BAL CD4/CD8 >3.5 → pulm.sarcoidosis.v1); CTD-ILD (+ANA/RF/CCP/Scl-70/Jo-1/MDA5/Ro52 + extrathoracic features → rheum MDD, no on-disk dossier); drug-induced ILD (temporal culprit — amiodarone/nitrofurantoin/minocycline/MTX/ICI; reversible if stopped); infection (acute-HP mimic — viral/bacterial/PCP → pulm.cap.core.v1). BAL lymphocyte >20% sens 68.1%/spec 64.8%; >30–40% raises specificity (Adderley 2020 PMID 32265306). Fibrotic-HP UIP-like pattern is the hardest IPF discriminator
    inputs: hrct, antigen_exposure_questionnaire, serum_igg_specific_antigen_panel, bal_lymphocyte_differential
    advance: HP confidence category assigned at MDD or routed to sibling engine
  8. 8RISK_STRATIFICATION
    NONFIBROTIC vs FIBROTIC is the dominant prognostic split (fibrotic HP survival approaches IPF). Poor-prognosis modifiers (each with test characteristics): UIP-like HRCT pattern, extent of fibrosis, traction-bronchiectasis severity (HR 1.10 per unit; Walsh 2012 PMID 22466512), honeycombing (macrocystic HR 1.06 / microcystic HR 1.09; Walsh 2012), fibroblastic-foci profusion (HR 2.36; Chiba 2016 PMID 26836921), UNIDENTIFIED antigen (worse survival — drives empiric remediation + lower immunosuppression/antifibrotic threshold), ↓FVC ↓DLCO, progressive fibrosing phenotype (≥10% relative FVC decline / worsening fibrosis despite avoidance). mMRC dyspnea trend (calc.mmrc) + ROX (calc.rox, AE-like respiratory failure) + A-a gradient (calc.aa_gradient) as registry-resolved adjuncts (HP-specific prognostic index not in registry — see .depth.md schema-gap)
    inputs: spirometry_dlco, six_minute_walk_test, hrct, antigen_exposure_questionnaire
    actions: calc.mmrc, calc.bode
    advance: Nonfibrotic-vs-fibrotic + progression risk + antigen-identification status documented
  9. 9TREATMENT
    ANTIGEN AVOIDANCE is the cornerstone (non-pharm; only intervention with a survival signal — complete source removal/remediation; occupational-medicine + possible work restriction). Nonfibrotic/inflammatory: corticosteroid (prednisone — symptomatic/functional benefit acutely, limited long-term efficacy; taper documented in regimen rationale/monitoring — `taper_plan` not in _types.ts); acute severe HP respiratory failure: high-dose/pulse methylprednisolone + supportive. Progressive inflammatory/chronic: steroid-sparing MMF or azathioprine (BAL lymphocytosis predicts AZA response OR 1.051; Raimundo 2021 PMID 33621590). PROGRESSIVE FIBROTIC HP despite avoidance ± immunosuppression: antifibrotic nintedanib (INBUILD HP subgroup ΔFVC +73.1 mL/yr PMID 32145830; overall INBUILD ~107 mL/yr PMID 31566307). Lung transplant referral for progressive fibrotic HP; LTOT/ambulatory O2; pulmonary rehab; vaccinations; palliative integration (ATS/JRS/ALAT 2020; INBUILD)
    inputs: bmp_lft, spo2_room_air, antigen_exposure_questionnaire
    advance: Antigen avoidance + anti-inflammatory/steroid-sparing/antifibrotic + transplant + palliative plan documented
  10. 10DISPOSITION
    Admit if acute severe HP / hypoxemic respiratory failure / AE-like fibrotic deterioration (ICU + transplant/ECMO bridge only in candidates — high mortality, align with goals of care); outpatient ILD/pulmonology + occupational-medicine co-management otherwise (ATS/JRS/ALAT 2020)
    advance: Disposition documented
  11. 11MONITORING
    FVC q3–6 mo + DLCO q6–12 mo (progression = antifibrotic/transplant trigger; ≥10% relative FVC decline = progressive phenotype), 6MWT q6 mo, HRCT per change, ANTIGEN-AVOIDANCE verification at every visit (re-exposure = treatment failure). Immunosuppressant safety: AZA CBC + LFT (TPMT/NUDT15-informed) periodic; MMF CBC + LFT periodic. Antifibrotic safety: nintedanib LFT baseline → monthly ×3 → periodic, GI/weight, bleeding review. Corticosteroid: glucose/BP/bone/infection surveillance during taper (ATS/JRS/ALAT 2020; DailyMed labels)
    inputs: bmp_lft, spirometry_dlco, antigen_exposure_questionnaire
    advance: Surveillance schedule + progression thresholds + avoidance verification documented
  12. 12FOLLOWUP
    ILD clinic q3–6 mo, occupational/environmental-medicine continuity (verify successful remediation; home/workplace inspection; respirator/work-restriction adherence), transplant clinic co-management for progressive fibrotic HP, comorbidity sweep (Group-3 PH-ILD, lung-cancer surveillance in fibrotic HP, depression, GERD), pulmonary rehab continuity, palliative care + advance care planning for progressive fibrotic HP (ATS/JRS/ALAT 2020)
    advance: Follow-up + occupational + transplant + comorbidity + palliative loop booked