Identifying Electronic Health Record Tasks and Activity Using Computer Vision - Nguyen, Liem M.; Sinha, Amrita; Dziorny, Adam; Tawfik, Daniel (Applied Clinical Informatics, 2025)
Time spent in the electronic health record (EHR) is an important measure of clinical activity. Vendor-derived EHR use metrics may not correspond to actual EHR experience. Raw EHR audit logs enable customized EHR use metrics, but translating discrete timestamps to time intervals is challenging. There are insufficient data available to quantify inactivity between audit log timestamps.This study aimed to develop and validate a computer vision-based model that (1) classifies EHR tasks and identifies task changes and (2) quantifies active-use time from clinician session screen recordings of EHR use. This study also aimed to develop and validate a computer vision-based model that (1) classifies EHR tasks and identifies task changes and (2) quantifies active-use time from clinician session screen recordings of EHR use.We generated 111 minutes of simulated workflow in an Epic sandbox environment for development and training and collected 86 minutes of real-world clinician session recordings for validation. The model used YOLOv8, Tesseract OCR, and a predefined dictionary to perform task classification and task change detection. We developed a frame comparison algorithm to delineate activity from inactivity and thus quantify active time. We compared the model's output of task classification, task change identification, and active time quantification against clinician annotations. We then performed a post hoc sensitivity analysis to identify the model's accuracy when using optimal parameters.Our model classified time spent in various high-level tasks with 94% accuracy. It detected task changes with 90.6% sensitivity. Active-use quantification varied by task, with lower mean absolute percentage error (MAPE) for tasks with clear visual changes (e.g., Results Review) and higher MAPE for tasks with subtle interactions (e.g., Note Entry). A post hoc sensitivity analysis revealed improvement in active-use quantification with a lower threshold of inactivity than initially used.A computer vision approach to identifying tasks performed and measuring time spent in the EHR is feasible. Future work should refine task-specific thresholds and validate across diverse settings. This approach enables defining optimal context-sensitive thresholds for quantifying clinically relevant active EHR time using raw audit log data.
Keywords: electronic health records; neural network; pediatrics