diff --git a/tutorials/explore-items.Rmd b/tutorials/explore-items.Rmd index 032ee09..59c233e 100644 --- a/tutorials/explore-items.Rmd +++ b/tutorials/explore-items.Rmd @@ -7,7 +7,7 @@ output: html_document Exploring data in MIMIC-III. -We use a slightly incorrect heuristic in comparing Careview and Metavision data, namely that patients registered in those systems may be recognized by whether the `SUBJECT_ID < 40000`. This is wrong for patients with data in Metavision if the patient had been previously registered under Careview. +We use a slightly incorrect heuristic in comparing CareVue and Metavision data, namely that patients registered in those systems may be recognized by whether the `SUBJECT_ID < 40000`. This is wrong for patients with data in Metavision if the patient had been previously registered under CareVue. # D_ITEMS @@ -15,7 +15,7 @@ We use a slightly incorrect heuristic in comparing Careview and Metavision data, # To run this non-interactively (e.g., via Knit), enter the password for the database here: pwd = "" library(RMySQL) -con <- dbConnect(MySQL(), user="mimic3", password=ifelse(pwd=="", readline("MIMIC3 Password: "), pwd), +con <- dbConnect(MySQL(), user="mimic3", password=ifelse(pwd=="", readline("MIMIC3 Password: "), pwd), dbname="mimiciiiv13", host="safar.csail.mit.edu") library(knitr) @@ -28,7 +28,7 @@ item.summary <- dbGetQuery(con, "select category, count(*) c, group_concat(label kable(item.summary) ``` -We next investigate how many chartevents exist for each of the `D_ITEM`s, how many distinct patients have such values, and whether these patients' data came from Careview (I believe `SUBJECT_ID < 40000`) or Metavision (`SUBJECT_ID >= 40000`). +We next investigate how many chartevents exist for each of the `D_ITEM`s, how many distinct patients have such values, and whether these patients' data came from CareVue (I believe `SUBJECT_ID < 40000`) or Metavision (`SUBJECT_ID >= 40000`). ```{r, warning=FALSE} if (exists("chart.items")) { @@ -59,10 +59,10 @@ if (!file.exists("chart-items.csv")) { chart.items.both = subset(chart.items, !is.na(cv_pat) & !is.na(mv_pat)) ``` -Of the `r nrow(chart.items)` distinct `D_ITEM`s, there are only `r nrow(subset(chart.items, !is.na(n_pat)))` that are recorded for any of the patients in `CHARTEVENTS`, of which only `r nrow(chart.items.both)` occur in both Careview and Metavision patients. Careview seems to use many more of the items (`r nrow(subset(chart.items, !is.na(cv_pat)))`) than Metavision (`r nrow(subset(chart.items, !is.na(mv_pat)))`). +Of the `r nrow(chart.items)` distinct `D_ITEM`s, there are only `r nrow(subset(chart.items, !is.na(n_pat)))` that are recorded for any of the patients in `CHARTEVENTS`, of which only `r nrow(chart.items.both)` occur in both CareVue and Metavision patients. CareVue seems to use many more of the items (`r nrow(subset(chart.items, !is.na(cv_pat)))`) than Metavision (`r nrow(subset(chart.items, !is.na(mv_pat)))`). -From previous examination of the data, we know that in the move from Careview to Metavision, some similar items have been coded with different ITEMIDs. We see whether these matching IDs can be recovered by textual identity of their labels. +From previous examination of the data, we know that in the move from CareVue to Metavision, some similar items have been coded with different ITEMIDs. We see whether these matching IDs can be recovered by textual identity of their labels. ```{r, warning=FALSE} item.identical <- dbGetQuery(con, "select x.itemid as itemid1, y.itemid as itemid2, x.label, x.category as cat1, y.category as cat2 from d_items x join d_items y on x.label=y.label where x.itemid