BACKGROUND: Return-to-work (RTW) programs are provided as rehabilitation for people who have taken sick leave from work because of mental health problems. However, methods to present this information to workplaces objectively remain limited. OBJECTIVE: This study aimed to conduct an exploratory investigation of the relationship between duration of sick leave and time variation of words used in RTW programs for depression from textual data collected from electronic medical records as a new evaluation indicator. METHODS: The study subjects were those who had taken sick leave because of major depressive or adjustment disorder and had participated in an RTW program. The study data comprised demographic characteristics and texts. Textual data were collected from electronic medical records and classified based on the SOAP note. Thereafter, the textual data were quantified into category scores based on a standard text analysis dictionary. A generalized linear mixed model was used for the statistical analysis, with the score for each category (emotional, social, cognitive, perceptual, biological, motivational, relativity, and informal) as the dependent variable and the duration of sick leave, time, and interaction between the duration of sick leave and time as the independent variables. The level of statistical significance was set at 0.05. RESULTS: In total, 42 participants were included in the analysis. The results revealed a significant interaction between the social (p = 0.001) and emotional (p = 0.002) categories. CONCLUSION: The findings suggest a relationship between word changes in electronic medical records and the duration of sick leave.