Clinical Commander

All dossiers
id.pjp-pneumocystis.v1

Pneumocystis jirovecii pneumonia (PJP/PCP)

infectious_diseaseacutesubacuteadultacuteinpatientoutpatient

Lane F build 2026-05-26: NEW dossier id.pjp-pneumocystis.v1 INTEGRATED. Anchors: IDSA/CDC/HIVMA OI Guidelines (Pneumocystis) + Bozzette NEJM 1990 RCT (PMID 2233917) + NIH Consensus 1990 (PMID 2136587) + ECIL 2016 (PMID 27550992) + Wang 2021 non-HIV meta-analysis (PMID 34222179) + ATS 2019 microbiology CPG (PMID 31469325) + ATS 2006 PCP workshop (PMID 17065370) + Bozzette Chest 1992 nested ICU cohort (PMID 1582305). All 7 PMIDs live-verified via PubMed MCP 2026-05-26. RxNav live-verify catches 2026-05-26: prompt-supplied primaquine 8606 → potassium sorbate (corrected to 8687); pentamidine 7935 → invalid (corrected to 7994); atovaquone 1310 → invalid (corrected to 60212); dapsone 3008 → cyclosporine (corrected to 3108). Final verified RxCUI set: TMP-SMX 10831, prednisone 8640, methylprednisolone 6902, primaquine 8687, clindamycin 2582, pentamidine 7994, atovaquone 60212, dapsone 3108, caspofungin 140108. Phenotype matrix (HIV vs non-HIV — transplant / malignancy / autoimmune-on-steroids × severity — PaO2 <70 / A-a ≥35 vs non-severe × prophylaxis-naive vs breakthrough × G6PD status) is encoded indirectly via severity_triggers + setting_playbook drug logic and the regimen axis. First-class phenotype-matrix TS field schema-blocked; deferred to schema proposal cache. Bayesian linkage (pre-test ~30-50% PJP in HIV CD4 <200 with subacute dyspnea + bilateral GGO + LDH↑; LR+ β-D-glucan ≥80 pg/mL ~3-4 with high NPV; BAL silver/IFA/PCR LR+ very high — gold standard; T_treat = high pretest + immunocompromise + bilateral GGO → start empiric TMP-SMX within 1 h, do not wait for BAL) documented in co-located _briefs/id.pjp-pneumocystis.v1.md. PRODUCTION blockers: dedicated protocol-runner integration test not yet authored; explicit cross-engine carryover state with id.hiv-initial.chronic.v1 (CD4, ART start timing) and id.sepsis.core.v1 not yet schema-encoded; Lazarte-Lalo 2025 caspofungin combination citation not added (no in-PubMed verified PMID at build time — referenced in axis rationale only as off-label combination data).

Entry points (5)

  • symptom
    Subacute progressive dyspnea + dry cough + fever in immunocompromised host (classic PJP triad)
    subacute_dyspnea_dry_cough_fever
  • vital_abnormality
    Profound exertional desaturation with widened A-a gradient
    exertional_desaturation
  • imaging
    Bilateral perihilar ground-glass opacities on CXR/HRCT in immunocompromised host
    bilateral_ground_glass
  • lab_abnormality
    Elevated LDH with hypoxia in HIV / transplant / chronic high-dose steroids
    ldh_elevated_immunocompromised
  • problem_list
    HIV with CD4 <200 + new pulmonary infiltrate (IDSA/CDC/HIVMA OI Guidelines)
    hiv_cd4_under_200_with_pneumonia

