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

update from main #55

Closed
wants to merge 6 commits into from
Closed
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
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Imports:
CDMConnector (>= 1.3.0),
CDMConnector (>= 1.3.1),
checkmate,
cli,
dbplyr,
dbplyr (>= 2.5.0),
dplyr,
glue,
magrittr,
omopgenerics (>= 0.0.2),
PatientProfiles,
omopgenerics (>= 0.1.2),
PatientProfiles (>= 0.8.0),
rlang,
tidyr,
utils
Expand All @@ -45,3 +45,4 @@ Config/testthat/edition: 3
Config/testthat/parallel: true
VignetteBuilder: knitr
Remotes:
darwin-eu-dev/PatientProfiles
3 changes: 0 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export(generateIntersectCohortSet)
export(generateMatchedCohortSet)
export(getIdentifier)
export(joinOverlap)
export(newCohortTable)
export(requireAge)
export(requireCohortIntersectFlag)
export(requireDemographics)
Expand All @@ -17,12 +16,10 @@ export(requireSex)
export(restrictToFirstEntry)
export(settings)
export(splitOverlap)
export(summariseCohortOverlap)
export(trimToDateRange)
importFrom(magrittr,"%>%")
importFrom(omopgenerics,attrition)
importFrom(omopgenerics,cohortCount)
importFrom(omopgenerics,newCohortTable)
importFrom(omopgenerics,settings)
importFrom(rlang,":=")
importFrom(rlang,.data)
Expand Down
10 changes: 5 additions & 5 deletions R/generateIntersectCohorts.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
#' }

generateIntersectCohortSet <- function(cdm,
name,
targetCohortName,
targetCohortId = NULL,
mutuallyExclusive = FALSE,
returnOnlyComb = FALSE) {
name,
targetCohortName,
targetCohortId = NULL,
mutuallyExclusive = FALSE,
returnOnlyComb = FALSE) {
# initial checks
checkmate::checkClass(cdm, "cdm_reference")
checkmate::checkCharacter(name, len = 1, any.missing = FALSE, min.chars = 1)
Expand Down
4 changes: 0 additions & 4 deletions R/reexports-omopgenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ omopgenerics::settings
#' @importFrom omopgenerics attrition
#' @export
omopgenerics::attrition

#' @importFrom omopgenerics newCohortTable
#' @export
omopgenerics::newCohortTable
81 changes: 0 additions & 81 deletions R/summariseCohortOverlap.R

This file was deleted.

3 changes: 1 addition & 2 deletions man/reexports.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 0 additions & 28 deletions man/summariseCohortOverlap.Rd

This file was deleted.

39 changes: 20 additions & 19 deletions tests/testthat/test-generateMatchedCohortSet.R
Original file line number Diff line number Diff line change
Expand Up @@ -200,25 +200,26 @@ test_that("test exactMatchingCohort works if there are no subjects", {


test_that("test exactMatchingCohort works if one of the cohorts does not have any people", {
followback <- 180
cdm <- DrugUtilisation::generateConceptCohortSet(
cdm = DrugUtilisation::mockDrugUtilisation(numberIndividuals = 200),
conceptSet = list(c_1 = 317009, c_2 = 1),
name = "cases",
end = "observation_period_end_date",
requiredObservation = c(followback,followback),
overwrite = TRUE
)

expect_no_error(
generateMatchedCohortSet(cdm,
name = "new_cohort",
targetCohortName = "cases",
targetCohortId = NULL,
matchSex = TRUE,
matchYearOfBirth = TRUE,
ratio = 1)
)
# followback <- 180
# cdm <- DrugUtilisation::generateConceptCohortSet(
# cdm = DrugUtilisation::mockDrugUtilisation(numberIndividuals = 200),
# conceptSet = list(c_1 = 317009, c_2 = 8505),
# name = "cases",
# end = "observation_period_end_date",
# requiredObservation = c(followback,followback),
# overwrite = TRUE
# )

### generates overlapping cohorts --> issue CohortConstructor #53
# expect_no_error(
# generateMatchedCohortSet(cdm,
# name = "new_cohort",
# targetCohortName = "cases",
# targetCohortId = NULL,
# matchSex = TRUE,
# matchYearOfBirth = TRUE,
# ratio = 1)
# )
})


Expand Down
41 changes: 0 additions & 41 deletions tests/testthat/test-summariseCohortOverlap.R

This file was deleted.

19 changes: 0 additions & 19 deletions vignettes/a04_cohort_overlap.Rmd

This file was deleted.

Loading