Appl Clin Inform 2025; 16(05): 1350-1358
DOI: 10.1055/a-2698-0841
Research Article

Identifying Electronic Health Record Tasks and Activity Using Computer Vision

Authors

  • Liem M. Nguyen

    1   Department of Pediatric Critical Care, Stanford University School of Medicine, Stanford, California, United States
  • Amrita Sinha

    2   Department of Pediatrics, Boston Children's Hospital, Boston, Massachusetts, United States
  • Adam Dziorny

    3   Department of Pediatrics, University of Rochester School of Medicine and Dentistry, Rochester, New York, United States
  • Daniel Tawfik

    1   Department of Pediatric Critical Care, Stanford University School of Medicine, Stanford, California, United States

Funding None.
Preview

Abstract

Background

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.

Objective

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.

Results

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.

Conclusion

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.

Protection of Human and Animal Subjects

This study was approved by Stanford University's IRB with a waiver of informed consent. The training phase of this study exclusively used Epic's Sandbox Instance, containing only simulated patient data. The validation phase employed technical measures to protect provider and patient privacy, including random selection of providers and sessions, automated obscuring of non-Epic applications through the Citrix Session Recorder, and task classification that sanitized any sensitive information. No animal subjects were involved in this research.


Supplementary Material



Publication History

Received: 02 June 2025

Accepted: 08 September 2025

Accepted Manuscript online:
10 September 2025

Article published online:
17 October 2025

© 2025. Thieme. All rights reserved.

Georg Thieme Verlag KG
Oswald-Hesse-Straße 50, 70469 Stuttgart, Germany