Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Introduction
Healthcare data analysis can be a complex and time-consuming task, but it doesn’t have to be. Meet {healthyR}
, your new go-to R package for all things healthcare data analysis. With {healthyR}
, you can easily and efficiently analyze your healthcare data, and make sense of the information it contains.
One of the key features of {healthyR}
is the service_line_augment() function. This function is designed to help you quickly and easily append a vector to a data.frame
or tibble
that is passed to the .data
parameter. In order to use this function, you will need a data.frame
or tibble
with a principal diagnosis column, a principal procedure column, and a column for the DRG number. These are needed so that the function can join the dx_cc_mapping and px_cc_mapping columns to provide the service line.
The service_line_augment() function is especially useful for analyzing healthcare data that is coded using ICD Version 10. This version of the ICD coding system is widely used in the healthcare industry, and the service_line_augment() function is specifically designed to work with it. With this function, you can quickly and easily append a vector to your data.frame or tibble that provides the service line for each visit.
In addition to the service_line_augment() function, {healthyR}
also includes a wide range of other useful tools and functions for healthcare data analysis. Whether you’re looking to analyze claims data, clinical data, or any other type of healthcare data, {healthyR}
has you covered.
So why wait? Download {healthyR}
today and start making sense of your healthcare data! With {healthyR}
, you can easily and efficiently analyze your healthcare data, and make sense of the information it contains.
Function
Let’s take a look at the full function call.
service_line_augment(.data, .dx_col, .px_col, .drg_col)
Now let’s look at the arguments to the parameters.
.data
– The data being passed that will be augmented by the function..dx_col
– The column containing the Principal Diagnosis for the discharge..px_col
– The column containing the Principal Coded Procedure for the discharge. It is possible that this could be blank..drg_col
– The DRG Number coded to the inpatient discharge.
Now for some examples.
< section id="example" class="level1">Example
First if you have not already, install {healthyR}
install.packages("healthyR")
Here we go.
library(healthyR) df <- data.frame( dx_col = "F10.10", px_col = NA, drg_col = "896" ) service_line_augment( .data = df, .dx_col = dx_col, .px_col = px_col, .drg_col = drg_col )
# A tibble: 1 × 4 dx_col px_col drg_col service_line <chr> <lgl> <chr> <chr> 1 F10.10 NA 896 alcohol_abuse
Voila!
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.