Introduction
The mental health and well-being of medical staff have been largely neglected, despite mounting evidence of significant psychological burdens (McFarland et al., Reference McFarland, Hlubocky and Riba2019; Harvey et al., Reference Harvey, Epstein, Glozier, Petrie, Strudwick, Gayed, Dean and Henderson2021). Studies have consistently shown higher prevalence rates of mental health problems among physicians compared to age-matched controls (Baker et al., Reference Baker, Warren, Abelson and Sen2017; McFarland et al., Reference McFarland, Hlubocky and Riba2019). For example, a landmark systematic review and meta-analysis in 2015 revealed a pooled prevalence of depression or depressive symptoms of 28.8% across 54 studies (Mata et al., Reference Mata, Ramos, Bansal, Khan, Guille, Di Angelantonio and Sen2015). Subsequent research reported even higher rates of psychological issues, particularly during the Coronavirus Disease 2019 (COVID-19) pandemic (Khatun et al., Reference Khatun, Parvin, Rashid, Alam, Kamrunnahar, Talukder, Rahman Razu, Ward and Ali2021; Adams et al., Reference Adams, Le, Alaverdashvili and Adams2023). Commentaries, such as those by Epstein and Privitera, have highlighted the alarmingly high rates of depression and anxiety disorders among physicians and the insufficient efforts to address these issues (Epstein and Privitera, Reference Epstein and Privitera2019). Beyond documenting prevalence, it is imperative to identify the risk factors contributing to mental health challenges among medical staff to inform effective interventions.
Primary healthcare workers (PHWs), a critical yet underexamined group within the healthcare workforce, are especially vulnerable to being overlooked. By the end of 2023, China’s PHW workforce comprised 4.953 million individuals, representing 32.5% of the country’s medical personnel (National Health Commission of China, 2024). PHWs play an essential role in China’s healthcare system, delivering accessible and community-based healthcare, including both medical and public health services (Li et al., Reference Li, Krumholz, Yip, Cheng, De Maeseneer, Meng, Mossialos, Li, Lu and Su2020). During the COVID-19 pandemic, they were pivotal in vaccination campaigns, epidemiological investigations, and routine nucleic acid testing (Qian et al., Reference Qian, Huang, Zhao, Cheong, Cao, Xiong and Zhu2022). Despite their significance, nationwide studies on the mental health of PHWs in China remain scarce. While international research has documented anxiety and depression among PHWs in countries like Brazil and Turkey (de Souza Julio and Lourenção, Reference de Souza Julio and Lourenção2021; Akova et al., Reference Akova, Hasdemir and Kiliç2021), such studies are limited in China, particularly regarding comparisons between urban and rural areas.
Urban–rural disparities in healthcare resource distribution in China create distinct challenges for PHWs. Rural areas often face inadequate transportation, poor living conditions, and limited career development opportunities, contributing to unique stressors that may adversely affect PHWs’ mental health (Wang et al., Reference Wang, Zhu, Huang, Wong and Xue2023). Conversely, urban PHWs often encounter intense work pressures, including workplace conflicts and incidents of verbal and physical abuse (Lafta and Falah, Reference Lafta and Falah2019; Zhang et al., Reference Zhang, Luo, Chen, Min and Fang2016). These contrasting conditions underscore the importance of examining the mental health risk factors of PHWs across urban and rural settings to develop targeted interventions.
This study aims to identify key factors influencing mental health challenges among PHWs in China. The conceptual framework is grounded in the Job Demand–Control–Support model and the Social Ecological Model, which emphasize that adequate workplace support plays a critical role in mental well-being, and that health outcomes are influenced by interacting factors across individual, interpersonal, community, and organizational levels (van der Doef and Maes, Reference van der Doef and Maes1999; Golden and Earp, Reference Golden and Earp2012). Guided by these frameworks and current research, we proposed five dimensions that have been reported to be associated with depression and anxiety among healthcare workers: individual factors (e.g., sex, age), family relations (e.g., living arrangement, marital status), work-related factors (e.g., workload, occupational category), occupational satisfaction (e.g., organizational support), and health factors (e.g., self-rated health, health behaviors) (Chan and Huak, Reference Chan and Huak2004; Wong et al., Reference Wong, Yau, Chan, Kwong, Ho, Lau, Lau and Lit2005; Bovier et al., Reference Bovier, Arigoni, Schneider and Gallacchi2009; Brower and Riba, Reference Brower and Riba2017; Moutier, Reference Moutier2018; Alsubaie et al., Reference Alsubaie, Temsah, Al-Eyadhy, Gossady, Hasan, Al-Rabiaah, Jamal, Alhaboob, Alsohime and Somily2019; Elbay et al., Reference Elbay, Kurtulmuş, Arpacıoğlu and Karadere2020). By addressing these factors, this study seeks to provide policymakers with critical data to establish mental health assessments for PHWs, raise societal awareness, and offer insights for global innovations in mental health policies tailored to primary care.
Methods
Study design and participants
From May 1 to 31 October 2022, a nationwide survey was conducted across all 31 provinces of mainland China using a stratified four-stage random sampling method. Taiwan, Macao, and Hong Kong were excluded due to their distinct healthcare systems. The study first selected all 31 provinces and municipalities as sampling units. Within each province, one capital city and one administrative city were chosen. We chose a provincial capital city and an administrative city because the former can often represent a higher level of economic development in the province, while the randomly selected latter is often more general. During the actual implementation process, some cities refused to participate in the survey. To cope with this situation, we formed a new city sampling frame according to the principle of ‘difference in per capita GDP, population, and urbanization rate <5%’ and conducted re-sampling to replace the originally selected cities. Thirty-one capital cities and 31 administrative cities were selected. For urban samples, a community health center (CHC) and its affiliated stations were randomly selected in each capital city. For rural samples, one township hospital and its associated village clinics were selected in each administrative city. In the four municipalities of Beijing, Shanghai, Tianjin, and Chongqing, an additional CHC was chosen from both urban and suburban areas. Practical feasibility was considered alongside randomness to ensure accessibility to the selected CHCs or hospitals.
Due to urbanization, some township hospitals were reclassified as CHCs, and these facilities were included in the study. Overall, the survey covered 44 CHCs and 18 township health centers from 27 provinces and 4 municipalities. Eligible participants, including family physicians, nurses, public health professionals, pharmacists, and other medical staff working at these facilities, were all invited to participate in this survey. A total of 4,021 PHWs were included and 3,769 valid responses were used in the analysis (Figure S1).
Measures and covariates
Mental health outcomes were assessed using validated measures. Depression symptoms were evaluated using the nine-item Patient Health Questionnaire (PHQ-9), with responses scored on a four-point Likert scale ranging from 0 (‘not at all’) to 3 (‘nearly every day’). Total scores ranged from 0 to 27, with higher scores indicating more severe symptoms. A cut-off score of 10 demonstrated high sensitivity (88%) and specificity (88%) for detecting major depression in medical populations. Anxiety symptoms were measured using the Generalized Anxiety Disorder (GAD-7) scale, which employs the same four-point Likert scale. A cut-off score of 10, based on Kroenke et al., yielded sensitivity and specificity of 89% and 82%, respectively, for GAD.
Participants provided detailed socio-demographic information, including sex, age, education level, household registration, monthly income, marital status, and living arrangements. Data on health and well-being included after-work exercise frequency, the presence of chronic conditions or physical disabilities, and self-rated health status. Work-related variables included professional rank, occupational category, practice location, years of employment, and self-rated work intensity. Occupational satisfaction was assessed on a three-point Likert scale, capturing perceptions of team support, organizational support, and overall satisfaction.
Statistical analysis
Descriptive statistics were calculated to summarize participant characteristics, stratified by urban and rural groups, using R software (version 4.2.3). Categorical variables were expressed as frequencies and percentages, and chi-square tests were used to assess differences between groups. A two-sided P-value of less than 0.05 was considered statistically significant. To evaluate potential multicollinearity among risk factors, tolerance values and Variance Inflation Factors (VIF) were computed using the car package in R.
The Bayesian Additive Regression Tree (BART) model, implemented in the bartMachine package, was employed to identify key factors of anxiety and depression (Bleich and Kapelner, Reference Bleich and Kapelner2014). This machine learning approach is well-suited for detecting complex, non-linear relationships among variables and includes an integrated imputation mechanism for missing data (Chipman et al., Reference Chipman, George and McCulloch2010; Hill, Reference Hill2011). In addition, several studies have provided evidence that BART exhibits better predictive performance compared with many competing machine learning approaches, including Lasso, random forests, boosting models, and neural networks (Chipman et al., Reference Chipman, George and McCulloch2010; Hill, Reference Hill2011; Hu et al., Reference Hu, Liu, Ji and Li2020). The model’s Variable Inclusion Proportion (VIP) scores were used to quantify the importance of covariates, with significance determined by simulating random distributions across 100 permutations (Hu et al., Reference Hu, Liu, Ji and Li2020). Generally, the higher the VIP score (closer to 1), the more important the variable feature is in the model, and the more the model relies on this variable to make accurate predictions. Covariates with VIP scores exceeding the 95th percentile of the simulated distribution were considered statistically significant. The vertical line indicates the threshold level; variables exceeding this threshold are shown as solid dots, while unselected variables are shown as open dots.
To enhance the interpretability of findings, mixed-effects logistic regression analyses were conducted to quantify the effects of factors identified by the BART model on depression and anxiety, clustering at the provincial level. These analyses were performed separately for urban and rural subpopulations, providing tailored insights into the risk factors of mental health in each setting. Two sensitivity analyses included additional adjustment for demographic covariates and increased the variable inclusion threshold in the BART permutation procedure to the 99th percentile. As all questionnaire items were mandatory, no missing data were present.
Results
Demographic characteristics of PHWs in China
The demographic characteristics of the 3,769 PHWs included in the study are presented in Table 1. The mean age of participants was 37.38 years (standard deviation (SD) = 9.16), with 26.7% (1,006) working in urban areas and 73.3% (2,763) in rural areas. Overall, 21.2% (798) of participants were male, and the majority (59.2%, 2,230) held a bachelor’s degree or higher. Nearly half (41.6%, 1,569) worked in the eastern region of China. Most participants (93.8%, 3,535) were local residents born in the same region as their workplace, while 6.2% (234) were migrants. Monthly income ranged widely, with the largest proportion (43.0%, 1,620) reporting earnings between 3,000 and 5,000 RMB.
Table 1. Characteristics of participants (N = 3,769)

