Skip to content

Commit

Permalink
eunomia data
Browse files Browse the repository at this point in the history
  • Loading branch information
edward-burn committed Dec 27, 2023
1 parent 74d4352 commit d56c440
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions vignettes/a02_applying_cohort_restrictions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ cdm <- cdm_from_con(con, cdm_schema = "main",
```

```{r, include = FALSE}
if (Sys.getenv("EUNOMIA_DATA_FOLDER") == "") Sys.setenv("EUNOMIA_DATA_FOLDER" = file.path(tempdir(), "eunomia"))
if (!dir.exists(Sys.getenv("EUNOMIA_DATA_FOLDER"))) dir.create(Sys.getenv("EUNOMIA_DATA_FOLDER"))
if (!eunomia_is_available()) downloadEunomiaData()
if (Sys.getenv("EUNOMIA_DATA_FOLDER") == "") {
Sys.setenv("EUNOMIA_DATA_FOLDER" = file.path(tempdir(), "eunomia"))
}
if (!dir.exists(Sys.getenv("EUNOMIA_DATA_FOLDER"))){ dir.create(Sys.getenv("EUNOMIA_DATA_FOLDER"))
}
if (!CDMConnector::eunomia_is_available()) {
CDMConnector::downloadEunomiaData(pathToData = Sys.getenv("EUNOMIA_DATA_FOLDER"))
}
```

Let's start by creating two drug cohorts, one for users of diclofenac and another for users of acetaminophen. We'll use the `generateDrugUtilisationCohortSet()` from the DrugUtilisation package so that we can specify a gap era when creating the cohort.
Expand Down

0 comments on commit d56c440

Please sign in to comment.