Skip to content

Commit

Permalink
Merge pull request #385 from OHDSI/og_0.4
Browse files Browse the repository at this point in the history
Og 0.4
  • Loading branch information
edward-burn authored Nov 24, 2024
2 parents ea30962 + d5f2048 commit a2a0952
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: CohortConstructor
Title: Build and Manipulate Study Cohorts Using a Common Data Model
Version: 0.3.2
Version: 0.3.2.900
Authors@R: c(
person("Edward", "Burn", , "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9286-1128")),
Expand Down Expand Up @@ -35,7 +35,7 @@ Imports:
dplyr,
glue,
magrittr,
omopgenerics (>= 0.2.1),
omopgenerics (>= 0.4.0),
PatientProfiles (>= 1.2.0),
purrr,
rlang,
Expand Down
Binary file modified data/benchmarkData.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/testthat/test-requireDemographics.R
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ test_that("codelist kept with >1 requirement", {
cdm$cohort1 <- conceptCohort(cdm = cdm, conceptSet = list(a = 1, b = 2), name = "cohort1")

cdm$cohort2 <- cdm$cohort1 |> requireDemographics(name = "cohort2", minPriorObservation = c(0,3), cohortId = 1)
expect_identical(attr(cdm$cohort2, "cohort_codelist") |> dplyr::collect() |> dplyr::arrange(.data$cohort_definition_id), dplyr::tibble(
expect_equal(attr(cdm$cohort2, "cohort_codelist") |> dplyr::collect() |> dplyr::arrange(.data$cohort_definition_id), dplyr::tibble(
cohort_definition_id = as.integer(1:3),
codelist_name = c("a", "b", "a"),
concept_id = as.integer(c(1, 2, 1)),
Expand Down
5 changes: 3 additions & 2 deletions vignettes/a11_benchmark.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ library(tidyr)
library(gt)
library(scales)
library(CohortConstructor)
library(gt)
niceOverlapLabels <- function(labels) {
new_labels <- gsub("_", " ", gsub(" and.*|cc_", "", labels))
Expand Down Expand Up @@ -213,7 +214,7 @@ The table below depicts the total time it took to create the nine cohorts when u
```{r}
header_prefix <- "[header]Time by tool (minutes)\n[header_level]"
benchmarkData$time_domain |>
gtTable(colsToMergeRows = "all_columns") |>
formatTable() |>
tab_style(style = list(cell_fill(color = "#e1e1e1"), cell_text(weight = "bold")),
locations = cells_column_labels()) |>
tab_style(style = list(cell_text(weight = "bold")),
Expand All @@ -226,7 +227,7 @@ Cohorts are often stratified in studies. With Atlas cohort definitions, each str

```{r}
benchmarkData$time_strata |>
gtTable(colsToMergeRows = "all_columns") |>
formatTable() |>
tab_style(style = list(cell_fill(color = "#e1e1e1"), cell_text(weight = "bold")),
locations = cells_column_labels()) |>
tab_style(style = list(cell_text(weight = "bold")),
Expand Down

0 comments on commit a2a0952

Please sign in to comment.