* P < 0.05.
** P < 0.01.
Significant differences were observed between urban and rural groups in age, sex, educational attainment, geographic region, residency status, monthly income, living arrangement, after-work exercise frequency, number of chronic illnesses, self-rated health status, professional rank, occupational category, years of employment, and self-rated work intensity (all P < 0.05).
Key factors identified by BART analysis
Figure 1 illustrates the variable importance scores derived from the BART model. For anxiety, four key factors were identified: living arrangement (cutoff = 0.082, VIP = 0.094), self-rated health status (cutoff = 0.072, VIP = 0.094), job satisfaction in urban areas (cutoff = 0.064, VIP = 0.120), and after-work exercise in rural areas (cutoff = 0.069, VIP = 0.095).

Figure 1. Distributions of Variable Inclusion Proportions (VIP).
For depression, eight factors were identified, including living arrangement (cutoff = 0.078, VIP = 0.084), organizational support satisfaction in urban areas (cutoff = 0.076, VIP = 0.094), after-work exercise (cutoffs = 0.070 and 0.069; VIPs = 0.086 and 0.078), self-rated health status (cutoffs = 0.067 and 0.069; VIPs = 0.098 and 0.085), and job satisfaction (cutoffs = 0.071 and 0.068; VIPs = 0.104 and 0.085) across urban and rural settings (Tables S1–S4). When we increased the variable inclusion threshold from 95th to 99th percentile, self-evaluated job satisfaction remained a significant factor in both urban and rural settings (Tables S5–S9).
Risk factors for anxiety by urbanicity
No multicollinearity concerns were identified (Tolerance >0.1, VIF <10; Supplementary Tables S9–S12). Among urban PHWs, moderate jobS satisfaction (OR = 0.24, 95% CI, 0.17–0.33) and high job satisfaction (OR = 0.10, 95% CI, 0.07–0.15) were associated with lower anxiety. Living with family (OR = 0.42, 95% CI, 0.28–0.62) and self-rated health as fair (OR = 0.31, 95% CI, 0.23–0.42) or good (OR = 0.13, 95% CI, 0.09–0.20) were also protective against anxiety (all P < 0.005).
In rural PHWs, engaging in after-work exercise was strongly associated with reduced anxiety. Compared to those who never exercised, individuals who rarely (OR = 0.28, 95% CI, 0.11–0.76), occasionally (OR = 0.28, 95% CI, 0.12–0.67), sometimes (OR = 0.16, 95% CI, 0.06–0.41), or frequently (OR = 0.15, 95% CI, 0.05–0.44) exercised had significantly lower odds of anxiety. High job satisfaction (OR = 0.21, 95% CI, 0.11–0.39) was also protective. These results are visualized in Fig. 2.

