Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Og 0.4 #385

Merged
merged 3 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading