knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Getting started with dxpr package

dxpr

I. Introduction

The proposed open-source dxpr package is a software tool aimed at expediting an integrated analysis of electronic health records (EHRs). The dxpr package provides mechanisms to integrate, analyze, and visualize clinical data, including diagnosis and procedure records.

Feature

Getting started

Development version

# install.packages("remotes")
remotes::install_github("DHLab-TSENG/dxpr")
knitr::opts_chunk$set(collapse = T, comment = "#>")
options(tibble.print_min = 4L, tibble.print_max = 4L)
remotes::install_github("DHLab-TSENG/dxpr")

Overview

Usage

library(dxpr)  

head(sampleDxFile)  

# I. Data integration
#   1. Data standardization
short <- icdDxDecimalToShort(dxDataFile = sampleDxFile, 
                             icdColName = ICD, 
                             dateColName = Date,
                             icd10usingDate = "2015/10/01")
head(short$ICD)

tail(short$Error)

#   2. Data grouping
ELIX <- icdDxToComorbid(dxDataFile = sampleDxFile, 
                        idColName = ID, 
                        icdColName = ICD, 
                        dateColName = Date, 
                        icd10usingDate = "2015/10/01", 
                        comorbidMethod = elix)
head(ELIX$groupedDT)

head(ELIX$summarised_groupedDT)

# II. Data wrangling
groupedDataWide <- groupedDataLongToWide(dxDataFile = ELIX$groupedDT, 
                                         idColName = ID, 
                                         categoryColName = Comorbidity, 
                                         dateColName = Date)
head(groupedDataWide[,1:4])

# IV. Visualization
plot_errorICD <- plotICDError(short$Error)  
plot_groupedData <- plotDiagCat(groupedDataWide, ID)

plot_errorICD

plot_groupedData

Getting help

See the GitHub issues page (https://github.com/DHLab-TSENG/dxpr/issues) to see open issues and feature requests.



DHLab-CGU/emr documentation built on Sept. 2, 2023, 9:16 p.m.