Required inputs (14)

  • immunocompromiserequired
    history • used at ENTRY
    HIV (esp. CD4 <200), transplant, ≥20 mg pred-eq ≥4 wk, biologics, lymphoma — defines pre-test probability (IDSA OI; ECIL)
  • pjp_prophylaxis_statusrequired
    history • used at CONTEXT
    Breakthrough on TMP-SMX prophylaxis changes empiric coverage + raises resistance concern (ECIL 2016)
  • spo2required
    vital • used at RED_FLAGS
    PaO2/SpO2 + exertional desaturation drive severity stratification + steroid indication (Bozzette 1990)
  • rrrequired
    vital • used at RED_FLAGS
    Tachypnea + work-of-breathing escalation marker
  • abgrequired
    lab • used at RISK_STRATIFICATION
    PaO2 <70 mmHg or A-a gradient ≥35 mmHg = adjunctive corticosteroid trigger in HIV (Bozzette NEJM 1990; NIH Consensus 1990)
  • ldh
    lab • used at INITIAL_WORKUP
    Elevated LDH supports PJP (non-specific; trend correlates with severity)
  • serum_beta_d_glucan
    lab • used at INITIAL_WORKUP
    High NPV when low; supports diagnosis when elevated (ATS 2019 microbiology CPG, Hage/Limper)
  • bal_pjp_pcr_or_silver_stain
    lab • used at INITIAL_WORKUP
    BAL with silver stain / IFA / PCR is gold standard; induced sputum lower sensitivity (IDSA OI; ATS 2019)
  • creatininerequired
    lab • used at TREATMENT
    TMP-SMX renal dosing + hyperkalemia + AKI monitoring (IDSA OI)
  • lftrequired
    lab • used at TREATMENT
    TMP-SMX hepatotoxicity baseline + monitoring (IDSA OI)
  • g6pd
    lab • used at TREATMENT
    G6PD deficiency contraindicates primaquine + dapsone — confirm before salvage regimen (IDSA OI)
  • hrct_chestrequired
    imaging • used at INITIAL_WORKUP
    Bilateral perihilar ground-glass classic; lobar consolidation / effusion argue against PJP (ATS 2019)
  • cd4_count
    lab • used at CONTEXT
    CD4 <200 defines HIV at-risk; <100 supports PJP > bacterial CAP in pre-test (IDSA OI)
  • sulfa_allergy_or_baseline_medsrequired
    medication • used at TREATMENT
    Sulfa allergy + interacting meds (warfarin, ACEI/ARB hyperkalemia, methotrexate) drive regimen choice (IDSA OI)

