Tuberculosis (active drug-susceptible, MDR-TB, LTBI)
TB = subacute, public-health-mandated infectious engine with a two-stage Bayesian gate: (1) diagnostic — pretest prior (endemicity/exposure/HIV/immunosuppression) × Xpert Ultra/AFB/culture LRs → active TB vs LTBI vs NTM vs CAP vs lung cancer vs endemic fungal vs sarcoidosis; (2) regimen — DS-TB 6-mo 2HRZE/4HR vs 4-mo rifapentine-moxi vs LTBI 3HP/4R/3HR/9H, conditional on HIV/ART, pregnancy, hepatic, renal, age, DST. SCOPE: pulmonary DRUG-SUSCEPTIBLE TB + LTBI + diagnosis; DRUG-RESISTANT TB (BPaL/BPaLM) OWNED by sibling id.tb_drug_resistant.v1 — this dossier recognises the rifampin-resistance signal and ROUTES. §5.5.2 differential/Bayesian as data: severity_triggers (xpert_ultra_positive_rif_susceptible_high_prior with rule-IN/trace-positive logic; igra_tst_positive_no_active_disease_ltbi; rifampin_resistance_route_to_dr_tb_sibling) + DIFFERENTIAL/RISK_STRATIFICATION phase purpose + 4 sibling_differentiation blocks encode the pivots: Xpert Ultra sens (overall 88%, smear-neg-cx-pos 63%, HIV+ 90%) & spec (96%, below Xpert 98% — trace-positive caution in low-prior), IGRA vs TST in BCG-vaccinated, CXR cavitation/upper-lobe, urine fungal antigen. Pretest priors by endemicity/exposure/HIV/immunosuppression encoded in CONTEXT phase + .depth.md prior table. Effect sizes wired with PMIDs (≥6): Study 31/A5349 4-mo rifapentine-moxi NON-INFERIOR to 6-mo 2HRZE/4HR (Dorman NEJM 2021 PMID 33951360); 3HP vs 9H — TB 0.19% vs 0.43%, completion 82.1% vs 69.0% (p<0.001), hepatotoxicity 0.4% vs 2.7% (p<0.001) (Sterling NEJM 2011 PMID 22150035); Xpert Ultra vs Xpert smear-neg-cx-pos sens 63% vs 46%, HIV+ 90% vs 77%, overall 88% vs 83%, spec 96% vs 98% (Dorman Lancet ID 2018 PMID 29198911); TB-PRACTECAL BPaLM unfavourable 11% vs 48% (RD −37 pp) (Nyang'wa NEJM 2022 PMID 36546625); Nix-TB BPaL ~90% favourable (Conradie NEJM 2020 PMID 32130813); ZeNix linezolid 600 mg ×26 wk 91% favourable, neuropathy 24% / myelosuppression 2% vs 1200 mg (Conradie NEJM 2022 PMID 36053506). All 7 evidence.pmids inline-commented; last_reconciled 2026-05-16. Cross-dossier routing via workups[].branches_to (7 engine_ids) + sibling_differentiation[].sibling_engine_id (4 blocks) — all grep-verified real engine_ids: id.tb_drug_resistant.v1 (DR-TB route), pulm.cap.core.v1, pulm.sarcoidosis.v1, id.hiv-initial.chronic.v1, id.invasive-aspergillosis.core.v1, onc.lung-cancer.core.v1, symptom.weight-loss.v1. Special populations: HIV (mandatory test; ART within 2 wk if CD4<50 / 8 wk otherwise; rifampin+PI incompatible → rifabutin RxCUI 55672; IRIS trigger); pregnancy (4-month regimen contraindicated → default 2HRZE/4HR; streptomycin contraindicated — encoded as a streptomycin avoid-in-pregnancy rule); hepatic disease (baseline+serial LFT, hold thresholds, cirrhosis-sparing regimen); renal (ETB/PZA INTERVAL-extension to 3×/week if CrCl<30 — not dose reduction; calc.ckd_epi_2021); pediatric pointer (age ≥12 yr gates 4-month regimen); diabetes (worse outcomes/slower conversion → tighter glycemic control + extended continuation); contacts/LTBI (3HP/4R/3HR ladder); DR-TB → id.tb_drug_resistant.v1. Regimen axis tb_treatment_ladder: 8 stepwise tiers (DS 6-mo 2HRZE/4HR, 4-mo rifapentine-moxi, DR-TB routing-bridge, LTBI 3HP/4R/3HR/9H) + non-stepwise drugs (rifabutin substitute, dexamethasone adjunct, streptomycin pregnancy-avoid encoder); selection by HIV/ART × pregnancy × hepatic × renal × age × DST; pyridoxine mandatory with INH; hepatotoxicity hold rules (ALT >3× ULN+sx or >5× ULN); rifampin CYP3A4 induction map; DOT/video-DOT; DR-TB deferral to sibling. Matches pulm.cap.core.v1 regimen depth. RxCUI FIXES (RxNav REST /rxcui/{cui}/properties.json verified 2026-05-16): isoniazid 1011→6038 across ALL 5 isoniazid-containing steps — SAFETY-CRITICAL: RxCUI 1011 resolves to "lymphocyte immune globulin, anti-thymocyte globulin" (NOT isoniazid); 6038 confirmed IN isoniazid. Added rifabutin 55672 (PI-ART substitute), streptomycin 10109 (pregnancy-avoid encoder), dexamethasone 3264 (TB meningitis adjunct — existing 3264 confirmed correct, was generic_name "corticosteroid_dexamethasone_taper" now "dexamethasone"). Verified-correct unchanged: rifampin 9384, pyrazinamide 8987, ethambutol 4110, rifapentine 35617, moxifloxacin 139462, pyridoxine 684879, bedaquiline 1364504, pretomanid 2198359, linezolid 190376 (all RxNav-verified IN 2026-05-16). SCHEMA-GAP NOTES (logged, not invented): (1) _types.ts has NO first-class field for pretest prior / likelihood ratio / diagnostic-threshold — encoded in severity_triggers, phase purpose/advance_when, RequiredCalculator.guideline_basis, regimen rationale, and the .depth.md LR table; (2) no conditional-dependency graph type; (3) RequiredCalculator.drives enum lacks "diagnostic_gate" — Xpert/IGRA logic carried in phases/triggers; (4) RegimenDrug has no "notes"/"contraindication_rules"/"monitoring" per-drug fields — used "rationale" + axis-level contraindication_rules/monitoring; (5) RequiredInput.kind has no "panel"/"score" — Xpert/IGRA encoded as kind:"lab"; (6) DR-TB regimen modelled as a routing-bridge step (role:"rescue") since the executor lives in id.tb_drug_resistant.v1. PRODUCTION notes: RxCUIs now RxNav-verified/corrected 2026-05-16 — run npm run research:rxnav:validate before relying on combination MIN/SCD dosing automation (ingredient IN CUIs used). Manifest/design_brief pointers unchanged per dispatch scope; registry NOT edited (workup.tb / calc.ckd_epi_2021 / calc.cockcroft_gault / panel.lft/cbc/renal/cardiac/glucose_a1c all confirmed resolvable in clinical-tools-registry.ts).
Entry points (5)
- symptomCough ≥2 weeks + weight loss + drenching night sweats + fever ± hemoptysis — WHO 4-symptom screen (sens ~70-90% for active pulmonary TB; lower in HIV) (WHO TB Module 4 2022)chronic_cough_weight_loss_night_sweats
- imagingUpper-lobe / apical / cavitary / miliary infiltrate on CXR or CT — cavitation raises pretest probability and predicts relapse (ATS/CDC/IDSA 2016 PMID 27516382)apical_or_cavitary_infiltrate
- lab_abnormalityPositive Xpert MTB/RIF Ultra or AFB smear / mycobacterial culture from sputum — Xpert Ultra overall sens ~88% vs culture (Dorman Lancet ID 2018 PMID 29198911)positive_xpert_or_afb_smear
- historyClose contact with infectious TB OR birth/extended residence in a high-burden country — sets the pretest prior (CDC LTBI 2020)tb_exposure_or_endemic_origin
- lab_abnormalityPositive IGRA (QuantiFERON / T-SPOT) or TST in a patient without prior treatment — IGRA preferred if BCG-vaccinated (TST false-positive from BCG) (CDC LTBI 2020)positive_igra_or_tst
Required inputs (24)
- agerequireddemographic • used at CONTEXTWeight-band drug dosing + LTBI risk-benefit; the 4-month rifapentine-moxifloxacin regimen requires age ≥12 yr; pediatric regimens differ (Dorman NEJM 2021 PMID 33951360)
- pregnancy_statusrequireddemographic • used at CONTEXTStreptomycin contraindicated (ototoxic); the 4-month rifapentine-moxifloxacin regimen lacks pregnancy safety data → default to 2HRZE/4HR; pyridoxine mandatory (ATS/CDC/IDSA 2016 PMID 27516382)
- weightrequireddemographic • used at TREATMENTWeight-band dosing — INH 5 mg/kg (max 300 mg), RIF 10 mg/kg (max 600 mg), PZA 25 mg/kg (max 2 g), ETB 15-25 mg/kg; re-dose monthly with weight gain (ATS/CDC/IDSA 2016 PMID 27516382)
- hiv_statusrequiredhistory • used at CONTEXTHIV testing MANDATORY in all TB; HIV alters regimen duration, ART timing (CD4-driven), rifamycin choice, and IRIS risk (ATS/CDC/IDSA 2016 PMID 27516382)
- prior_tb_or_treatmentrequiredhistory • used at CONTEXTPrior treatment is the strongest acquired-resistance risk factor → drives DST urgency and the DR-TB route (WHO TB Module 4 2022)
- mdr_xdr_contactrequiredhistory • used at CONTEXTContact with a known MDR/pre-XDR case → route to id.tb_drug_resistant.v1 for empiric DR regimen pending DST (WHO DR-TB 2022)
- liver_disease_or_alcoholrequiredhistory • used at CONTEXTBaseline hepatic risk for INH/RIF/PZA hepatotoxicity — drives baseline + serial LFT monitoring and a modified regimen if cirrhotic (ATS/CDC/IDSA 2016 PMID 27516382)
- renal_diseasehistory • used at CONTEXTETB and PZA are renally cleared — extend the dosing interval to 3×/week (not dose reduction) if CrCl <30 or on hemodialysis; INH/RIF unchanged (ATS/CDC/IDSA 2016 PMID 27516382)
- visual_baselinerequiredhistory • used at INITIAL_WORKUPBaseline Snellen + Ishihara colour vision before ethambutol (dose-dependent optic neuritis) (ATS/CDC/IDSA 2016 PMID 27516382)
- neuropathy_riskrequiredhistory • used at CONTEXTINH peripheral neuropathy — pyridoxine 25-50 mg/day mandatory; risk amplified in diabetes, HIV, alcohol, pregnancy, malnutrition, CKD (ATS/CDC/IDSA 2016 PMID 27516382)
- diabetes_statushistory • used at CONTEXTDiabetes ~2-3× higher treatment failure / relapse / mortality and slower culture conversion → tighter glycemic control + consider extended continuation (WHO TB Module 4 2022)
- current_medsrequiredmedication • used at CONTEXTRIFAMPIN is a strong CYP3A4/P-gp inducer — collapses levels of PIs/NNRTIs, DOACs, warfarin, hormonal contraceptives, methadone, azoles, corticosteroids; rifabutin substitute for PI-based ART (ATS/CDC/IDSA 2016 PMID 27516382)
- sputum_xpert_mtb_rif_ultrarequiredlab • used at INITIAL_WORKUPRapid molecular diagnosis + simultaneous rifampin-resistance call; Xpert Ultra overall sens ~88% / smear-neg-culture-pos ~63% vs culture; RIF+ → route DR-TB sibling (Dorman Lancet ID 2018 PMID 29198911)
- sputum_afb_smear_culturerequiredlab • used at INITIAL_WORKUPAFB smear ×3 (≥1 early-morning) for infectiousness + culture (gold standard) + phenotypic DST; culture is the reference for cure and the month-2 conversion endpoint (ATS/CDC/IDSA 2016 PMID 27516382)
- igra_or_tstlab • used at INITIAL_WORKUPLatent TB diagnosis — IGRA preferred if BCG-vaccinated (avoids BCG false-positive TST); neither distinguishes LTBI from active disease (CDC LTBI 2020)
- baseline_lftrequiredlab • used at INITIAL_WORKUPBaseline ALT/AST/bilirubin before INH/RIF/PZA; defines the ALT >3× ULN+symptoms / >5× ULN hold threshold (ATS/CDC/IDSA 2016 PMID 27516382)
- baseline_creatininerequiredlab • used at INITIAL_WORKUPeGFR/CrCl for renal interval-extension of ETB and PZA (ATS/CDC/IDSA 2016 PMID 27516382)
- cbcrequiredlab • used at INITIAL_WORKUPBaseline before linezolid (DR-TB sibling) and to track RIF-related cytopenias (WHO TB Module 4 2022)
- hiv_testrequiredlab • used at INITIAL_WORKUPMANDATORY in every TB case — drives ART timing, regimen, rifamycin choice, IRIS surveillance (ATS/CDC/IDSA 2016 PMID 27516382)
- hepatitis_bc_serologylab • used at INITIAL_WORKUPHBV/HCV co-infection multiplies drug-induced hepatotoxicity risk → tighter LFT cadence (ATS/CDC/IDSA 2016 PMID 27516382)
- glucose_a1clab • used at INITIAL_WORKUPDiabetes screen — worse outcomes / slower conversion; affects drug-level monitoring (WHO TB Module 4 2022)
- cxrrequiredimaging • used at INITIAL_WORKUPUpper-lobe / cavitary / miliary pattern; cavitation + positive month-2 culture predicts relapse and extends continuation (ATS/CDC/IDSA 2016 PMID 27516382)
- ct_chestimaging • used at BRANCHING_WORKUPSub-radiographic / miliary / mediastinal-adenopathy disease; tree-in-bud; differentiates malignancy and NTM patterns (ATS/CDC/IDSA 2016 PMID 27516382)
- ecgimaging • used at INITIAL_WORKUPBaseline QTc only if the DR-TB sibling regimen (bedaquiline / moxifloxacin / delamanid) is anticipated (WHO DR-TB 2022)
12-phase flow (12)
- 1FRAMEFrame as subacute, REPORTABLE infectious disease. Differentiate active pulmonary TB vs latent TB infection vs prior-treated; scope is pulmonary DRUG-SUSCEPTIBLE TB + LTBI + diagnosis — DRUG-RESISTANT TB is owned by id.tb_drug_resistant.v1 (route on rifampin resistance / MDR contact). Place patient in airborne (negative-pressure) isolation the moment active pulmonary TB is suspected (WHO TB Module 4 2022; ATS/CDC/IDSA 2016 PMID 27516382)advance: Active vs latent vs prior-treated established AND airborne isolation initiated if active suspected
- 2ENTRYTrigger from cough ≥2 wk + constitutional symptoms (WHO 4-symptom screen), abnormal upper-lobe/cavitary CXR, TB exposure / endemic origin, or a positive screening test (IGRA/TST). Symptom-screen sensitivity for active disease is lower in HIV — image and microbiologically test even if asymptomatic when HIV+ (WHO TB Module 4 2022)inputs: ageadvance: Entry trigger documented
- 3CONTEXTSet the pretest prior (endemicity / exposure intensity / HIV / immunosuppression) and capture the regimen-selection axes: HIV status (mandatory), prior TB/treatment, MDR contact, hepatic disease/alcohol, renal function, pregnancy, diabetes, baseline vision/neuropathy, current meds (rifampin interaction map) (ATS/CDC/IDSA 2016 PMID 27516382)inputs: hiv_status, prior_tb_or_treatment, mdr_xdr_contact, liver_disease_or_alcohol, renal_disease, pregnancy_status, diabetes_status, visual_baseline, neuropathy_risk, current_medsadvance: Pretest prior set + interaction/comorbidity map captured
- 4RED_FLAGSMassive hemoptysis, miliary/disseminated TB, TB meningitis, acute respiratory failure/ARDS, rifampin-resistance signal on Xpert (→ route id.tb_drug_resistant.v1), pregnancy with active disease, severe immunocompromise (WHO TB Module 4 2022)inputs: cxradvance: Emergent management initiated OR no immediate threat
- 5INITIAL_WORKUPDIAGNOSTIC Bayesian gate. Sputum ×3 (≥1 early-morning) for AFB smear + Xpert MTB/RIF Ultra + mycobacterial culture + phenotypic DST; CXR (PA + lateral); MANDATORY HIV test; baseline LFT/Cr/CBC, hepatitis B/C, glucose/A1c; baseline Snellen + Ishihara before ETB; ECG only if DR-TB regimen anticipated. Xpert Ultra rules IN fast (overall sens ~88%, smear-neg-culture-pos ~63%, HIV+ ~90%) but trace-positive specificity (~96%) is below Xpert (~98%) — confirm with culture in low-prior patients; Xpert-RIF-resistant → route id.tb_drug_resistant.v1 (Dorman Lancet ID 2018 PMID 29198911)inputs: sputum_xpert_mtb_rif_ultra, sputum_afb_smear_culture, cxr, baseline_lft, baseline_creatinine, cbc, hiv_test, hepatitis_bc_serologyactions: workup.tb, panel.lft, panel.cbc, panel.renaladvance: Microbiology sent + HIV tested + isolation in place
- 6BRANCHING_WORKUPCT chest if CXR equivocal or to distinguish malignancy/NTM/sarcoid pattern; bronchoscopy + BAL / induced sputum if smear-negative but pretest high; tissue/fluid Xpert + culture + histopathology for extrapulmonary (pleural, nodal, CNS); IGRA/TST for LTBI in contacts; whole-genome sequencing for resistance prediction. NTM if non-cavitary bronchiectatic disease + repeatedly Xpert-negative AFB-positive (route differential — not TB regimen) (ATS/CDC/IDSA 2016 PMID 27516382)inputs: ct_chestactions: panel.glucose_a1cadvance: Targeted confirmatory tests obtained
- 7DIFFERENTIAL§5.5.2 — active pulmonary TB vs LTBI (IGRA/TST+ but asymptomatic, normal CXR, micro-negative) vs NTM (non-cavitary bronchiectasis, Xpert-negative repeated AFB+) vs bacterial CAP (acute, lobar, responds to β-lactam → pulm.cap.core.v1) vs lung cancer (mass, smoker, no micro → onc.lung-cancer.core.v1) vs endemic fungal histo/cocci/blasto (travel/endemic, urine antigen → id.invasive-aspergillosis.core.v1 for invasive-mould overlap) vs sarcoidosis (bilateral hilar adenopathy, non-caseating granulomas, micro-negative → pulm.sarcoidosis.v1) vs lymphoma. Pivots: Xpert Ultra sens/spec, AFB-smear sens, IGRA vs TST in BCG-vaccinated, CXR cavitation/upper-lobe distribution, urine fungal antigen (ATS/CDC/IDSA 2016 PMID 27516382; Dorman Lancet ID 2018 PMID 29198911)advance: Active TB vs LTBI vs alternative-diagnosis category assigned
- 8RISK_STRATIFICATIONRegimen-selection gate. Active DS-TB: standard 6-month 2HRZE/4HR vs the 4-month INH+rifapentine+moxifloxacin+PZA regimen (eligible: age ≥12 yr, weight ≥40 kg, DS pulmonary TB, NOT severe/extensive disease, NOT pregnant, HIV acceptable if CD4 ≥100 on efavirenz-based ART). LTBI: 3HP vs 4R vs 3HR vs legacy 9H by HIV/ART compatibility, hepatic risk, age. Relapse risk: cavitation + positive month-2 culture → extend continuation to 7 mo (total 9). HIV / DM / extensive disease shift toward longer regimens (Dorman NEJM 2021 PMID 33951360; CDC LTBI 2020)inputs: hiv_status, weight, ageactions: calc.ckd_epi_2021advance: Active-vs-LTBI fork resolved + regimen phenotype chosen
- 9TREATMENTDS-TB: 2-month intensive RIPE (INH+RIF+PZA+ETB) → 4-month INH+RIF continuation (2HRZE/4HR, total 6 mo) — drop ETB once pan-susceptibility confirmed; OR the 4-month rifapentine-moxifloxacin regimen for eligible patients. LTBI: 3HP (12-dose weekly INH+rifapentine, DOT/SAT) preferred OR 4R OR 3HR OR 9H if rifamycin contraindicated. Pyridoxine 25-50 mg/day MANDATORY with INH. DOT (or video DOT) for all active disease. HIV co-treatment: start ART within 2 wk if CD4 <50, within 8 wk otherwise; use DTG- or efavirenz-based ART with rifampin (or substitute rifabutin for PI-based ART). DR-TB suspected/confirmed → route id.tb_drug_resistant.v1 (BPaL/BPaLM 6-mo all-oral) (ATS/CDC/IDSA 2016 PMID 27516382; Dorman NEJM 2021 PMID 33951360; CDC LTBI 2020)inputs: weight, baseline_lft, baseline_creatinineadvance: Regimen + DOT + pyridoxine + ART-timing + adverse-effect monitoring plan documented
- 10DISPOSITIONOutpatient DOT if respiratory hygiene maintainable at home, no severe disease, public-health follow-up arranged, and household has no susceptible high-risk contacts (infants, HIV+, immunosuppressed). Admit (negative-pressure isolation) for hemoptysis, miliary/meningeal/disseminated disease, severe immunocompromise, respiratory failure, rifampin-resistance with infection-control risk (→ id.tb_drug_resistant.v1), or an unworkable home DOT plan (ATS/CDC/IDSA 2016 PMID 27516382)advance: Disposition + isolation + DOT plan set + public-health notified
- 11MONITORINGSputum smear + culture monthly until two consecutive negative cultures (the month-2 culture is the key conversion endpoint; positive at 2 mo with cavitation → extend continuation). LFT at baseline then symptom-driven (monthly if hepatic risk/HBV/HCV/HIV/alcohol/pregnancy) — hold INH/RIF/PZA if ALT >3× ULN with symptoms or >5× ULN asymptomatic. Snellen + Ishihara monthly on ETB. Pyridoxine adherence. ART + IRIS surveillance during the first 3 months of ART. Monthly weight for re-dosing. DOT adherence each visit (ATS/CDC/IDSA 2016 PMID 27516382)advance: Culture conversion documented + regimen tolerated
- 12FOLLOWUPEnd-of-treatment CURE assessment per WHO/ATS (clinical + microbiological — culture-negative at end of therapy; treatment completed if doses verified). Close-contact investigation → IGRA/TST + symptom screen + LTBI evaluation/treatment. Mandatory public-health reporting and case closure. Adherence/relapse education; relapse usually within 6-12 mo (highest if cavitary + positive month-2 culture). Long-term follow-up for late toxicity and post-TB lung function (ATS/CDC/IDSA 2016 PMID 27516382; CDC LTBI 2020)advance: Cure/completion documented + contact tracing + reporting complete