Lab: An R Package for Generating Analysis-Ready Data from Laboratory Records
21 Pages Posted: 27 Oct 2022
Date Written: October 13, 2022
Electronic health records (EHRs) enable physicians to understand disease progression, identify appropriate treatment, and participate in data-driven health-care decision-making. Laboratory test results, which are included in EHRs, are commonly used to predict disease progression. In addition, analyzing the temporal information in EHRs can improve outcomes, prognoses, and diagnosis monitoring and prediction. However, laboratory records contain both data on the tests ordered and test results. Furthermore, the irregular frequency of the data in these records necessitates data preprocessing when time-series analyses are performed, which increases the burden of these analyses. Therefore, we developed an open-source R package that enables analysts to easily retrieve detailed information from laboratory records by mapping local laboratory codes onto the international standard, annotating abnormal results, slicing the data into time-series windows, summarizing the data through descriptive statistics, imputing missing values, and generating analysis-ready data. The proposed lab package simplifies and speeds up the workflow of laboratory report extraction and may assist clinical data analysts in generating simple and clean script that can easily be shared and reproduced.
Keywords: Analysis-ready data, Laboratory records, Exploratory data analysis, R package
Suggested Citation: Suggested Citation