12-phase flow (12)

  1. 1FRAME
    Adult opportunistic Pneumocystis jirovecii pneumonia in HIV + non-HIV immunocompromised hosts; ABPA / bacterial CAP / viral pneumonitis covered by sibling engines
    inputs: immunocompromise
    advance: scope confirmed (immunocompromised + compatible pneumonia)
  2. 2ENTRY
    Recognize subacute progressive dyspnea + dry cough + fever + exertional desaturation + bilateral GGO in immunocompromised host (IDSA OI; ATS 2006 workshop)
    inputs: immunocompromise, spo2
    advance: compatible presentation + immunocompromise documented
  3. 3CONTEXT
    HIV CD4 + viral load OR transplant type + immunosuppression intensity OR malignancy/chemo OR chronic steroid ≥20 mg pred-eq ≥4 wk OR biologic; prophylaxis status; adherence; sulfa allergy
    inputs: pjp_prophylaxis_status, cd4_count, sulfa_allergy_or_baseline_meds
    advance: host phenotype + prophylaxis history captured
  4. 4RED_FLAGS
    Respiratory failure (PaO2 <60 mmHg, SpO2 <90% on room air), impending intubation, pneumothorax, hypotension → ICU + STAT empiric TMP-SMX + steroids if HIV+ severe
    inputs: spo2, rr
    advance: red flags acted on; empiric TMP-SMX initiated within 1 h if high suspicion
  5. 5INITIAL_WORKUP
    HRCT chest (bilateral perihilar GGO); serum β-D-glucan (high NPV); LDH; ABG with calculated A-a gradient; BAL with silver/IFA/PCR (induced sputum lower yield); HIV testing if unknown serostatus; CD4 if HIV+; CMV co-infection screen if transplant
    inputs: hrct_chest, abg, ldh, serum_beta_d_glucan
    actions: panel.inflammation, panel.abg, panel.cbc
    advance: imaging + mycology + ABG support diagnosis; do NOT delay empiric therapy for confirmation
  6. 6BRANCHING_WORKUP
    CMV PCR / antigen, fungal serology (cryptococcal Ag if HIV+CD4<100), Aspergillus galactomannan in transplant, mycobacterial workup if compatible; echocardiogram if pulmonary hypertension; G6PD if salvage regimen anticipated
    inputs: g6pd
    advance: co-infections + alternative diagnoses mapped
  7. 7DIFFERENTIAL
    CMV pneumonitis (especially transplant); bacterial CAP (atypical for PJP — lobar consolidation, lymphadenopathy, effusion); tuberculosis; invasive aspergillosis; mTOR-inhibitor pneumonitis (sirolimus/everolimus); pulmonary edema; COVID-19 pneumonia; lymphocytic interstitial pneumonia
    inputs: hrct_chest
    advance: plausible mimics excluded or co-managed
  8. 8RISK_STRATIFICATION
    Severity stratification: severe = PaO2 <70 mmHg OR A-a gradient ≥35 mmHg OR mechanical ventilation OR ICU (Bozzette 1990 + NIH Consensus 1990 thresholds for adjunctive steroids in HIV); non-HIV mortality higher independent of severity (Wang 2021 meta-analysis)
    inputs: abg, spo2
    actions: calc.ckd_epi_2021
    advance: severity assigned; steroid indication evaluated
  9. 9TREATMENT
    Empiric TMP-SMX 15-20 mg/kg/day TMP-component IV/PO divided q6-8h × 21 d (HIV) or 14-21 d (non-HIV per protocol); adjunctive prednisone 40 mg BID×5d → 40 mg daily×5d → 20 mg daily×11d in HIV PJP with PaO2 <70 OR A-a ≥35 (Bozzette 1990; NIH Consensus 1990) started within 72 h of TMP-SMX; non-HIV adjunctive steroids controversial — many use Bozzette-style if severe; salvage primaquine + clindamycin (preferred) OR pentamidine OR atovaquone (mild only); ART deferral 2 wk OK in HIV; sulfa allergy → primaquine + clindamycin
    inputs: creatinine, lft, sulfa_allergy_or_baseline_meds
    actions: panel.renal, panel.lft
    advance: empiric TMP-SMX initiated within 1 h of suspicion + steroid decision made within 72 h in HIV severe
  10. 10DISPOSITION
    ICU if PaO2/FiO2 <200, vasopressors, mechanical ventilation, pneumothorax; otherwise ward; outpatient only if mild + reliable follow-up
    inputs: spo2
    advance: level-of-care determined; oxygen + monitoring plan set
  11. 11MONITORING
    Daily K/Cr/CBC/LFT × first week then 2-3×/wk during TMP-SMX (BM suppression, AKI, hyperkalemia, hepatotoxicity); clinical response by day 4-8 — paradoxical worsening with steroids common day 3-4; reassess at 5-7 d for treatment failure → switch regimen; oxygenation trend
    inputs: creatinine, lft
    actions: panel.renal, panel.cbc, panel.lft
    advance: response evident or salvage triggered by day 5-7
  12. 12FOLLOWUP
    Secondary prophylaxis: HIV TMP-SMX 1 SS daily OR DS thrice weekly until CD4 >200 ×6 mo on ART; transplant per institutional protocol; reinforce primary prophylaxis triggers (CD4 <200, ≥20 mg pred-eq ≥4 wk, biologics, lymphoma); ART initiation if HIV-naive (2-wk delay OK); pulmonology if persistent lung impairment
    advance: secondary prophylaxis prescribed + chronic immunosuppression plan reconciled