{'fraction_non_alphanumeric': 0.03586817746568784, 'fraction_numerical': 0.025614427066709224, 'mean_word_length': 5.159990169574834, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Bidirectional Relationship Between Tuberculosis and Hypothyroidism: An 18-Year Nationwide Population-Based Longitudinal Cohort Study

Some antituberculosis agents may cause hypothyroidism, and thyroid hormones play a vital role in Mycobacterium tuberculosis infection. However, the relationship between tuberculosis (TB) and hypothyroidism has not been clearly established. Therefore, this retrospective, longitudinal cohort study aimed to investigate the association between these two diseases using the 2000–2017 data from the Taiwan's National Health Insurance Research Database. The hypothyroidism and TB cohorts were matched with the control group in a 1:4 ratio. Adjusted hazard ratios (aHRs) were assessed using Cox proportional hazards regression analysis in each cohort. In total, 3,976 individuals with hypothyroidism and 35 120 individuals with TB were included in this study. The risk of developing TB in patients with hypothyroidism was 2.91 times higher than that in those without hypothyroidism (95% confidence interval [CI], 1.50–3.65). The subgroup of thyroxine replacement therapy (TRT) had a 2.40 times higher risk (95% CI, 1.26–3.01), whereas the subgroup of non-TRT had a 3.62 times higher risk of developing TB than those without hypothyroidism (95% CI, 2.19–4.84). On the other hand, the risk of developing hypothyroidism in patients with TB was 2.01 times higher than that in those without TB (95% CI, 1.41–2.38). Our findings provide evidence that TB and hypothyroidism are interrelated. Thus, clinicians and public health authorities should monitor the association between these two diseases to reduce the relevant disease burden.


INTRODUCTION
Tuberculosis (TB) is a severe communicable disease that is among the top 10 causes of death worldwide. According to the World Health Organization, ∼10 million new cases and 1.3 million deaths were reported in 2020. Of all TB cases in 2020, the proportion of adult men, adult women, and children is 56, 33, and 11%, respectively (1). Despite achieving a microbiological cure, many survivors face post-TB sequelae, thus increasing the overall disease burden (2).
Taiwan became an aged society in 2018. There were 16,472 and 7,823 new TB cases in 2005 and 2020, respectively, and the incidence rate decreased from 72.5 to 33.2 per 100,000 population during this period. More than half of the new TB cases occur in the elderly population (age ≥ 65 years) since 2005. Besides, there were 460 TB-related deaths in 2020 and the cumulative reduction between 2005 and 2020 was 53.5 %. Since 2006, the coverage rate of directly observed treatment, short course has reached 100%, and ∼70% of patients with bacteriologicallypositive TB were treated successfully in 2018 (3). Between 2006 and 2013, hypertension (HTN), diabetes mellitus (DM), chronic obstructive pulmonary disease (COPD), cardiovascular disease, and cancer were identified as common comorbidities in patients with TB in Taiwan. The risk of death in patients with TB and any comorbidity was 2.12 times higher than that in those without comorbidities (4). The Taiwan Centers of Disease Control highlights preventive treatment of high-risk individuals and early diagnosis of TB, and the elimination of TB is expected to be completed gradually by 2035, echoing the World Health Organization End TB Strategy (1).
Thyroid hormones modulate various immune system functions, including chemotaxis, phagocytosis, production of reactive oxygen species, and the release of cytokine release (19). Hypothyroidism may have a detrimental effect on the immune system and subsequently make patients vulnerable to infection. Recent studies have shown that thyroid hormone signaling plays a vital role in optimal immune response during Mycobacterium tuberculosis (Mtb) infection (20), which could be related to infection or drug-related hypothyroidism. Thyroid tuberculosis, which has a frequency of 0.1-0.4%, may cause hypothyroidism owing to extensive glandular destruction due to caseous necrosis (21). Infectious agents have been reported to trigger autoimmune thyroid diseases by possible mechanisms including molecular mimicry theory and bystander activation theory (22). Rifampin increases T4 clearance, possibly because of enhanced hepatic T4 metabolism and biliary excretion of iodothyronine conjugates. Vaidya (16) and Montanelli (17) reported that rifampin causes primary hypothyroidism and there were few case reports of rifampin-induced hypothyroidism, and most of them had underlying Hashimoto's Thyroiditis, and some of them without underlying thyroid disease. Prior systemic review and metaanalysis showed that ethionamide and para-aminosalicylic acid were the most frequently reported drugs associated with the occurrence of hypothyroidism (23) and these drugs can cause hypothyroidism by inhibiting thyroid hormone synthesis through a mechanism of iodine organification inhibition (24,25).
These studies may partially explain the causal relationship between TB and hypothyroidism; however, evidence from longitudinal analysis is lacking. Therefore, we conducted a bidirectional, nationwide, population-based cohort study to investigate the association between TB and hypothyroidism.

Data Source
In 1995, the Taiwanese government adopted the National Health Insurance (NHI) programme, which covers the healthcare data of more than 99% of Taiwanese residents (26). The data analyzed in this study were obtained from the National Health Insurance Research Database (NHIRD). The Longitudinal Health Insurance Database 2005 (LHID2005) (27), which contains the original claims data for 2,000,000 patients randomly sampled from the NHI enrollees registered in 2005 (28).
Previous studies have reported that the data of the LHID are representative of the entire Taiwanese population, and the accuracy of the disease diagnoses have been validated (29)(30)(31). Personal identification information from the claims data was encrypted and anonymized to protect the privacy and security of the patients (27). This study was approved by the Institutional Review Board of the Tri-Service General Hospital (approval number B-111-01).

Study Design and Population
To analyze the bidirectional relationship between hypothyroidism and TB, this study had two main purposes. Diagnoses of both diseases were designated using the International Classification of Disease, 9th Revision, Clinical Modification (ICD-9-CM) codes for the 2000-2015 period and the ICD-10-CM codes for the 2016-2017 period.
For purpose 1, we included patients with hypothyroidism (ICD-9: 243-244, ICD-10: E00, E01.8, E02-E03, E89.0) aged >20 years who had at least three outpatient visits or one hospitalization registered in the LHID2005 between 2000 and 2017. The index date was defined as that on which a new diagnosis of hypothyroidism was made. The exclusion criteria were as follows: history of hypothyroidism before the index date, TB before tracking and without tracking, age <20 years, and unknown sex. For purpose 2, we used validated inclusion criteria for TB patients by ICD-9 code of 010-018 and ICD-10 code of A15-A19 plus prescription of at least two anti-TB drugs (e.g., isoniazid, ethambutol, rifampin, pyrazinamide) for 4 weeks within 180 days of TB diagnosis (32) registered in the LHID2005 between 2000 and 2017. TB outside of the lung, such as the lymphatic system, bones and joints, liver, central nervous system, genitourinary, etc., is called extra-pulmonary TB. Miliary TB is classified as extra-pulmonary TB if the patient has no lesions in the lungs. If the patient has both pulmonary and extra-pulmonary TB, the patient is classified as pulmonary TB (33). The exclusion criteria were similar to purpose 1. Fourfold propensity score matching (34) was employed to match the above mentioned study cohorts with the control cohorts selected from the LHID2005 by sex, age, comorbidities, and index date. A flowchart of the selection of study participants is shown in Figure 1.
To further assess the association between TRT and the TB risk in patients with hypothyroidism, subgroup analyses were conducted stratified of data by the duration of TRT (6 weeks−3 months, 3 months−1 year, and ≥1 year). The TRT group was defined as the patients with hypothyroidism who had received levothyroxine sodium prescription for at least 6 weeks during the study period. The non-TRT group included patients with hypothyroidism who had never received levothyroxine sodium prescription or had been on medication for <6 weeks during the study period. The ICD and Anatomical Therapeutic Chemical codes used in this study are presented in Supplementary Table S1.

Outcomes and Follow-Up
The endpoints of this study were new diagnoses of TB (purpose 1) and hypothyroidism (purpose 2). The definitions of new TB and hypothyroidism cases were the same as the inclusion criteria mentioned above. In Taiwan, clinicians must report new TB cases to the Taiwan Centers for Disease Control within seven days and submit the final histopathology and TB culture results for document review and medical reimbursement. In addition, the high accuracy of TB diagnoses in the LHID has been validated previously (32). The follow-up period was defined as the time interval from the index date to the diagnosis of TB (purpose 1) or hypothyroidism (purpose 2), 31 December, 2017, or withdrawal from the NHI programme, whichever occurred first.

Demographic Variables and Comorbidities
Data on demographic variables, including sex, age, insurance premium, and urbanization level, were collected.

Statistical Analysis
The chi-square test was used to compare the differences in categorical variables between the two purpose and control groups. An independent-samples t-test was used for continuous variables. The cumulative risks for TB (purpose 1) and hypothyroidism (purpose 2) were computed using the Kaplan-Meier method, and the log-rank test was used to compare differences between the curves. The incidence rate was calculated per 1000 person-years. The hazard ratios and 95% CI were calculated using the multivariable Cox proportional hazards regression analysis, which was adjusted for sex, age, insured premium, comorbidities, and urbanization level. We further evaluated the interaction effect of hypothyroidism and comorbidities on the risk of TB. All statistical analyses were performed using IBM SPSS Statistics for Windows, version 22.0 (IBM Corp., Armonk, NY, USA), and a two-tailed P-value <0.05 was considered statistically significant.

Baseline Characteristics of the Patients in the Study
After 1:4 propensity score matching for sex, age, comorbidities, and index date, we identified 3,976 patients in the hypothyroidism cohort, 15,904 patients in the nonhypothyroidism cohort, 35,120 patients in the TB cohort, and 140,480 patients in the non-TB cohort (Figure 1). Between two purposes and control cohorts, baseline characteristics showed no significant differences in sex, age, and comorbidities ( Table 1).

Purpose 1: Hypothyroidism and the Risk of Developing TB
Female was predominated (64.2%) in the purpose 1 and more than half of the participants were age <65 years. At the time of diagnosis of TB, the hypothyroidism cohort had a higher prevalence of DM, HTN, hyperlipidemia, IHD, cancer, COPD, stroke, and CKD than the non-hypothyroidism cohort (Supplementary Table S2). The mean follow-up periods in the hypothyroidism and non-hypothyroidism cohorts were 10.64 and 10.85 years, respectively (Supplementary Table S3). The mean duration before TB development were 7.74 and 8.25 years in the hypothyroidism and non-hypothyroidism cohorts, respectively (Supplementary Table S4).
Multivariate Cox proportional hazard analysis revealed that the hypothyroidism cohort has a significantly higher risk of developing TB than the non-hypothyroidism cohort ( Table 2). Furthermore, the hypothyroidism cohort exhibited a significantly higher risk for TB, considering nearly all variables, i.e., male sex, all age groups, comorbidities (except for congestive heart failure and cancer), and urbanization level (except for level 3). Table 3 demonstrated an interaction effect between hypothyroidism and comorbidities including DM (aHR = 3.46, 95% CI 2.25-4.01) and COPD (aHR = 4.33, 95% CI 2.35-6.11) on the risk of developing TB. At the end of the followup period, the hypothyroidism cohort had a higher cumulative risk for TB than those in the non-hypothyroidism cohort (Figure 2A).
The hypothyroidism cohort was stratified according to the duration of TRT ( Table 4). Patients with hypothyroidism who had never received TRT during the study period had a 3.62 times higher risk of developing TB than those without hypothyroidism. In the TRT group, the highest risk occurred in the treatment period lasting from 6 weeks to 3 months. The hypothyroidismlinked TB risk may be attenuated gradually by long-term TRT. There was no significant difference between the groups in the treatment categories with ≥1-year treatment period. The hypothyroidism cohort had a significantly higher aHR for TB during the follow-up periods of <3 months, 3-6 months, 6-12 months, and 1-5 years than the non-hypothyroidism cohort ( Table 6).

Purpose 2: TB and the Risk of Developing Hypothyroidism
Male was predominated (56.9%) in the purpose 2 and more than half of the participants were age ≥ 65 years. At the time of diagnosis of TB, the TB cohort had a higher prevalence of DM, HTN, hyperlipidemia, and IHD than the non-TB cohort (Supplementary Table S2). The mean follow-up periods in the TB and non-TB cohorts were 10.89 and 10.97 years, respectively (Supplementary Table S3). The mean period before hypothyroidism development was 7.30 years in the TB cohort and 8.18 years in the non-TB cohort (Supplementary Table S4).
According to the multivariate Cox proportional hazard analysis, the aHR for the risk of developing hypothyroidism was 2.01 times higher in the TB cohort than in the non-TB cohort ( Table 2). After adjusting for variables, patients with comorbidities (DM, HTN, hyperlipidaemia, IHD, COPD, stroke, CKD, HIV, and cirrhosis) in the TB cohort had a significantly higher aHR for hypothyroidism than those in the non-TB cohort. The TB cohort had a significantly higher cumulative risk of developing hypothyroidism than the non-TB cohort at the end of the follow-up period (Figure 2B).
The subgroup analysis showed that patients with pulmonary TB and extra-pulmonary TB have a significantly higher aHR for developing hypothyroidism than those without TB ( Table 5). Furthermore, the TB cohort had a significantly higher aHR for hypothyroidism in the follow-up periods of <3, 3-6, 6-12 months, and 1-5 years than the non-TB cohort ( Table 6).

DISCUSSION
To the best of our knowledge, this is the first longitudinal, nationwide, population-based cohort study to investigate the bidirectional relationship between hypothyroidism and TB. We found that patients with hypothyroidism have a 2.91 times higher risk of developing TB than those without hypothyroidism, and that patients with TB have a 2.01 times higher risk of developing hypothyroidism than that those without. Although the pathophysiological association between hypothyroidism and tuberculosis remains unclear, several hypotheses have been proposed.
In our data, hypothyroidism was predominated in the female (64.2%). But male with hypothyroidism had a higher risk of TB development, especially in the age ≥45 years. Besides, the higher urbanization level 1 and 2 also had an impact on TB development. We proposed some explanations for these interesting findings. First, previous studies revealed that male and old age were the risk factors of TB development (35,36). Testosterone can impair macrophage activation and decrease the production of proinflammatory cytokines, which may increase the susceptibility to Mtb infection. In contrast, estrogen can enhance macrophage activation and induce proinflammatory cytokines, which provide protection against Mtb infection (37). Second, a modeling study in Taiwan showed that immune senescence played an important role in the age disparity between children and elders, which means patients with latent TB infection have an increased risk of developing TB as they age due to a weakening immune system with older age (38). Third, TB is a disease whose transmission is favored by the density of urban populations (39). Taiwan has seen rapid growth in living standards and nationwide coverage of high-quality, publicly funded healthcare services (28). Due to the patient preference, better service quality, increased geographic accessibility, better community awareness, and access to better diagnostics and treatment, the TB case notification rates are higher in urban areas than in rural areas (39). Our findings are compatible with the above explanations.
In Taiwan, more than half of the new TB cases occur in the elderly population (age ≥ 65 years) since 2005 (3) and it can be seen in our TB cohort. In general concept, hypothyroidism development is much more common in female than male, and the incidence rate increase with age (40). However, these findings were not seen in our study. We think there may be other possible causes, with drug-induced hypothyroidism being one of the most likely, and additional study is needed in the future. Besides, this study also showed that patients with hypothyroidism have an interaction effect with comorbidities including DM and COPD toward the risk of developing TB. Individual links between TB and these two comorbidities among the general population are well established among papers (41). This demonstrates a relationship between hypothyroidism and DM and COPD and how all these interrelations remain unexplored.
Previous studies have demonstrated that serum triiodothyronine (T3) and thyroxine (T4) modulate specific immune responses, including innate and adaptive immune responses, which change significantly during aging and in cases of hypothyroidism. The dysregulation of innate and adaptive immune responses may subsequently increase susceptibility to infection (42)(43)(44). A recent population-based cohort study showed that patients with hypothyroidism were associated with a risk of pneumonia. In addition, the use of TRT (>30 days) can attenuate the hypothyroidism-linked pneumonia risk (45). However, there was no evidence or mechanism to explain the TB-linked hypothyroidism. In a rabbit Mtb infection model, defective production of thyroid hormones increased susceptibility to Mtb infection (46). Furthermore, T3 and T4 restricted Mtb growth in human monocyte-derived macrophages through interleukin-1α production; therefore, young, healthy household contacts of patients with TB with a decreased production of T4 at baseline have an increased risk of developing active TB (20). Our findings strengthen the evidence that patients with hypothyroidism have an increased risk of developing TB. The non-TRT group showed a significantly higher risk of developing TB, especially pulmonary TB, than the non-hypothyroidism cohort. Additionally, we found that long-term TRT (>1 year) may decrease the risk of developing TB, which supports the findings of a previous study (20). Further prospective cohort studies to evaluate the association between TRT and the risk of TB are warranted. In our study, patients with TB, pulmonary TB, or extrapulmonary TB had a significantly higher risk of developing hypothyroidism than those without TB. However, the results of previous, similar studies (20,47) have been controversial. Kleynhans investigated the changes in the immune system during treatment for TB in patients who were cured and in those in whom it failed. They found that T3 concentrations increase during TB infection, whereas T4 concentrations remain unchanged in the failed group. T4 concentrations were lower in the cured group after 6 months of TB treatment than in the failed group. T4 plays a critical role in Mtb infection and may be a potential biomarker to differentiate treatment outcomes (47). Recently, T3 and T4 concentrations were reported to be elevated in TB progressors (healthy household contacts developing TB during the follow-up period) after 6 months of TB treatment, although T4 concentrations decreased in treated TB progressors 3 years after TB treatment (20). Although previous studies have demonstrated an association between TB and thyroid hormone levels, our findings reinforce that TB is a risk factor for hypothyroidism.
Moreover, we observed that the TB and hypothyroidism cohorts have a higher risk for hypothyroidism and TB,  (20). These may be the reasons for the short-term risk of both diseases. Second, Mtb infection may trigger autoimmune reactions by molecular mimicry of Mtb antigens with human proteins (51) and infection may subsequently result in autoimmune thyroid diseases (22). Third, asymptomatic populations of hypothyroidism and TB may result in delayed diagnosis. And finally, genetic polymorphism plays a major role in the progression to active TB (52) and two single nucleotide polymorphisms in immune-and inflammationrelated genes (interleukin-6 rs2066992 and rs1524107) increased the risk of active TB (53). In addition, interleukin-6 can inhibit thyroid function in vivo (54,55). The relationship between the long-term risk of TB and hypothyroidism may involve complex interactions between genes, cytokines, and the immune system, and additional studies are warranted to elucidate these mechanisms. Our study had some limitations. First, we were unable to analyze the type or disease severity of hypothyroidism and TB in both cohorts because of the lack of symptoms and the absence of associated laboratory data, such as concentrations of thyroid-stimulating hormone, free T4, T3, or anti-thyroid peroxidase antibodies, in the NHIRD. Second, similar to issues with all electronic health databases, there can be problems related to coding errors and deliberate upcoding. Although previous studies have demonstrated high accuracy and validity for ICD-9-CM-based LHID disease identification (27,(29)(30)(31), we sought to reduce misclassification bias with a stricter definition of hypothyroidism and TB (29). On the other hand, we may underestimate the populations of asymptomatic subclinical hypothyroidism. Third, clinicians did not routinely examine chest radiography scans and thyroid functions in either cohort, which might have resulted in underdiagnosis. Fourth, although we adjusted for the latent variables in the table, there might have been unknown or unmeasured confounding biases. Fifth, although rifampin, ethionamide and para-aminosalicylic acid were the possible cause of hypothyroidism (16,17,23), we did not perform an analysis of these drugs. Additional research should be performed in the future.
In conclusion, the current study revealed a bidirectional relationship between TB and hypothyroidism. Patients with hypothyroidism showed a 2.91-fold higher risk of developing TB than the general population, especially those combined with DM or COPD. The hypothyroidism-linked TB risk may be attenuated by long-term TRT. Physicians should be aware of the risk of developing hypothyroidism when treating patients with TB. We recommend that public health authorities should conduct surveillance for both diseases to reduce the associated disease burden.

DATA AVAILABILITY STATEMENT
The data analyzed in this study is subject to the following licenses/restrictions: The data on the study population that were obtained from the NHIRD are maintained in the NHIRD. The National Health Research Institutes (NHRI) is a nonprofit foundation established by the government. Only citizens of Taiwan who fulfill the requirements of conducting research projects are eligible to apply for access to the NHIRD. The use of the NHIRD is limited to research purposes only. Applicants must follow the Computer-Processed Personal Data Protection Law and the related regulations of the National Health Insurance Administration and NHRI, and an agreement must be signed by the applicant and their supervisor upon application submission. All applications are reviewed for approval of data release. Requests to access these datasets should be directed to https:// nhird.nhri.org.tw/.

ETHICS STATEMENT
The studies involving human participants were reviewed and approved by Institutional Review Board of the Tri-Service General Hospital (approval number: B-111-01). Written informed consent for participation was not required for this study in accordance with the national legislation and the institutional requirements.

AUTHOR CONTRIBUTIONS
L-TC, C-CS, S-HW, and S-ET contributed to conception and design of the study. C-HC and W-CC organized the database and performed the statistical analysis. L-TC wrote the first draft of the manuscript. C-KP, S-HW, and S-ET wrote sections of the manuscript. L-TC, S-YW, G-JW, C-HT, C-AS, and S-ET were responsible for the critical revision of the manuscript for important intellectual content. All authors read and approved the final manuscript.