Figure 2. Significant factors of anxiety among primary healthcare workers in rural and urban areas.
Risk factors for depression by urbanicity
Figure 3 highlights the risk factors of depression. Among urban PHWs, engaging in after-work exercise occasionally (OR = 0.46, 95% CI, 0.29–0.71), sometimes (OR = 0.44, 95% CI, 0.27–0.71), or frequently (OR = 0.42, 95% CI, 0.24–0.73) was associated with lower depression risk. Moderate (OR = 0.43, 95% CI, 0.30–0.60) and high job satisfaction (OR = 0.28, 95% CI, 0.19–0.42), living with family (OR = 0.51, 95% CI, 0.34–0.75), and self-rated health as fair (OR = 0.31, 95% CI, 0.24–0.42) or good (OR = 0.14, 95% CI, 0.09–0.20) were similarly protective. Satisfaction with organizational support (moderate: OR = 0.43, 95% CI, 0.30–0.60; high: OR = 0.28, 95% CI, 0.19–0.42) also significantly reduced depression risk.

Figure 3. Significant factors of depression among primary healthcare workers in rural and urban areas.
Among rural PHWs, after-work exercise remained a critical factor, with lower depression risk observed for those exercising sometimes (OR = 0.29, 95% CI, 0.11–0.77) or frequently (OR = 0.23, 95% CI, 0.07–0.68). High job satisfaction (OR = 0.25, 95% CI, 0.13–0.45) and self-rated health as fair (OR = 0.30, 95% CI, 0.18–0.53) or good (OR = 0.20, 95% CI, 0.11–0.38) were also protective against depression. Results remained consistent after adjusting for demographic variables (Supplementary Tables S13–S16).
Discussion
This national survey was conducted at a pivotal time, immediately following the COVID-19 pandemic, to examine factors influencing the mental health of PHWs in China. Using a permutation-based variable selection technique, the key factors of anxiety and depression were identified. Notably, demographic and workload-related variables, commonly emphasized in previous studies, were not significant factors in this study (Győrffy et al., Reference Győrffy, Dweik and Girasek2016; Moutier, Reference Moutier2018). These findings align with, yet differ in certain respects from, existing literature on the psychological health of medical personnel, potentially reflecting the unique context of the pandemic and the characteristics of PHWs surveyed (Selamu et al., Reference Selamu, Hanlon, Medhin, Thornicroft and Fekadu2019).
Self-rated job satisfaction emerged as a critical factor of anxiety and depression across both urban and rural settings, consistent with extensive evidence highlighting its positive impact on mental well-being among physicians globally, including studies in the United States, the United Kingdom, Japan, and Nigeria (Ramirez et al., Reference Ramirez, Graham, Richards, Gregory and Cull1996; Williams et al., Reference Williams, Konrad, Scheckler, Pathman, Linzer, McMurray, Gerrity and Schwartz2000, Reference Williams, Konrad, Linzer, McMurray, Pathman, Gerrity, Schwartz, Scheckler and Douglas2002; Tokuda et al., Reference Tokuda, Hayano, Ozaki, Bito, Yanai and Koizumi2009; Bello et al., Reference Bello, Asuzu and Ofili2013; Kamimura et al., Reference Kamimura, Chen, Nourian, Stoddard and Al-Sarray2018). Although research specifically focused on PHWs is limited, findings consistently underscore the positive impact of job satisfaction (Unrath et al., Reference Unrath, Zeeb, Letzel, Claus and Pinzón2012; Yilmaz, Reference Yilmaz2018; Al-Wotayan et al., Reference Al-Wotayan, Annaka and Nazar2019). Interestingly, organizational support satisfaction was uniquely associated with depression among urban PHWs. This finding may reflect the heightened pressures faced by urban PHWs during the pandemic, including serving larger populations, managing higher infection rates, and facilitating extensive vaccination campaigns (Zulu et al., Reference Zulu, Silumbwe, Munakampe, Chavula, Mulubwa, Sirili, Zulu, Michelo and Tetui2025). The increased reliance of urban PHWs on institutional support, such as access to personal protective equipment, underscores the importance of organizational backing in mitigating mental health challenges in urban settings (Ni et al., Reference Ni, Lebowitz, Zou, Wang, Liu, Shrestha, Zhang, Hu, Yang and Xu2021).
Contrary to prior research, workload-related variables were not significant risk factors of mental health in this study. This discrepancy may be attributable to the timing of the survey, conducted during the final phase of the pandemic when workload pressures had eased compared to the pandemic’s earlier years (Knight et al., Reference Knight, Keller and Parker2023). Self-rated health and after-work exercise were also identified as significant predictors of anxiety and depression. Self-rated health, a subjective measure linked to biological indicators such as mortality, has been consistently associated with mental health outcomes (Fayers and Sprangers, Reference Fayers and Sprangers2002; Jylhä, Reference Jylhä2009). For instance, studies have demonstrated that poor self-rated health predicts depressive symptoms, even after adjusting for covariates (Ambresin et al., Reference Ambresin, Chondros, Dowrick, Herrman and Gunn2014). Similarly, physical activity and exercise have been widely recognized as protective factors for mental health, though findings within medical populations have been mixed (Han et al., Reference Han, Ko, Yoon, Han, Ham and Kim2018; Östberg and Nordin, Reference Östberg and Nordin2022). For example, research in southern China found an association between poor self-rated health, lack of exercise, and higher rates of anxiety and depression (Rebar et al., Reference Rebar, Stanton, Geard, Short, Duncan and Vandelanotte2015; Gong et al., Reference Gong, Han, Chen, Dib, Yang, Zhuang, Chen, Tong, Yin and Lu2014). Conversely, a study among physician assistant students in the United States reported no significant relationship between exercise and mental health outcomes (Wright, Reference Wright2023). Our study potentially reflects the heightened need for physical well-being among medical staff managing infectious disease emergencies.
Future research should further explore the mechanisms underlying these relationships. Family relationships, particularly living arrangements, were significantly associated with anxiety and depression among urban PHWs. While family support has been well-documented as a protective factor for mental health in adolescents and the elderly (Lau and Kwok, Reference Lau and Kwok2000; Bögels and Brechman-Toussaint, Reference Bögels and Brechman-Toussaint2006; Guerrero-Muñoz et al., Reference Guerrero-Muñoz, Salazar, Constain, Perez, Pineda-Cañar and García-Perdomo2020), its role in medical staff is less studied. Our findings align with previous research indicating that family environment and social support were negatively correlated with symptoms of anxiety and depression among healthcare workers in urban areas during the COVID-19 pandemic (Fang et al., Reference Fang, Wu, Lu, Kan, Wang, Xiong, Ma and Wu2021; Nie et al., Reference Nie, Chen, Liao, Wu and Li2023). However, this association was not observed among rural PHWs, likely reflecting the broader and more diverse social networks in rural China, including community and clan-based support systems, which may reduce reliance on nuclear family support (Xu et al., Reference Xu, Zhang and Zhou2023).
Our findings indicate both shared and distinct factors for anxiety and depression among PHWs. For shared factors, better self-rated health and more frequent after-work exercise were consistently associated with lower odds of mental illness. This is consistent with the current research findings that self-rated health and healthy behaviors are positively associated with mental health, although these studies have a broader population and are not limited to primary care workers (Kouvonen et al., Reference Kouvonen, Kemppainen, Ketonen, Kemppainen, Olakivi and Wrede2021; Peleg and Nudelman, Reference Peleg and Nudelman2021; Ross et al., Reference Ross, VanDerwerker, Saladin and Gregory2023). However, differences were also observed: living with family was particularly protective against anxiety, especially among urban healthcare workers, and depression was more closely related to occupational satisfaction and perceived organizational support. These similar and different factors suggest that future intervention strategies for primary care workers’ mental health should also be different. For example, workplace support programs may be more effective in alleviating depression, while family support programs may be more effective in alleviating anxiety.
It should be noted that the data in this study were collected during the COVID-19 pandemic, which may have amplified the levels of anxiety and depression observed. However, several structural factors identified in this study – such as self-rated health status, exercise after work, job satisfaction, organizational support satisfaction, and living arrangement – are not specific to the pandemic but are factors that continue to impact mental health (Liu et al., Reference Liu, Ni, Zhang, Zhao, Bai, Zhang, Ding, Yin and Chen2023; Turgut et al., Reference Turgut, Tuncel, Palta, Tektas, Balci, Guzel, Keten, Aslan and Tuncel2024; Zheng and Zhang, Reference Zheng and Zhang2024; Li et al., Reference Li, Tian, Yang, Ning, Chen, Yu, Liu, Huang and Li2025). Therefore, the findings are not only relevant for guiding mental health support during the pandemic but also provide important evidence for developing long-term mental health promotion strategies in the post-pandemic era.
Although this study provides valuable insights, several limitations should be acknowledged. First, in our study, we employed a stratified four-stage sampling method. However, in practice, when encountering cities or institutions that refused to participate, we regenerated the sampling frame, which differed slightly from the original research design. Second, the cross-sectional design precludes causal inferences and limits the ability to capture changes in mental health risk factors over time. Longitudinal studies are needed to explore how these risk factors evolve. Third, while this study identified significant factors, it did not investigate the intermediate mechanisms through which these factors influence mental health. Future research should examine these pathways and consider intervention strategies to mitigate mental health risks among PHWs.
Conclusion
This study represents one of the few nationwide surveys in China focusing on the mental health of PHWs who serve on the front lines of community healthcare. Conducted immediately following the COVID-19 pandemic, the survey encompassed urban and rural areas across all 31 provinces of mainland China, providing a comprehensive analysis of mental health risk factors using a machine learning approach. Key factors identified included job satisfaction, self-rated health, and family relationships, while demographic and workload-related variables were not significant factors. Risk factors of anxiety and depression varied by urbanicity. Occupational satisfaction and self-rated health were significant in both urban and rural settings, while organizational support satisfaction and living arrangements were uniquely relevant to urban practitioners. These findings highlight the importance of tailored mental health interventions that address the distinct needs of urban and rural PHWs. Given the significant urban–rural disparities in China, targeted strategies are essential to ensure equitable mental health support for PHWs and to sustain the critical role they play in community healthcare delivery.
Supplementary material
The supplementary material for this article can be found at https://doi.org/10.1017/S2045796025100425.
Availability of data and materials
Datasets generated and analysed during the current study are not publicly available, as this was not included in the consent process, but anonymized datasets can be made available from the corresponding author on reasonable request by email.
Author contributions
Y.L. and J.H. designed this study. J.G. and J.H. collected data and provided administrative support. J.H., Y.Y., and Y.L. drafted the manuscript. Y.Y. analysed data. H.L., Y.C., and P.Z. interpreted data. J.H. acquired funding. All authors reviewed and commented on the manuscript and read and approved the final version. Jiaoling Huang and Yuqi Yang contributed equally to this paper. Jie Gu can also be contacted for correspondence, email gu.jie@zs-hospital.sh.cn.
Financial support
This study was funded by the National Natural Science Foundation of China (72274122, 72293585) and Shanghai’s Three-Year Action Plan for Strengthening Public Health System Construction – Outstanding Youth Talent (GWVI-11.2-YQ54).
Competing interests
The authors declare that they have no competing interests.
Ethical standards
Ethical approval was granted by Zhongshan Hospital, Fudan University (B2021-605), and the study adhered to the Strengthening the Reporting of Observational Studies in Epidemiology (STROBE) guidelines and the World Medical Association Declaration of Helsinki (2013).