The R package of emr4washu wraps up some of the frequent sql querries into R package, so we can minimize the copy and paste code. By standadizing the user interface (input, output), it would be easier to pipeline the data flow. The real world healthcare data are dirty, but don't panic. There is always hope.
The purpose was not to replace any existing tools, rather than a supplemental tool whenever necessary. It only works with our internal database and the workflow is supposed to be consistent for typical queries.
```{r, eval = FALSE} install.packages("devtools") devtools::install_github("dajuntian/emr4washu") library(emr4washu)
## Alternatively, reqeust the source file from us and then install through
```{r, eval = FALSE}
#"C:/Download/emr4washu0090.tar.gz" should be replaced by the actual location in your computer.
install.packages("C:/Download/emr4washu0090.tar.gz", repos = NULL, type="source")
download jdbc driver. If you already have the IBM client installed, it is usually found at C:\Program Files\IBM\SQLLIB\java\db2jcc4.jar.
download jre and install with the default options
```{r, eval = FALSE}
conn <- connect_db("C:/mydocument/db2jcc4.jar", # path to the jdbc driver "db.company.org", # the host name, could be found through confluence page 10000, # ditto 'dbname', # ditto 'abc1234', # this is from DBA .rs.askForPassword("Enter password:")) #password, or save it to ~
charlson(conn, "abc1234.cohort", # the input table containing one column:visit no "abc1234.cohort_w_charlson", # the output table name )
lab(conn, "abc1234.cohort", # the input table containing one column:visit no "abc1234.cohort_w_lab", # the output table name )
commit_sql(conn, "Z:/EMR/bearhunt.sql") commit_sql(conn, "select * from session.candidate", file_flag = F)
RJDBC::dbDisconnect(conn) ```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.