Skip to content

Commit

Permalink
checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nmercadeb committed Sep 6, 2024
1 parent 8c3d43c commit 20e6e29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions tests/testthat/test-intersectCohorts.R
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,14 @@ test_that("attrition and cohortId", {
expect_true(nrow(settings(cdm$cohort1)) == 3)
expect_equal(settings(cdm$cohort1)$non_overlapping, c(NA, TRUE, TRUE))
expect_true(all(
omopgenerics::attrition(cdm$cohort1)$reason |> sort() ==
c(rep("Age requirement: 0 to 40", 2), rep("cohort_start_date after 1990-01-01", 2),
rep("cohort_start_date before 2025-01-01", 2), rep("Initial qualifying events", 3),
rep("Sex requirement: Female", 2), rep("Trim to non overlapping entries", 2))
omopgenerics::attrition(cdm$cohort1)$reason %in%
c('Initial qualifying events', 'Initial qualifying events',
'cohort_start_date after 1990-01-01', 'cohort_start_date before 2025-01-01',
'Sex requirement: Female', 'Age requirement: 0 to 40',
'Trim to non overlapping entries', 'Initial qualifying events',
'cohort_start_date after 1990-01-01', 'cohort_start_date before 2025-01-01',
'Sex requirement: Female', 'Age requirement: 0 to 40',
'Trim to non overlapping entries')
))
expect_true(all(omopgenerics::attrition(cdm$cohort1)$reason_id == c(1, 1:6, 1:6)))
expect_true(all(omopgenerics::attrition(cdm$cohort1)$number_records |> sort() ==
Expand Down
2 changes: 1 addition & 1 deletion vignettes/a01_building_base_cohorts.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Building base cohorts"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{a01_building_concept_cohorts}
%\VignetteIndexEntry{a01_building_base_cohorts}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Expand Down

0 comments on commit 20e6e29

Please sign in to comment.