--- license: cc-by-nc-4.0 language: - en tags: - healthcare - respiratory - infectious-disease - tuberculosis - mdr-tb - xdr-tb - drug-resistance - hiv-coinfection - who-tb - synthetic-data - ehr - clinical pretty_name: "HC-RES-004 Tuberculosis Synthetic Dataset (Sample)" size_categories: - n<1K task_categories: - tabular-classification - tabular-regression - survival-analysis --- # HC-RES-004 — Tuberculosis Synthetic Dataset (Sample) **XpertSystems.ai · Synthetic Data Factory · Respiratory Vertical** The fourth SKU in the XpertSystems **Respiratory** vertical: a globally-calibrated synthetic tuberculosis cohort spanning the full resistance spectrum — **drug-susceptible (DS-TB), multidrug-resistant (MDR-TB), pre-extensively (Pre-XDR-TB), extensively drug-resistant (XDR-TB), and latent (LTBI)**. It covers diagnosis & molecular testing (GeneXpert, LPA, WGS, smear/culture), an 11-drug resistance profile with MIC proxies, regimen selection (including BPaL/BPaLM and STREAM short-course), adherence & DOT, sputum-conversion bacteriology, WHO-defined treatment outcomes, HIV co-infection, household contact investigation, population PK/PD (NAT2, QTc), and health-system context. This repository contains a **500-row, single-seed sample**. The full commercial product scales to 20,000+ patients with CSV / Parquet / JSON delivery. - **SKU:** HC-RES-004 - **Sample size:** 500 patients × 138 columns - **License (sample):** CC-BY-NC-4.0 — commercial license available for the full product - **Contact:** pradeep@xpertsystems.ai · https://xpertsystems.ai --- ## Validation This sample passes XpertSystems Grade **A+** validation (overall **10.000 / 10**) with deterministic reproduction across all six canonical seeds `[42, 7, 123, 2024, 99, 1]`. Validation philosophy: **structural identities over distribution-fit tests** — anchored by the resistance-severity gradient (treatment success falls and mortality rises monotonically from DS-TB through XDR-TB) and drug-resistance cascade integrity (DS-TB background isoniazid susceptibility ≥94%). This engine also passes its own built-in ~16-check benchmark suite (WHO type distribution, type-specific success rates, sputum conversion, LTFU, resistance epidemiology, adherence, HIV). ### Calibration anchors | Metric | Sample value | Target range | Source | |---|---|---|---| | DS-TB prevalence | 59.8% | 55–70% | WHO Global TB Report 2023 (~62%) | | MDR-TB prevalence | 20.6% | 15–25% | WHO (~20%) | | DS-TB treatment success | 87.6% | 80–92% | WHO (~85%) | | MDR-TB treatment success | 49.5% | 48–68% | Lancet MDR-TB meta-analysis (~57%) | | DS-TB 2-month culture conversion | ~74% | 68–88% | WHO/STREAM | | Loss-to-follow-up rate | 17.8% | 10–24% | Lancet meta-analysis | | Mean overall adherence | 74.1% | 70–88% | TB program data | | HIV-TB co-infection | 8.0% | 4–18% | WHO 2023 | | Hospitalization rate | 40.0% | 25–55% | TB inpatient utilization | | INH resistance (whole cohort) | 37.2% | 25–45% | WHO 2022 (incl. MDR/XDR) | | RIF resistance (whole cohort) | 37.6% | 20–40% | WHO 2022 | | **DS-TB background INH-susceptibility** | **99.7%** | **≥0.94** | Cascade integrity | | **Success gradient (DS − XDR)** | **+0.59** | **≥0.20** | Resistance-severity ordering | | **Mortality gradient (XDR − DS)** | **+0.37** | **≥0.08** | Resistance-severity ordering | | **Column count** | **138** | **≥132** | Schema completeness (11 modules) | Observed severity gradient across the full spectrum (success / mortality): DS-TB 0.87 / 0.02 → MDR-TB 0.55 / 0.10 → Pre-XDR-TB 0.38 / 0.21 → XDR-TB 0.37 / 0.25. --- ## Schema highlights by module (138 columns) **Demographics.** Region (burden-stratified), ethnicity, sex, age, pediatric flag, SES, household crowding, ventilation quality. **Classification & diagnosis.** TB type, anatomical site, lineage, prior-TB, smear grade, culture, GeneXpert MTB/RIF, line-probe assays (first/second line), WGS, diagnostic & health-system delays, IGRA/TST, chest X-ray pattern, cavitation, diagnostic platform. **Drug resistance.** 11-drug susceptibility (INH, RIF, EMB, PZA, FLQ, BDQ, LZD, CFZ, DLD, PA, CS), WHO resistance category, primary vs acquired, mutation-catalog tier, MIC proxies. **Treatment.** Type-specific regimen (incl. BPaL/BPaLM, STREAM short-course), planned duration, DOT type, fixed-dose combination, dose adjustment, weight-based drug doses, initiation delay. **Adherence.** Overall / intensive / continuation-phase adherence, doses missed, interruptions (duration & reason), LTFU & timing, pill-count ratio, counseling, support program, adverse-event severity. **Bacteriology.** 2-/5-month culture & smear conversion, conversion timing, 6-month smear series, relapse (timing, reinfection-vs-relapse by WGS), acquired resistance during treatment. **Clinical outcome.** WHO outcome (Cured/Completed/Failed/LTFU/Died), actual duration, BMI & malnutrition, hospitalization & ICU, grade 3-4 adverse events (hepatotoxicity, neuropathy, QTc, visual, myelosuppression, hearing loss), failure/death timing & cause, treatment cost, catastrophic cost flag. **HIV co-infection.** Status, CD4, ART status/regimen/timing, cotrimoxazole, TB-IRIS, viral suppression, opportunistic infection. **Contact investigation.** Household contacts, screening, secondary attack rate, contact LTBI/active TB, LTBI treatment cascade, transmission cluster (WGS, SNP distance). **Pharmacokinetics.** NAT2 acetylator status, rifampicin/isoniazid/bedaquiline/linezolid PK, QTcF baseline & on-treatment, CYP3A4 interaction, exposure quartile, hepatotoxicity score. **Health system.** Facility level, TB program type, notification channel, distance & transport cost, food/social support. --- ## Files - `hc_res_004_sample.csv` — 500-patient sample (138 columns) - `generate_sample_dataset_hc_res_004.py` — reproducible generator + validation harness - `validation_report.json` / `validation_report.md` — full scorecard - `sweep_summary.json` — 6-seed determinism results ## Loading ```python import pandas as pd df = pd.read_csv("hc_res_004_sample.csv") print(df[["patient_id","tb_disease_type","drug_resistance_category", "treatment_regimen","treatment_outcome","hiv_status"]].head()) ``` ```python from datasets import load_dataset ds = load_dataset("csv", data_files="hc_res_004_sample.csv") ``` ## Use cases - TB treatment-outcome prediction across the resistance spectrum - Drug-resistance classification from molecular diagnostics (GeneXpert / LPA / WGS) - Adherence / LTFU risk modeling and DOT-strategy evaluation - HIV-TB co-infection management analytics - Contact-investigation and transmission-cluster modeling - Health-economics (catastrophic-cost, program-type) analysis - ML training where real global TB program data is access-restricted --- ## Honest limitations & disclosed generator behavior This is a strongly calibrated single-table engine (passes its own ~16-check suite; correct resistance-severity gradient). Standard caveats and minor specifics: 1. **Cross-sectional episode-level table.** Like the pneumonia SKU (HC-RES-003), each row is one TB episode; the monthly smear series is encoded as a pipe-delimited string field rather than a separate longitudinal table. 2. **Latent linezolid-neuropathy switch is inert.** In the outcome module, the linezolid-related neuropathy escalation checks the disease type string rather than the regimen, so peripheral neuropathy is generated at its base rate (~12%) regardless of whether linezolid is in the regimen. This does not affect any benchmark but means LZD-specific neurotoxicity is not modeled; use the PK `linezolid_trough_ug_ml` field if LZD exposure is needed. 3. **Outcome weights are largely type-conditioned.** For Pre-XDR/XDR/LTBI the WHO outcome distribution is applied directly by type; DS/MDR additionally shift on adherence and conversion. Individual outcomes are therefore well-calibrated at the cohort level but not fully driven by each patient's complete feature vector. 4. **Some flags are marginal draws.** Several adverse-event and contact-cascade fields are drawn at fixed prevalences rather than jointly conditioned. General caveat: cross-field correlations beyond those explicitly modeled may be weaker than in real cohorts. **Not for clinical decision-making** — research/development use only. --- ## Commercial product comparison | Capability | This sample | Full HC-RES-004 product | |---|---|---| | Patients | 500 | 20,000+ (configurable) | | Seeds / cohorts | 1 | Multi-seed, reproducible | | Formats | CSV | CSV + Parquet + JSON | | Smear trajectory | Pipe-delimited string | Optional longitudinal table | | LZD neurotoxicity | Base-rate only | Regimen-linked model | | Outcome model | Type-conditioned | Full feature-driven | | License | CC-BY-NC-4.0 | Commercial | | Support & SLA | — | Included | Full product, custom cohorts, or other respiratory SKUs (asthma, COPD, pneumonia, ILD): **pradeep@xpertsystems.ai** --- ## Citation ```bibtex @dataset{xpertsystems_hc_res_004_2026, title = {HC-RES-004: Tuberculosis Synthetic Dataset}, author = {XpertSystems.ai}, year = {2026}, publisher = {XpertSystems.ai Synthetic Data Factory}, url = {https://xpertsystems.ai}, note = {Synthetic; CC-BY-NC-4.0 (sample). Calibrated to: WHO Global TB Report 2023 (type distribution, treatment success, HIV co-infection); STREAM trial (short-course MDR-TB); TB-PRACTECAL and ACTG A5279 (BPaL/BPaLM, 1HP); Lancet MDR-TB individual-patient-data meta-analysis (success/LTFU); WHO 2022 mutation catalogue and drug-resistance definitions. Fourth SKU in the XpertSystems Respiratory vertical.} } ``` *Synthetic data generated by XpertSystems.ai. Not derived from real patient records. Not for clinical use.*