Artificial intelligence (AI) was able to detect depression and anxiety in healthcare workers at the height of the pandemic, a new study found. The technology could be used to support them going forward.

An AI tool used worked effectively to detect distress among conversations between hospital workers and their therapists early on during the pandemic, the study showed. 

Researchers examined transcripts from virtual therapy sessions, which helped them spot common phrases used by people with mental illness. All of the individuals’ personal information wasn’t included. The technology is known as natural language processing. It sorts through all the data to identify keywords related to the meaning of the text.

The scientists led by a team at the NYU Grossman School of Medicine combed through transcripts from more than 800 physicians, nurses, and emergency medical staff. They also reviewed transcripts from 820 people who didn’t work in healthcare but were undergoing psychotherapy during the first wave of COVID-19. All of the people received teletherapy between March and July 2020.

Healthcare workers who spoke to their therapists about their stresses were more likely to have depression and/or anxiety compared to healthcare workers who didn’t talk about those things with their therapists. The risk for talking about those stresses wasn’t seen in workers who weren’t in the healthcare field. The higher risk for anxiety and depression among healthcare workers was 3.6%.

“Our findings show that those working on the hospital floor during the most intense moment of the pandemic faced unique challenges on top of their regular job-related stressors which put them at high risk for serious mental health concerns,” said study lead author Matteo Malgaroli, PhD, a research assistant professor of psychiatry at NYU Langone Health.

The study was published Tuesday in the Journal of Medical Internet Research AI (JMIR AI).

Healthcare workers tended to focus their sessions on the stress of practicing medicine: fears about the virus, working in hospitals and intensive care units, masking, and their roles. People in other fields talked about the pandemic and their jobs.

“These results suggest that natural language processing may one day become an effective screening tool for detecting and tracking anxiety and depression symptoms,” Naomi Simon, MD, a professor in the Department of Psychiatry at NYU Langone, added.