Running 'spelling.R' [0s]
  Running 'testthat.R' [338s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(PatientProfiles)
  > 
  > test_check("PatientProfiles")
  Starting 2 test processes
  [ FAIL 65 | WARN 21 | SKIP 1 | PASS 200 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • empty test (1): 'test-summariseResult.R:209:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-addAttributes.R:5:3'): addAttributes, functionality ────────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% addDemographics() at test-addAttributes.R:5:3
    2. ├─PatientProfiles::addDemographics(.)
    3. │ └─x %>% dplyr::compute()
    4. ├─dplyr::compute(.)
    5. ├─omopgenerics:::compute.cdm_table(.)
    6. │ ├─dplyr::compute(...)
    7. │ └─CDMConnector:::compute.db_cdm(...)
    8. │   └─CDMConnector:::.computeQuery(...)
    9. │     └─dbplyr::sql_render(x)
   10. │       ├─dbplyr::sql_render(...)
   11. │       └─dbplyr:::sql_render.tbl_lazy(...)
   12. │         ├─dbplyr::sql_render(...)
   13. │         └─dbplyr:::sql_render.lazy_query(...)
   14. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   15. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   16. │             ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   17. │             └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   18. │               └─dbplyr:::get_select_sql(...)
   19. │                 └─dbplyr:::translate_select_sql(con, select)
   20. │                   └─dbplyr::translate_sql_(...)
   21. │                     └─base::lapply(...)
   22. │                       └─dbplyr (local) FUN(X[[i]], ...)
   23. │                         ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   24. │                         └─rlang::eval_tidy(x, mask)
   25. └─CDMConnector::datediff
   26.   └─cli::cli_abort(...)
   27.     └─rlang::abort(...)
  ── Error ('test-addCohortIntersect.R:8:3'): output format - one outcome cohort ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% ... at test-addCohortIntersect.R:8:3
    2. ├─PatientProfiles::addCohortIntersectDays(...)
    3. │ └─x %>% ...
    4. ├─PatientProfiles::addIntersect(...)
    5. │ └─... %>% ...
    6. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    7. ├─dplyr::mutate(...)
    8. ├─PatientProfiles::addFutureObservation(...)
    9. │ └─x %>% ...
   10. ├─PatientProfiles::addDemographics(...)
   11. │ └─x %>% dplyr::compute()
   12. ├─dplyr::compute(.)
   13. ├─omopgenerics:::compute.cdm_table(.)
   14. │ ├─dplyr::compute(...)
   15. │ └─CDMConnector:::compute.db_cdm(...)
   16. │   └─CDMConnector:::.computeQuery(...)
   17. │     └─dbplyr::sql_render(x)
   18. │       ├─dbplyr::sql_render(...)
   19. │       └─dbplyr:::sql_render.tbl_lazy(...)
   20. │         ├─dbplyr::sql_render(...)
   21. │         └─dbplyr:::sql_render.lazy_query(...)
   22. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   23. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   24. │             └─dbplyr:::get_select_sql(...)
   25. │               └─dbplyr:::translate_select_sql(con, select)
   26. │                 └─dbplyr::translate_sql_(...)
   27. │                   └─base::lapply(...)
   28. │                     └─dbplyr (local) FUN(X[[i]], ...)
   29. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   30. │                       └─rlang::eval_tidy(x, mask)
   31. └─CDMConnector::datediff
   32.   └─cli::cli_abort(...)
   33.     └─rlang::abort(...)
  ── Error ('test-addCohortIntersect.R:107:3'): first vs last event - cohort table ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% ... at test-addCohortIntersect.R:107:3
    2. ├─PatientProfiles::addCohortIntersectDays(...)
    3. │ └─x %>% ...
    4. ├─PatientProfiles::addIntersect(...)
    5. │ └─... %>% ...
    6. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    7. ├─dplyr::mutate(...)
    8. ├─PatientProfiles::addFutureObservation(...)
    9. │ └─x %>% ...
   10. ├─PatientProfiles::addDemographics(...)
   11. │ └─x %>% dplyr::compute()
   12. ├─dplyr::compute(.)
   13. ├─omopgenerics:::compute.cdm_table(.)
   14. │ ├─dplyr::compute(...)
   15. │ └─CDMConnector:::compute.db_cdm(...)
   16. │   └─CDMConnector:::.computeQuery(...)
   17. │     └─dbplyr::sql_render(x)
   18. │       ├─dbplyr::sql_render(...)
   19. │       └─dbplyr:::sql_render.tbl_lazy(...)
   20. │         ├─dbplyr::sql_render(...)
   21. │         └─dbplyr:::sql_render.lazy_query(...)
   22. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   23. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   24. │             └─dbplyr:::get_select_sql(...)
   25. │               └─dbplyr:::translate_select_sql(con, select)
   26. │                 └─dbplyr::translate_sql_(...)
   27. │                   └─base::lapply(...)
   28. │                     └─dbplyr (local) FUN(X[[i]], ...)
   29. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   30. │                       └─rlang::eval_tidy(x, mask)
   31. └─CDMConnector::datediff
   32.   └─cli::cli_abort(...)
   33.     └─rlang::abort(...)
  ── Error ('test-addCohortIntersect.R:227:3'): multiple cohort entries per person ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% ... at test-addCohortIntersect.R:227:3
    2. ├─PatientProfiles::addCohortIntersectDays(...)
    3. │ └─x %>% ...
    4. ├─PatientProfiles::addIntersect(...)
    5. │ └─... %>% ...
    6. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    7. ├─dplyr::mutate(...)
    8. ├─PatientProfiles::addFutureObservation(...)
    9. │ └─x %>% ...
   10. ├─PatientProfiles::addDemographics(...)
   11. │ └─x %>% dplyr::compute()
   12. ├─dplyr::compute(.)
   13. ├─omopgenerics:::compute.cdm_table(.)
   14. │ ├─dplyr::compute(...)
   15. │ └─CDMConnector:::compute.db_cdm(...)
   16. │   └─CDMConnector:::.computeQuery(...)
   17. │     └─dbplyr::sql_render(x)
   18. │       ├─dbplyr::sql_render(...)
   19. │       └─dbplyr:::sql_render.tbl_lazy(...)
   20. │         ├─dbplyr::sql_render(...)
   21. │         └─dbplyr:::sql_render.lazy_query(...)
   22. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   23. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   24. │             └─dbplyr:::get_select_sql(...)
   25. │               └─dbplyr:::translate_select_sql(con, select)
   26. │                 └─dbplyr::translate_sql_(...)
   27. │                   └─base::lapply(...)
   28. │                     └─dbplyr (local) FUN(X[[i]], ...)
   29. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   30. │                       └─rlang::eval_tidy(x, mask)
   31. └─CDMConnector::datediff
   32.   └─cli::cli_abort(...)
   33.     └─rlang::abort(...)
  ── Error ('test-addCohortIntersect.R:287:3'): output names ─────────────────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% ... at test-addCohortIntersect.R:287:3
    2. ├─PatientProfiles::addCohortIntersectDays(...)
    3. │ └─x %>% ...
    4. ├─PatientProfiles::addIntersect(...)
    5. │ └─... %>% ...
    6. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    7. ├─dplyr::mutate(...)
    8. ├─PatientProfiles::addFutureObservation(...)
    9. │ └─x %>% ...
   10. ├─PatientProfiles::addDemographics(...)
   11. │ └─x %>% dplyr::compute()
   12. ├─dplyr::compute(.)
   13. ├─omopgenerics:::compute.cdm_table(.)
   14. │ ├─dplyr::compute(...)
   15. │ └─CDMConnector:::compute.db_cdm(...)
   16. │   └─CDMConnector:::.computeQuery(...)
   17. │     └─dbplyr::sql_render(x)
   18. │       ├─dbplyr::sql_render(...)
   19. │       └─dbplyr:::sql_render.tbl_lazy(...)
   20. │         ├─dbplyr::sql_render(...)
   21. │         └─dbplyr:::sql_render.lazy_query(...)
   22. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   23. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   24. │             └─dbplyr:::get_select_sql(...)
   25. │               └─dbplyr:::translate_select_sql(con, select)
   26. │                 └─dbplyr::translate_sql_(...)
   27. │                   └─base::lapply(...)
   28. │                     └─dbplyr (local) FUN(X[[i]], ...)
   29. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   30. │                       └─rlang::eval_tidy(x, mask)
   31. └─CDMConnector::datediff
   32.   └─cli::cli_abort(...)
   33.     └─rlang::abort(...)
  ── Error ('test-addCohortIntersect.R:458:3'): working examples ─────────────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─... %>% dplyr::arrange(subject_id, cohort_start_date) at test-addCohortIntersect.R:458:3
    2. ├─dplyr::arrange(., subject_id, cohort_start_date)
    3. ├─dplyr::collect(.)
    4. ├─PatientProfiles::addCohortIntersectCount(., targetCohortTable = "cohort2")
    5. │ └─x %>% ...
    6. ├─PatientProfiles::addIntersect(...)
    7. │ └─... %>% ...
    8. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    9. ├─dplyr::mutate(...)
   10. ├─PatientProfiles::addFutureObservation(...)
   11. │ └─x %>% ...
   12. ├─PatientProfiles::addDemographics(...)
   13. │ └─x %>% dplyr::compute()
   14. ├─dplyr::compute(.)
   15. ├─omopgenerics:::compute.cdm_table(.)
   16. │ ├─dplyr::compute(...)
   17. │ └─CDMConnector:::compute.db_cdm(...)
   18. │   └─CDMConnector:::.computeQuery(...)
   19. │     └─dbplyr::sql_render(x)
   20. │       ├─dbplyr::sql_render(...)
   21. │       └─dbplyr:::sql_render.tbl_lazy(...)
   22. │         ├─dbplyr::sql_render(...)
   23. │         └─dbplyr:::sql_render.lazy_query(...)
   24. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   25. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   26. │             └─dbplyr:::get_select_sql(...)
   27. │               └─dbplyr:::translate_select_sql(con, select)
   28. │                 └─dbplyr::translate_sql_(...)
   29. │                   └─base::lapply(...)
   30. │                     └─dbplyr (local) FUN(X[[i]], ...)
   31. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   32. │                       └─rlang::eval_tidy(x, mask)
   33. └─CDMConnector::datediff
   34.   └─cli::cli_abort(...)
   35.     └─rlang::abort(...)
  ── Error ('test-addCohortIntersect.R:564:3'): working examples ─────────────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─... %>% dplyr::arrange(subject_id, cohort_start_date) at test-addCohortIntersect.R:564:3
    2. ├─dplyr::arrange(., subject_id, cohort_start_date)
    3. ├─dplyr::collect(.)
    4. ├─PatientProfiles::addCohortIntersectFlag(., targetCohortTable = "cohort2")
    5. │ └─x %>% ...
    6. ├─PatientProfiles::addIntersect(...)
    7. │ └─... %>% ...
    8. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    9. ├─dplyr::mutate(...)
   10. ├─PatientProfiles::addFutureObservation(...)
   11. │ └─x %>% ...
   12. ├─PatientProfiles::addDemographics(...)
   13. │ └─x %>% dplyr::compute()
   14. ├─dplyr::compute(.)
   15. ├─omopgenerics:::compute.cdm_table(.)
   16. │ ├─dplyr::compute(...)
   17. │ └─CDMConnector:::compute.db_cdm(...)
   18. │   └─CDMConnector:::.computeQuery(...)
   19. │     └─dbplyr::sql_render(x)
   20. │       ├─dbplyr::sql_render(...)
   21. │       └─dbplyr:::sql_render.tbl_lazy(...)
   22. │         ├─dbplyr::sql_render(...)
   23. │         └─dbplyr:::sql_render.lazy_query(...)
   24. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   25. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   26. │             └─dbplyr:::get_select_sql(...)
   27. │               └─dbplyr:::translate_select_sql(con, select)
   28. │                 └─dbplyr::translate_sql_(...)
   29. │                   └─base::lapply(...)
   30. │                     └─dbplyr (local) FUN(X[[i]], ...)
   31. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   32. │                       └─rlang::eval_tidy(x, mask)
   33. └─CDMConnector::datediff
   34.   └─cli::cli_abort(...)
   35.     └─rlang::abort(...)
  ── Error ('test-addCohortIntersect.R:651:3'): working examples ─────────────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-addCohortIntersect.R:651:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─... %>% dplyr::arrange(subject_id, cohort_start_date)
    8. ├─dplyr::arrange(., subject_id, cohort_start_date)
    9. ├─dplyr::collect(.)
   10. ├─PatientProfiles::addCohortIntersect(., targetCohortTable = "cohort2")
   11. │ └─PatientProfiles:::.addCohortIntersect(...)
   12. │   └─x %>% ...
   13. ├─PatientProfiles::addIntersect(...)
   14. │ └─... %>% ...
   15. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
   16. ├─dplyr::mutate(...)
   17. ├─PatientProfiles::addFutureObservation(...)
   18. │ └─x %>% ...
   19. ├─PatientProfiles::addDemographics(...)
   20. │ └─x %>% dplyr::compute()
   21. ├─dplyr::compute(.)
   22. ├─omopgenerics:::compute.cdm_table(.)
   23. │ ├─dplyr::compute(...)
   24. │ └─CDMConnector:::compute.db_cdm(...)
   25. │   └─CDMConnector:::.computeQuery(...)
   26. │     └─dbplyr::sql_render(x)
   27. │       ├─dbplyr::sql_render(...)
   28. │       └─dbplyr:::sql_render.tbl_lazy(...)
   29. │         ├─dbplyr::sql_render(...)
   30. │         └─dbplyr:::sql_render.lazy_query(...)
   31. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   32. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   33. │             └─dbplyr:::get_select_sql(...)
   34. │               └─dbplyr:::translate_select_sql(con, select)
   35. │                 └─dbplyr::translate_sql_(...)
   36. │                   └─base::lapply(...)
   37. │                     └─dbplyr (local) FUN(X[[i]], ...)
   38. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   39. │                       └─rlang::eval_tidy(x, mask)
   40. └─CDMConnector::datediff
   41.   └─cli::cli_abort(...)
   42.     └─rlang::abort(...)
  ── Error ('test-addCohortIntersect.R:738:3'): censorDate functionality ─────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-addCohortIntersect.R:738:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─... %>% dplyr::arrange(subject_id, cohort_start_date)
    8. ├─dplyr::arrange(., subject_id, cohort_start_date)
    9. ├─dplyr::collect(.)
   10. ├─PatientProfiles::addCohortIntersect(., targetCohortTable = "cohort2")
   11. │ └─PatientProfiles:::.addCohortIntersect(...)
   12. │   └─x %>% ...
   13. ├─PatientProfiles::addIntersect(...)
   14. │ └─... %>% ...
   15. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
   16. ├─dplyr::mutate(...)
   17. ├─PatientProfiles::addFutureObservation(...)
   18. │ └─x %>% ...
   19. ├─PatientProfiles::addDemographics(...)
   20. │ └─x %>% dplyr::compute()
   21. ├─dplyr::compute(.)
   22. ├─omopgenerics:::compute.cdm_table(.)
   23. │ ├─dplyr::compute(...)
   24. │ └─CDMConnector:::compute.db_cdm(...)
   25. │   └─CDMConnector:::.computeQuery(...)
   26. │     └─dbplyr::sql_render(x)
   27. │       ├─dbplyr::sql_render(...)
   28. │       └─dbplyr:::sql_render.tbl_lazy(...)
   29. │         ├─dbplyr::sql_render(...)
   30. │         └─dbplyr:::sql_render.lazy_query(...)
   31. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   32. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   33. │             └─dbplyr:::get_select_sql(...)
   34. │               └─dbplyr:::translate_select_sql(con, select)
   35. │                 └─dbplyr::translate_sql_(...)
   36. │                   └─base::lapply(...)
   37. │                     └─dbplyr (local) FUN(X[[i]], ...)
   38. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   39. │                       └─rlang::eval_tidy(x, mask)
   40. └─CDMConnector::datediff
   41.   └─cli::cli_abort(...)
   42.     └─rlang::abort(...)
  ── Error ('test-addCohortIntersect.R:769:3'): casing of empty dates ────────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_false(...) at test-addCohortIntersect.R:769:3
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─... %>% is.numeric()
    5. ├─dplyr::pull(., "cohort_2_0_to_inf")
    6. ├─utils::head(., 1)
    7. ├─PatientProfiles::addCohortIntersectDate(., targetCohortTable = "cohort1")
    8. │ └─x %>% ...
    9. ├─PatientProfiles::addIntersect(...)
   10. │ └─... %>% ...
   11. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
   12. ├─dplyr::mutate(...)
   13. ├─PatientProfiles::addFutureObservation(...)
   14. │ └─x %>% ...
   15. ├─PatientProfiles::addDemographics(...)
   16. │ └─x %>% dplyr::compute()
   17. ├─dplyr::compute(.)
   18. ├─omopgenerics:::compute.cdm_table(.)
   19. │ ├─dplyr::compute(...)
   20. │ └─CDMConnector:::compute.db_cdm(...)
   21. │   └─CDMConnector:::.computeQuery(...)
   22. │     └─dbplyr::sql_render(x)
   23. │       ├─dbplyr::sql_render(...)
   24. │       └─dbplyr:::sql_render.tbl_lazy(...)
   25. │         ├─dbplyr::sql_render(...)
   26. │         └─dbplyr:::sql_render.lazy_query(...)
   27. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   28. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   29. │             └─dbplyr:::get_select_sql(...)
   30. │               └─dbplyr:::translate_select_sql(con, select)
   31. │                 └─dbplyr::translate_sql_(...)
   32. │                   └─base::lapply(...)
   33. │                     └─dbplyr (local) FUN(X[[i]], ...)
   34. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   35. │                       └─rlang::eval_tidy(x, mask)
   36. └─CDMConnector::datediff
   37.   └─cli::cli_abort(...)
   38.     └─rlang::abort(...)
  ── Error ('test-addFutureObservation.R:6:3'): check input length and type for each of the arguments ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(addFutureObservation(cdm$cohort1, "cdm")) at test-addFutureObservation.R:6:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─PatientProfiles::addFutureObservation(cdm$cohort1, "cdm")
    8. │ └─x %>% ...
    9. ├─PatientProfiles::addDemographics(...)
   10. │ └─x %>% dplyr::compute()
   11. ├─dplyr::compute(.)
   12. ├─omopgenerics:::compute.cdm_table(.)
   13. │ ├─dplyr::compute(...)
   14. │ └─CDMConnector:::compute.db_cdm(...)
   15. │   └─CDMConnector:::.computeQuery(...)
   16. │     └─dbplyr::sql_render(x)
   17. │       ├─dbplyr::sql_render(...)
   18. │       └─dbplyr:::sql_render.tbl_lazy(...)
   19. │         ├─dbplyr::sql_render(...)
   20. │         └─dbplyr:::sql_render.lazy_query(...)
   21. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   22. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   23. │             └─dbplyr:::get_select_sql(...)
   24. │               └─dbplyr:::translate_select_sql(con, select)
   25. │                 └─dbplyr::translate_sql_(...)
   26. │                   └─base::lapply(...)
   27. │                     └─dbplyr (local) FUN(X[[i]], ...)
   28. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   29. │                       └─rlang::eval_tidy(x, mask)
   30. └─CDMConnector::datediff
   31.   └─cli::cli_abort(...)
   32.     └─rlang::abort(...)
  ── Error ('test-addFutureObservation.R:15:3'): check condition_occurrence and cohort1 work ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_true(...) at test-addFutureObservation.R:15:3
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::typeof(cdm$cohort1 %>% addFutureObservation() %>% dplyr::collect())
    5. ├─cdm$cohort1 %>% addFutureObservation() %>% dplyr::collect()
    6. ├─dplyr::collect(.)
    7. ├─PatientProfiles::addFutureObservation(.)
    8. │ └─x %>% ...
    9. ├─PatientProfiles::addDemographics(...)
   10. │ └─x %>% dplyr::compute()
   11. ├─dplyr::compute(.)
   12. ├─omopgenerics:::compute.cdm_table(.)
   13. │ ├─dplyr::compute(...)
   14. │ └─CDMConnector:::compute.db_cdm(...)
   15. │   └─CDMConnector:::.computeQuery(...)
   16. │     └─dbplyr::sql_render(x)
   17. │       ├─dbplyr::sql_render(...)
   18. │       └─dbplyr:::sql_render.tbl_lazy(...)
   19. │         ├─dbplyr::sql_render(...)
   20. │         └─dbplyr:::sql_render.lazy_query(...)
   21. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   22. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   23. │             └─dbplyr:::get_select_sql(...)
   24. │               └─dbplyr:::translate_select_sql(con, select)
   25. │                 └─dbplyr::translate_sql_(...)
   26. │                   └─base::lapply(...)
   27. │                     └─dbplyr (local) FUN(X[[i]], ...)
   28. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   29. │                       └─rlang::eval_tidy(x, mask)
   30. └─CDMConnector::datediff
   31.   └─cli::cli_abort(...)
   32.     └─rlang::abort(...)
  ── Error ('test-addFutureObservation.R:64:3'): check working example with cohort1 ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% addFutureObservation() %>% dplyr::collect() at test-addFutureObservation.R:64:3
    2. ├─dplyr::collect(.)
    3. ├─PatientProfiles::addFutureObservation(.)
    4. │ └─x %>% ...
    5. ├─PatientProfiles::addDemographics(...)
    6. │ └─x %>% dplyr::compute()
    7. ├─dplyr::compute(.)
    8. ├─omopgenerics:::compute.cdm_table(.)
    9. │ ├─dplyr::compute(...)
   10. │ └─CDMConnector:::compute.db_cdm(...)
   11. │   └─CDMConnector:::.computeQuery(...)
   12. │     └─dbplyr::sql_render(x)
   13. │       ├─dbplyr::sql_render(...)
   14. │       └─dbplyr:::sql_render.tbl_lazy(...)
   15. │         ├─dbplyr::sql_render(...)
   16. │         └─dbplyr:::sql_render.lazy_query(...)
   17. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   18. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   19. │             └─dbplyr:::get_select_sql(...)
   20. │               └─dbplyr:::translate_select_sql(con, select)
   21. │                 └─dbplyr::translate_sql_(...)
   22. │                   └─base::lapply(...)
   23. │                     └─dbplyr (local) FUN(X[[i]], ...)
   24. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   25. │                       └─rlang::eval_tidy(x, mask)
   26. └─CDMConnector::datediff
   27.   └─cli::cli_abort(...)
   28.     └─rlang::abort(...)
  ── Error ('test-addFutureObservation.R:126:3'): check working example with condition_occurrence ──
  Error in `dplyr::collect(removeClass(x, "cdm_table"))`: Failed to collect lazy table.
  Caused by error:
  ! rapi_prepare: Failed to prepare query SELECT cohort1.*
  FROM main.cohort1
  WHERE NOT EXISTS (
    SELECT 1 FROM (
    SELECT cohort1.*, observation_period_start_date, observation_period_end_date
    FROM main.cohort1
    LEFT JOIN main.observation_period
      ON (cohort1.subject_id = observation_period.person_id)
  ) RHS
    WHERE
      (cohort1.cohort_definition_id = RHS.cohort_definition_id) AND
      (cohort1.subject_id = RHS.subject_id) AND
      (cohort1.cohort_start_date = RHS.cohort_start_date) AND
      (cohort1.cohort_end_date = RHS.cohort_end_date) AND
      (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )
  Error: Binder Error: Cannot compare values of type VARCHAR and type DATE - an explicit cast is required
  LINE 15:     (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )...
                                      ^
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addFutureObservation.R:126:3
    2. │ └─omopgenerics::newCohortTable(cdm[[cohort]])
    3. │   └─omopgenerics:::validateGeneratedCohortSet(cohort, soft = .softValidation)
    4. │     └─omopgenerics::checkCohortRequirements(...)
    5. │       └─omopgenerics:::checkObservationPeriod(...)
    6. │         ├─dplyr::collect(...)
    7. │         └─omopgenerics:::collect.cohort_table(...)
    8. │           ├─dplyr::collect(x)
    9. │           └─omopgenerics:::collect.cdm_table(x)
   10. │             ├─dplyr::collect(removeClass(x, "cdm_table"))
   11. │             └─dbplyr:::collect.tbl_sql(removeClass(x, "cdm_table"))
   12. │               ├─base::withCallingHandlers(...)
   13. │               ├─dbplyr::db_collect(...)
   14. │               └─dbplyr:::db_collect.DBIConnection(...)
   15. │                 ├─DBI::dbSendQuery(con, sql)
   16. │                 └─duckdb::dbSendQuery(con, sql)
   17. │                   └─duckdb (local) .local(conn, statement, ...)
   18. │                     └─duckdb:::rapi_prepare(conn@conn_ref, statement)
   19. └─base::.handleSimpleError(...)
   20.   └─dbplyr (local) h(simpleError(msg, call))
   21.     └─cli::cli_abort("Failed to collect lazy table.", parent = cnd)
   22.       └─rlang::abort(...)
  ── Error ('test-addFutureObservation.R:198:3'): different name ─────────────────
  Error in `dplyr::collect(removeClass(x, "cdm_table"))`: Failed to collect lazy table.
  Caused by error:
  ! rapi_prepare: Failed to prepare query SELECT cohort1.*
  FROM main.cohort1
  WHERE NOT EXISTS (
    SELECT 1 FROM (
    SELECT cohort1.*, observation_period_start_date, observation_period_end_date
    FROM main.cohort1
    LEFT JOIN main.observation_period
      ON (cohort1.subject_id = observation_period.person_id)
  ) RHS
    WHERE
      (cohort1.cohort_definition_id = RHS.cohort_definition_id) AND
      (cohort1.subject_id = RHS.subject_id) AND
      (cohort1.cohort_start_date = RHS.cohort_start_date) AND
      (cohort1.cohort_end_date = RHS.cohort_end_date) AND
      (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )
  Error: Binder Error: Cannot compare values of type VARCHAR and type DATE - an explicit cast is required
  LINE 15:     (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )...
                                      ^
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addFutureObservation.R:198:3
    2. │ └─omopgenerics::newCohortTable(cdm[[cohort]])
    3. │   └─omopgenerics:::validateGeneratedCohortSet(cohort, soft = .softValidation)
    4. │     └─omopgenerics::checkCohortRequirements(...)
    5. │       └─omopgenerics:::checkObservationPeriod(...)
    6. │         ├─dplyr::collect(...)
    7. │         └─omopgenerics:::collect.cohort_table(...)
    8. │           ├─dplyr::collect(x)
    9. │           └─omopgenerics:::collect.cdm_table(x)
   10. │             ├─dplyr::collect(removeClass(x, "cdm_table"))
   11. │             └─dbplyr:::collect.tbl_sql(removeClass(x, "cdm_table"))
   12. │               ├─base::withCallingHandlers(...)
   13. │               ├─dbplyr::db_collect(...)
   14. │               └─dbplyr:::db_collect.DBIConnection(...)
   15. │                 ├─DBI::dbSendQuery(con, sql)
   16. │                 └─duckdb::dbSendQuery(con, sql)
   17. │                   └─duckdb (local) .local(conn, statement, ...)
   18. │                     └─duckdb:::rapi_prepare(conn@conn_ref, statement)
   19. └─base::.handleSimpleError(...)
   20.   └─dbplyr (local) h(simpleError(msg, call))
   21.     └─cli::cli_abort("Failed to collect lazy table.", parent = cnd)
   22.       └─rlang::abort(...)
  ── Error ('test-addFutureObservation.R:251:3'): priorHistory and future_observation - outside of observation period ──
  Error in `dplyr::collect(removeClass(x, "cdm_table"))`: Failed to collect lazy table.
  Caused by error:
  ! rapi_prepare: Failed to prepare query SELECT cohort1.*
  FROM main.cohort1
  WHERE NOT EXISTS (
    SELECT 1 FROM (
    SELECT cohort1.*, observation_period_start_date, observation_period_end_date
    FROM main.cohort1
    LEFT JOIN main.observation_period
      ON (cohort1.subject_id = observation_period.person_id)
  ) RHS
    WHERE
      (cohort1.cohort_definition_id = RHS.cohort_definition_id) AND
      (cohort1.subject_id = RHS.subject_id) AND
      (cohort1.cohort_start_date = RHS.cohort_start_date) AND
      (cohort1.cohort_end_date = RHS.cohort_end_date) AND
      (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )
  Error: Binder Error: Cannot compare values of type VARCHAR and type DATE - an explicit cast is required
  LINE 15:     (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )...
                                      ^
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addFutureObservation.R:251:3
    2. │ └─omopgenerics::newCohortTable(cdm[[cohort]])
    3. │   └─omopgenerics:::validateGeneratedCohortSet(cohort, soft = .softValidation)
    4. │     └─omopgenerics::checkCohortRequirements(...)
    5. │       └─omopgenerics:::checkObservationPeriod(...)
    6. │         ├─dplyr::collect(...)
    7. │         └─omopgenerics:::collect.cohort_table(...)
    8. │           ├─dplyr::collect(x)
    9. │           └─omopgenerics:::collect.cdm_table(x)
   10. │             ├─dplyr::collect(removeClass(x, "cdm_table"))
   11. │             └─dbplyr:::collect.tbl_sql(removeClass(x, "cdm_table"))
   12. │               ├─base::withCallingHandlers(...)
   13. │               ├─dbplyr::db_collect(...)
   14. │               └─dbplyr:::db_collect.DBIConnection(...)
   15. │                 ├─DBI::dbSendQuery(con, sql)
   16. │                 └─duckdb::dbSendQuery(con, sql)
   17. │                   └─duckdb (local) .local(conn, statement, ...)
   18. │                     └─duckdb:::rapi_prepare(conn@conn_ref, statement)
   19. └─base::.handleSimpleError(...)
   20.   └─dbplyr (local) h(simpleError(msg, call))
   21.     └─cli::cli_abort("Failed to collect lazy table.", parent = cnd)
   22.       └─rlang::abort(...)
  ── Error ('test-addFutureObservation.R:301:3'): multiple observation periods ───
  Error in `dplyr::collect(removeClass(x, "cdm_table"))`: Failed to collect lazy table.
  Caused by error:
  ! rapi_prepare: Failed to prepare query SELECT cohort2.*
  FROM main.cohort2
  WHERE NOT EXISTS (
    SELECT 1 FROM (
    SELECT cohort2.*, observation_period_start_date, observation_period_end_date
    FROM main.cohort2
    LEFT JOIN main.observation_period
      ON (cohort2.subject_id = observation_period.person_id)
  ) RHS
    WHERE
      (cohort2.cohort_definition_id = RHS.cohort_definition_id) AND
      (cohort2.subject_id = RHS.subject_id) AND
      (cohort2.cohort_start_date = RHS.cohort_start_date) AND
      (cohort2.cohort_end_date = RHS.cohort_end_date) AND
      (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )
  Error: Binder Error: Cannot compare values of type VARCHAR and type DATE - an explicit cast is required
  LINE 15:     (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )...
                                      ^
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addFutureObservation.R:301:3
    2. │ └─omopgenerics::newCohortTable(cdm[[cohort]])
    3. │   └─omopgenerics:::validateGeneratedCohortSet(cohort, soft = .softValidation)
    4. │     └─omopgenerics::checkCohortRequirements(...)
    5. │       └─omopgenerics:::checkObservationPeriod(...)
    6. │         ├─dplyr::collect(...)
    7. │         └─omopgenerics:::collect.cohort_table(...)
    8. │           ├─dplyr::collect(x)
    9. │           └─omopgenerics:::collect.cdm_table(x)
   10. │             ├─dplyr::collect(removeClass(x, "cdm_table"))
   11. │             └─dbplyr:::collect.tbl_sql(removeClass(x, "cdm_table"))
   12. │               ├─base::withCallingHandlers(...)
   13. │               ├─dbplyr::db_collect(...)
   14. │               └─dbplyr:::db_collect.DBIConnection(...)
   15. │                 ├─DBI::dbSendQuery(con, sql)
   16. │                 └─duckdb::dbSendQuery(con, sql)
   17. │                   └─duckdb (local) .local(conn, statement, ...)
   18. │                     └─duckdb:::rapi_prepare(conn@conn_ref, statement)
   19. └─base::.handleSimpleError(...)
   20.   └─dbplyr (local) h(simpleError(msg, call))
   21.     └─cli::cli_abort("Failed to collect lazy table.", parent = cnd)
   22.       └─rlang::abort(...)
  ── Error ('test-addInObservation.R:4:3'): addInObservation, input length and type ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(addInObservation(cdm$cohort2, "cdm")) at test-addInObservation.R:4:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─PatientProfiles::addInObservation(cdm$cohort2, "cdm")
    8. │ └─... %>% ...
    9. ├─dplyr::select(., -"prior_observation", -"future_observation")
   10. ├─dplyr::mutate(...)
   11. ├─PatientProfiles::addDemographics(...)
   12. │ └─x %>% dplyr::compute()
   13. ├─dplyr::compute(.)
   14. ├─omopgenerics:::compute.cdm_table(.)
   15. │ ├─dplyr::compute(...)
   16. │ └─CDMConnector:::compute.db_cdm(...)
   17. │   └─CDMConnector:::.computeQuery(...)
   18. │     └─dbplyr::sql_render(x)
   19. │       ├─dbplyr::sql_render(...)
   20. │       └─dbplyr:::sql_render.tbl_lazy(...)
   21. │         ├─dbplyr::sql_render(...)
   22. │         └─dbplyr:::sql_render.lazy_query(...)
   23. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   24. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   25. │             └─dbplyr:::get_select_sql(...)
   26. │               └─dbplyr:::translate_select_sql(con, select)
   27. │                 └─dbplyr::translate_sql_(...)
   28. │                   └─base::lapply(...)
   29. │                     └─dbplyr (local) FUN(X[[i]], ...)
   30. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   31. │                       └─rlang::eval_tidy(x, mask)
   32. └─CDMConnector::datediff
   33.   └─cli::cli_abort(...)
   34.     └─rlang::abort(...)
  ── Error ('test-addInObservation.R:16:3'): addInObservation, cohort and condition_occurrence ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─PatientProfiles::addInObservation(cdm$cohort1) at test-addInObservation.R:16:3
    2. │ └─... %>% ...
    3. ├─dplyr::select(., -"prior_observation", -"future_observation")
    4. ├─dplyr::mutate(...)
    5. ├─PatientProfiles::addDemographics(...)
    6. │ └─x %>% dplyr::compute()
    7. ├─dplyr::compute(.)
    8. ├─omopgenerics:::compute.cdm_table(.)
    9. │ ├─dplyr::compute(...)
   10. │ └─CDMConnector:::compute.db_cdm(...)
   11. │   └─CDMConnector:::.computeQuery(...)
   12. │     └─dbplyr::sql_render(x)
   13. │       ├─dbplyr::sql_render(...)
   14. │       └─dbplyr:::sql_render.tbl_lazy(...)
   15. │         ├─dbplyr::sql_render(...)
   16. │         └─dbplyr:::sql_render.lazy_query(...)
   17. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   18. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   19. │             └─dbplyr:::get_select_sql(...)
   20. │               └─dbplyr:::translate_select_sql(con, select)
   21. │                 └─dbplyr::translate_sql_(...)
   22. │                   └─base::lapply(...)
   23. │                     └─dbplyr (local) FUN(X[[i]], ...)
   24. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   25. │                       └─rlang::eval_tidy(x, mask)
   26. └─CDMConnector::datediff
   27.   └─cli::cli_abort(...)
   28.     └─rlang::abort(...)
  ── Error ('test-addInObservation.R:44:3'): addInObservation, parameters ────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─PatientProfiles::addInObservation(...) at test-addInObservation.R:44:3
    2. │ └─... %>% ...
    3. ├─dplyr::select(., -"prior_observation", -"future_observation")
    4. ├─dplyr::mutate(...)
    5. ├─PatientProfiles::addDemographics(...)
    6. │ └─x %>% dplyr::compute()
    7. ├─dplyr::compute(.)
    8. ├─omopgenerics:::compute.cdm_table(.)
    9. │ ├─dplyr::compute(...)
   10. │ └─CDMConnector:::compute.db_cdm(...)
   11. │   └─CDMConnector:::.computeQuery(...)
   12. │     └─dbplyr::sql_render(x)
   13. │       ├─dbplyr::sql_render(...)
   14. │       └─dbplyr:::sql_render.tbl_lazy(...)
   15. │         ├─dbplyr::sql_render(...)
   16. │         └─dbplyr:::sql_render.lazy_query(...)
   17. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   18. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   19. │             └─dbplyr:::get_select_sql(...)
   20. │               └─dbplyr:::translate_select_sql(con, select)
   21. │                 └─dbplyr::translate_sql_(...)
   22. │                   └─base::lapply(...)
   23. │                     └─dbplyr (local) FUN(X[[i]], ...)
   24. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   25. │                       └─rlang::eval_tidy(x, mask)
   26. └─CDMConnector::datediff
   27.   └─cli::cli_abort(...)
   28.     └─rlang::abort(...)
  ── Error ('test-addDemographics.R:15:3'): addDemographics, cohort and condition_occurrence ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% ... at test-addDemographics.R:15:3
    2. ├─PatientProfiles::addDemographics(., ageImposeMonth = TRUE, ageImposeDay = TRUE)
    3. │ └─x %>% dplyr::compute()
    4. ├─dplyr::compute(.)
    5. ├─omopgenerics:::compute.cdm_table(.)
    6. │ ├─dplyr::compute(...)
    7. │ └─CDMConnector:::compute.db_cdm(...)
    8. │   └─CDMConnector:::.computeQuery(...)
    9. │     └─dbplyr::sql_render(x)
   10. │       ├─dbplyr::sql_render(...)
   11. │       └─dbplyr:::sql_render.tbl_lazy(...)
   12. │         ├─dbplyr::sql_render(...)
   13. │         └─dbplyr:::sql_render.lazy_query(...)
   14. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   15. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   16. │             ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   17. │             └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   18. │               └─dbplyr:::get_select_sql(...)
   19. │                 └─dbplyr:::translate_select_sql(con, select)
   20. │                   └─dbplyr::translate_sql_(...)
   21. │                     └─base::lapply(...)
   22. │                       └─dbplyr (local) FUN(X[[i]], ...)
   23. │                         ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   24. │                         └─rlang::eval_tidy(x, mask)
   25. └─CDMConnector::datediff
   26.   └─cli::cli_abort(...)
   27.     └─rlang::abort(...)
  ── Error ('test-addDemographics.R:97:3'): addDemographics, parameters ──────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% ... at test-addDemographics.R:97:3
    2. ├─PatientProfiles::addDemographics(...)
    3. │ └─x %>% dplyr::compute()
    4. ├─dplyr::compute(.)
    5. ├─omopgenerics:::compute.cdm_table(.)
    6. │ ├─dplyr::compute(...)
    7. │ └─CDMConnector:::compute.db_cdm(...)
    8. │   └─CDMConnector:::.computeQuery(...)
    9. │     └─dbplyr::sql_render(x)
   10. │       ├─dbplyr::sql_render(...)
   11. │       └─dbplyr:::sql_render.tbl_lazy(...)
   12. │         ├─dbplyr::sql_render(...)
   13. │         └─dbplyr:::sql_render.lazy_query(...)
   14. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   15. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   16. │             ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   17. │             └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   18. │               └─dbplyr:::get_select_sql(...)
   19. │                 └─dbplyr:::translate_select_sql(con, select)
   20. │                   └─dbplyr::translate_sql_(...)
   21. │                     └─base::lapply(...)
   22. │                       └─dbplyr (local) FUN(X[[i]], ...)
   23. │                         ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   24. │                         └─rlang::eval_tidy(x, mask)
   25. └─CDMConnector::datediff
   26.   └─cli::cli_abort(...)
   27.     └─rlang::abort(...)
  ── Error ('test-addDemographics.R:183:3'): partial demographics - cohorts ──────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% ... at test-addDemographics.R:183:3
    2. ├─PatientProfiles::addDemographics(...)
    3. │ └─x %>% dplyr::compute()
    4. ├─dplyr::compute(.)
    5. ├─omopgenerics:::compute.cdm_table(.)
    6. │ ├─dplyr::compute(...)
    7. │ └─CDMConnector:::compute.db_cdm(...)
    8. │   └─CDMConnector:::.computeQuery(...)
    9. │     └─dbplyr::sql_render(x)
   10. │       ├─dbplyr::sql_render(...)
   11. │       └─dbplyr:::sql_render.tbl_lazy(...)
   12. │         ├─dbplyr::sql_render(...)
   13. │         └─dbplyr:::sql_render.lazy_query(...)
   14. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   15. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   16. │             └─dbplyr:::get_select_sql(...)
   17. │               └─dbplyr:::translate_select_sql(con, select)
   18. │                 └─dbplyr::translate_sql_(...)
   19. │                   └─base::lapply(...)
   20. │                     └─dbplyr (local) FUN(X[[i]], ...)
   21. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   22. │                       └─rlang::eval_tidy(x, mask)
   23. └─CDMConnector::datediff
   24.   └─cli::cli_abort(...)
   25.     └─rlang::abort(...)
  ── Error ('test-addDemographics.R:247:3'): partial demographics - omop tables ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$condition_occurrence %>% ... at test-addDemographics.R:247:3
    2. ├─PatientProfiles::addDemographics(...)
    3. │ └─x %>% dplyr::compute()
    4. ├─dplyr::compute(.)
    5. ├─omopgenerics:::compute.cdm_table(.)
    6. │ ├─dplyr::compute(...)
    7. │ └─CDMConnector:::compute.db_cdm(...)
    8. │   └─CDMConnector:::.computeQuery(...)
    9. │     └─dbplyr::sql_render(x)
   10. │       ├─dbplyr::sql_render(...)
   11. │       └─dbplyr:::sql_render.tbl_lazy(...)
   12. │         ├─dbplyr::sql_render(...)
   13. │         └─dbplyr:::sql_render.lazy_query(...)
   14. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   15. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   16. │             └─dbplyr:::get_select_sql(...)
   17. │               └─dbplyr:::translate_select_sql(con, select)
   18. │                 └─dbplyr::translate_sql_(...)
   19. │                   └─base::lapply(...)
   20. │                     └─dbplyr (local) FUN(X[[i]], ...)
   21. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   22. │                       └─rlang::eval_tidy(x, mask)
   23. └─CDMConnector::datediff
   24.   └─cli::cli_abort(...)
   25.     └─rlang::abort(...)
  ── Error ('test-addDemographics.R:316:3'): priorObservation and future_observation - outside of observation period ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$condition_occurrence %>% ... at test-addDemographics.R:316:3
    2. ├─PatientProfiles::addDemographics(...)
    3. │ └─x %>% dplyr::compute()
    4. ├─dplyr::compute(.)
    5. ├─omopgenerics:::compute.cdm_table(.)
    6. │ ├─dplyr::compute(...)
    7. │ └─CDMConnector:::compute.db_cdm(...)
    8. │   └─CDMConnector:::.computeQuery(...)
    9. │     └─dbplyr::sql_render(x)
   10. │       ├─dbplyr::sql_render(...)
   11. │       └─dbplyr:::sql_render.tbl_lazy(...)
   12. │         ├─dbplyr::sql_render(...)
   13. │         └─dbplyr:::sql_render.lazy_query(...)
   14. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   15. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   16. │             └─dbplyr:::get_select_sql(...)
   17. │               └─dbplyr:::translate_select_sql(con, select)
   18. │                 └─dbplyr::translate_sql_(...)
   19. │                   └─base::lapply(...)
   20. │                     └─dbplyr (local) FUN(X[[i]], ...)
   21. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   22. │                       └─rlang::eval_tidy(x, mask)
   23. └─CDMConnector::datediff
   24.   └─cli::cli_abort(...)
   25.     └─rlang::abort(...)
  ── Error ('test-addDemographics.R:373:3'): priorObservation - multiple observation periods ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% ... at test-addDemographics.R:373:3
    2. ├─PatientProfiles::addDemographics(...)
    3. │ └─x %>% dplyr::compute()
    4. ├─dplyr::compute(.)
    5. ├─omopgenerics:::compute.cdm_table(.)
    6. │ ├─dplyr::compute(...)
    7. │ └─CDMConnector:::compute.db_cdm(...)
    8. │   └─CDMConnector:::.computeQuery(...)
    9. │     └─dbplyr::sql_render(x)
   10. │       ├─dbplyr::sql_render(...)
   11. │       └─dbplyr:::sql_render.tbl_lazy(...)
   12. │         ├─dbplyr::sql_render(...)
   13. │         └─dbplyr:::sql_render.lazy_query(...)
   14. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   15. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   16. │             └─dbplyr:::get_select_sql(...)
   17. │               └─dbplyr:::translate_select_sql(con, select)
   18. │                 └─dbplyr::translate_sql_(...)
   19. │                   └─base::lapply(...)
   20. │                     └─dbplyr (local) FUN(X[[i]], ...)
   21. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   22. │                       └─rlang::eval_tidy(x, mask)
   23. └─CDMConnector::datediff
   24.   └─cli::cli_abort(...)
   25.     └─rlang::abort(...)
  ── Error ('test-addDemographics.R:451:3'): check that no extra rows are added ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% ... at test-addDemographics.R:451:3
    2. ├─PatientProfiles::addDemographics(...)
    3. │ └─x %>% dplyr::compute()
    4. ├─dplyr::compute(.)
    5. ├─omopgenerics:::compute.cdm_table(.)
    6. │ ├─dplyr::compute(...)
    7. │ └─CDMConnector:::compute.db_cdm(...)
    8. │   └─CDMConnector:::.computeQuery(...)
    9. │     └─dbplyr::sql_render(x)
   10. │       ├─dbplyr::sql_render(...)
   11. │       └─dbplyr:::sql_render.tbl_lazy(...)
   12. │         ├─dbplyr::sql_render(...)
   13. │         └─dbplyr:::sql_render.lazy_query(...)
   14. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   15. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   16. │             └─dbplyr:::get_select_sql(...)
   17. │               └─dbplyr:::translate_select_sql(con, select)
   18. │                 └─dbplyr::translate_sql_(...)
   19. │                   └─base::lapply(...)
   20. │                     └─dbplyr (local) FUN(X[[i]], ...)
   21. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   22. │                       └─rlang::eval_tidy(x, mask)
   23. └─CDMConnector::datediff
   24.   └─cli::cli_abort(...)
   25.     └─rlang::abort(...)
  ── Error ('test-addDemographics.R:538:3'): age at cohort end, no missing, check age computation ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─... %>% dplyr::collect() at test-addDemographics.R:538:3
    2. ├─dplyr::collect(.)
    3. ├─PatientProfiles::addDemographics(...)
    4. │ └─x %>% dplyr::compute()
    5. ├─dplyr::compute(.)
    6. ├─omopgenerics:::compute.cdm_table(.)
    7. │ ├─dplyr::compute(...)
    8. │ └─CDMConnector:::compute.db_cdm(...)
    9. │   └─CDMConnector:::.computeQuery(...)
   10. │     └─dbplyr::sql_render(x)
   11. │       ├─dbplyr::sql_render(...)
   12. │       └─dbplyr:::sql_render.tbl_lazy(...)
   13. │         ├─dbplyr::sql_render(...)
   14. │         └─dbplyr:::sql_render.lazy_query(...)
   15. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   16. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   17. │             ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   18. │             └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   19. │               └─dbplyr:::get_select_sql(...)
   20. │                 └─dbplyr:::translate_select_sql(con, select)
   21. │                   └─dbplyr::translate_sql_(...)
   22. │                     └─base::lapply(...)
   23. │                       └─dbplyr (local) FUN(X[[i]], ...)
   24. │                         ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   25. │                         └─rlang::eval_tidy(x, mask)
   26. └─CDMConnector::datediff
   27.   └─cli::cli_abort(...)
   28.     └─rlang::abort(...)
  ── Error ('test-addDemographics.R:1077:3'): test if column exist, overwrite ────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-addDemographics.R:1077:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─cdm$cohort1 %>% addDemographics() %>% dplyr::collect()
    8. ├─dplyr::collect(.)
    9. ├─PatientProfiles::addDemographics(.)
   10. │ └─x %>% dplyr::compute()
   11. ├─dplyr::compute(.)
   12. ├─omopgenerics:::compute.cdm_table(.)
   13. │ ├─dplyr::compute(...)
   14. │ └─CDMConnector:::compute.db_cdm(...)
   15. │   └─CDMConnector:::.computeQuery(...)
   16. │     └─dbplyr::sql_render(x)
   17. │       ├─dbplyr::sql_render(...)
   18. │       └─dbplyr:::sql_render.tbl_lazy(...)
   19. │         ├─dbplyr::sql_render(...)
   20. │         └─dbplyr:::sql_render.lazy_query(...)
   21. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   22. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   23. │             ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   24. │             └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   25. │               └─dbplyr:::get_select_sql(...)
   26. │                 └─dbplyr:::translate_select_sql(con, select)
   27. │                   └─dbplyr::translate_sql_(...)
   28. │                     └─base::lapply(...)
   29. │                       └─dbplyr (local) FUN(X[[i]], ...)
   30. │                         ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   31. │                         └─rlang::eval_tidy(x, mask)
   32. └─CDMConnector::datediff
   33.   └─cli::cli_abort(...)
   34.     └─rlang::abort(...)
  ── Error ('test-addDemographics.R:1232:3'): overwriting obs period variables ───
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(cdm$cohort1 <- cdm$cohort1 %>% PatientProfiles::addDemographics()) at test-addDemographics.R:1232:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─cdm$cohort1 %>% PatientProfiles::addDemographics()
    8. ├─PatientProfiles::addDemographics(.)
    9. │ └─x %>% dplyr::compute()
   10. ├─dplyr::compute(.)
   11. ├─omopgenerics:::compute.cdm_table(.)
   12. │ ├─dplyr::compute(...)
   13. │ └─CDMConnector:::compute.db_cdm(...)
   14. │   └─CDMConnector:::.computeQuery(...)
   15. │     └─dbplyr::sql_render(x)
   16. │       ├─dbplyr::sql_render(...)
   17. │       └─dbplyr:::sql_render.tbl_lazy(...)
   18. │         ├─dbplyr::sql_render(...)
   19. │         └─dbplyr:::sql_render.lazy_query(...)
   20. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   21. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   22. │             ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   23. │             └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   24. │               └─dbplyr:::get_select_sql(...)
   25. │                 └─dbplyr:::translate_select_sql(con, select)
   26. │                   └─dbplyr::translate_sql_(...)
   27. │                     └─base::lapply(...)
   28. │                       └─dbplyr (local) FUN(X[[i]], ...)
   29. │                         ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   30. │                         └─rlang::eval_tidy(x, mask)
   31. └─CDMConnector::datediff
   32.   └─cli::cli_abort(...)
   33.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:55:3'): working examples ────────────────────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% ... at test-addIntersect.R:55:3
    2. ├─PatientProfiles::addIntersect(...)
    3. │ └─... %>% ...
    4. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    5. ├─dplyr::mutate(...)
    6. ├─PatientProfiles::addFutureObservation(...)
    7. │ └─x %>% ...
    8. ├─PatientProfiles::addDemographics(...)
    9. │ └─x %>% dplyr::compute()
   10. ├─dplyr::compute(.)
   11. ├─omopgenerics:::compute.cdm_table(.)
   12. │ ├─dplyr::compute(...)
   13. │ └─CDMConnector:::compute.db_cdm(...)
   14. │   └─CDMConnector:::.computeQuery(...)
   15. │     └─dbplyr::sql_render(x)
   16. │       ├─dbplyr::sql_render(...)
   17. │       └─dbplyr:::sql_render.tbl_lazy(...)
   18. │         ├─dbplyr::sql_render(...)
   19. │         └─dbplyr:::sql_render.lazy_query(...)
   20. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   21. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   22. │             └─dbplyr:::get_select_sql(...)
   23. │               └─dbplyr:::translate_select_sql(con, select)
   24. │                 └─dbplyr::translate_sql_(...)
   25. │                   └─base::lapply(...)
   26. │                     └─dbplyr (local) FUN(X[[i]], ...)
   27. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   28. │                       └─rlang::eval_tidy(x, mask)
   29. └─CDMConnector::datediff
   30.   └─cli::cli_abort(...)
   31.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:251:3'): working examples with cohort_end_date ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─dplyr::arrange(...) at test-addIntersect.R:251:3
    2. ├─... %>% dplyr::collect()
    3. ├─dplyr::collect(.)
    4. ├─PatientProfiles::addIntersect(...)
    5. │ └─... %>% ...
    6. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    7. ├─dplyr::mutate(...)
    8. ├─PatientProfiles::addFutureObservation(...)
    9. │ └─x %>% ...
   10. ├─PatientProfiles::addDemographics(...)
   11. │ └─x %>% dplyr::compute()
   12. ├─dplyr::compute(.)
   13. ├─omopgenerics:::compute.cdm_table(.)
   14. │ ├─dplyr::compute(...)
   15. │ └─CDMConnector:::compute.db_cdm(...)
   16. │   └─CDMConnector:::.computeQuery(...)
   17. │     └─dbplyr::sql_render(x)
   18. │       ├─dbplyr::sql_render(...)
   19. │       └─dbplyr:::sql_render.tbl_lazy(...)
   20. │         ├─dbplyr::sql_render(...)
   21. │         └─dbplyr:::sql_render.lazy_query(...)
   22. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   23. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   24. │             └─dbplyr:::get_select_sql(...)
   25. │               └─dbplyr:::translate_select_sql(con, select)
   26. │                 └─dbplyr::translate_sql_(...)
   27. │                   └─base::lapply(...)
   28. │                     └─dbplyr (local) FUN(X[[i]], ...)
   29. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   30. │                       └─rlang::eval_tidy(x, mask)
   31. └─CDMConnector::datediff
   32.   └─cli::cli_abort(...)
   33.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:323:3'): working examples with extra column ─────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─dplyr::arrange(...) at test-addIntersect.R:323:3
    2. ├─... %>% dplyr::collect()
    3. ├─dplyr::collect(.)
    4. ├─PatientProfiles::addIntersect(...)
    5. │ └─... %>% ...
    6. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    7. ├─dplyr::mutate(...)
    8. ├─PatientProfiles::addFutureObservation(...)
    9. │ └─x %>% ...
   10. ├─PatientProfiles::addDemographics(...)
   11. │ └─x %>% dplyr::compute()
   12. ├─dplyr::compute(.)
   13. ├─omopgenerics:::compute.cdm_table(.)
   14. │ ├─dplyr::compute(...)
   15. │ └─CDMConnector:::compute.db_cdm(...)
   16. │   └─CDMConnector:::.computeQuery(...)
   17. │     └─dbplyr::sql_render(x)
   18. │       ├─dbplyr::sql_render(...)
   19. │       └─dbplyr:::sql_render.tbl_lazy(...)
   20. │         ├─dbplyr::sql_render(...)
   21. │         └─dbplyr:::sql_render.lazy_query(...)
   22. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   23. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   24. │             └─dbplyr:::get_select_sql(...)
   25. │               └─dbplyr:::translate_select_sql(con, select)
   26. │                 └─dbplyr::translate_sql_(...)
   27. │                   └─base::lapply(...)
   28. │                     └─dbplyr (local) FUN(X[[i]], ...)
   29. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   30. │                       └─rlang::eval_tidy(x, mask)
   31. └─CDMConnector::datediff
   32.   └─cli::cli_abort(...)
   33.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:451:3'): working examples with multiple cohort Ids ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─dplyr::arrange(...) at test-addIntersect.R:451:3
    2. ├─... %>% dplyr::collect()
    3. ├─dplyr::collect(.)
    4. ├─PatientProfiles::addIntersect(...)
    5. │ └─... %>% ...
    6. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    7. ├─dplyr::mutate(...)
    8. ├─PatientProfiles::addFutureObservation(...)
    9. │ └─x %>% ...
   10. ├─PatientProfiles::addDemographics(...)
   11. │ └─x %>% dplyr::compute()
   12. ├─dplyr::compute(.)
   13. ├─omopgenerics:::compute.cdm_table(.)
   14. │ ├─dplyr::compute(...)
   15. │ └─CDMConnector:::compute.db_cdm(...)
   16. │   └─CDMConnector:::.computeQuery(...)
   17. │     └─dbplyr::sql_render(x)
   18. │       ├─dbplyr::sql_render(...)
   19. │       └─dbplyr:::sql_render.tbl_lazy(...)
   20. │         ├─dbplyr::sql_render(...)
   21. │         └─dbplyr:::sql_render.lazy_query(...)
   22. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   23. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   24. │             └─dbplyr:::get_select_sql(...)
   25. │               └─dbplyr:::translate_select_sql(con, select)
   26. │                 └─dbplyr::translate_sql_(...)
   27. │                   └─base::lapply(...)
   28. │                     └─dbplyr (local) FUN(X[[i]], ...)
   29. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   30. │                       └─rlang::eval_tidy(x, mask)
   31. └─CDMConnector::datediff
   32.   └─cli::cli_abort(...)
   33.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:547:3'): working examples calculating as incidence target cohort ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─dplyr::arrange(...) at test-addIntersect.R:547:3
    2. ├─... %>% dplyr::collect()
    3. ├─dplyr::collect(.)
    4. ├─PatientProfiles::addIntersect(...)
    5. │ └─... %>% ...
    6. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    7. ├─dplyr::mutate(...)
    8. ├─PatientProfiles::addFutureObservation(...)
    9. │ └─x %>% ...
   10. ├─PatientProfiles::addDemographics(...)
   11. │ └─x %>% dplyr::compute()
   12. ├─dplyr::compute(.)
   13. ├─omopgenerics:::compute.cdm_table(.)
   14. │ ├─dplyr::compute(...)
   15. │ └─CDMConnector:::compute.db_cdm(...)
   16. │   └─CDMConnector:::.computeQuery(...)
   17. │     └─dbplyr::sql_render(x)
   18. │       ├─dbplyr::sql_render(...)
   19. │       └─dbplyr:::sql_render.tbl_lazy(...)
   20. │         ├─dbplyr::sql_render(...)
   21. │         └─dbplyr:::sql_render.lazy_query(...)
   22. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   23. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   24. │             └─dbplyr:::get_select_sql(...)
   25. │               └─dbplyr:::translate_select_sql(con, select)
   26. │                 └─dbplyr::translate_sql_(...)
   27. │                   └─base::lapply(...)
   28. │                     └─dbplyr (local) FUN(X[[i]], ...)
   29. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   30. │                       └─rlang::eval_tidy(x, mask)
   31. └─CDMConnector::datediff
   32.   └─cli::cli_abort(...)
   33.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:621:3'): working examples with more than one window ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─dplyr::arrange(...) at test-addIntersect.R:621:3
    2. ├─... %>% dplyr::collect()
    3. ├─dplyr::collect(.)
    4. ├─PatientProfiles::addIntersect(...)
    5. │ └─omopgenerics::cdmReference(x)
    6. │   └─omopgenerics:::assertClass(table, "cdm_table")
    7. │     ├─base::paste0(...)
    8. │     └─base::paste0(base::class(x), collapse = ", ")
    9. ├─PatientProfiles::addIntersect(., tableName = "cohort2", value = "date")
   10. │ └─... %>% ...
   11. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
   12. ├─dplyr::mutate(...)
   13. ├─PatientProfiles::addFutureObservation(...)
   14. │ └─x %>% ...
   15. ├─PatientProfiles::addDemographics(...)
   16. │ └─x %>% dplyr::compute()
   17. ├─dplyr::compute(.)
   18. ├─omopgenerics:::compute.cdm_table(.)
   19. │ ├─dplyr::compute(...)
   20. │ └─CDMConnector:::compute.db_cdm(...)
   21. │   └─CDMConnector:::.computeQuery(...)
   22. │     └─dbplyr::sql_render(x)
   23. │       ├─dbplyr::sql_render(...)
   24. │       └─dbplyr:::sql_render.tbl_lazy(...)
   25. │         ├─dbplyr::sql_render(...)
   26. │         └─dbplyr:::sql_render.lazy_query(...)
   27. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   28. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   29. │             └─dbplyr:::get_select_sql(...)
   30. │               └─dbplyr:::translate_select_sql(con, select)
   31. │                 └─dbplyr::translate_sql_(...)
   32. │                   └─base::lapply(...)
   33. │                     └─dbplyr (local) FUN(X[[i]], ...)
   34. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   35. │                       └─rlang::eval_tidy(x, mask)
   36. └─CDMConnector::datediff
   37.   └─cli::cli_abort(...)
   38.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:711:3'): working examples with tables, not cohorts ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─... %>% dplyr::collect() at test-addIntersect.R:711:3
    2. ├─dplyr::collect(.)
    3. ├─PatientProfiles::addIntersect(...)
    4. │ └─... %>% ...
    5. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    6. ├─dplyr::mutate(...)
    7. ├─PatientProfiles::addFutureObservation(...)
    8. │ └─x %>% ...
    9. ├─PatientProfiles::addDemographics(...)
   10. │ └─x %>% dplyr::compute()
   11. ├─dplyr::compute(.)
   12. ├─omopgenerics:::compute.cdm_table(.)
   13. │ ├─dplyr::compute(...)
   14. │ └─CDMConnector:::compute.db_cdm(...)
   15. │   └─CDMConnector:::.computeQuery(...)
   16. │     └─dbplyr::sql_render(x)
   17. │       ├─dbplyr::sql_render(...)
   18. │       └─dbplyr:::sql_render.tbl_lazy(...)
   19. │         ├─dbplyr::sql_render(...)
   20. │         └─dbplyr:::sql_render.lazy_query(...)
   21. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   22. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   23. │             └─dbplyr:::get_select_sql(...)
   24. │               └─dbplyr:::translate_select_sql(con, select)
   25. │                 └─dbplyr::translate_sql_(...)
   26. │                   └─base::lapply(...)
   27. │                     └─dbplyr (local) FUN(X[[i]], ...)
   28. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   29. │                       └─rlang::eval_tidy(x, mask)
   30. └─CDMConnector::datediff
   31.   └─cli::cli_abort(...)
   32.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:921:3'): test if column exist, overwrite ────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-addIntersect.R:921:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─... %>% dplyr::collect()
    8. ├─dplyr::collect(.)
    9. ├─PatientProfiles::addIntersect(...)
   10. │ └─... %>% ...
   11. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
   12. ├─dplyr::mutate(...)
   13. ├─PatientProfiles::addFutureObservation(...)
   14. │ └─x %>% ...
   15. ├─PatientProfiles::addDemographics(...)
   16. │ └─x %>% dplyr::compute()
   17. ├─dplyr::compute(.)
   18. ├─omopgenerics:::compute.cdm_table(.)
   19. │ ├─dplyr::compute(...)
   20. │ └─CDMConnector:::compute.db_cdm(...)
   21. │   └─CDMConnector:::.computeQuery(...)
   22. │     └─dbplyr::sql_render(x)
   23. │       ├─dbplyr::sql_render(...)
   24. │       └─dbplyr:::sql_render.tbl_lazy(...)
   25. │         ├─dbplyr::sql_render(...)
   26. │         └─dbplyr:::sql_render.lazy_query(...)
   27. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   28. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   29. │             └─dbplyr:::get_select_sql(...)
   30. │               └─dbplyr:::translate_select_sql(con, select)
   31. │                 └─dbplyr::translate_sql_(...)
   32. │                   └─base::lapply(...)
   33. │                     └─dbplyr (local) FUN(X[[i]], ...)
   34. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   35. │                       └─rlang::eval_tidy(x, mask)
   36. └─CDMConnector::datediff
   37.   └─cli::cli_abort(...)
   38.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:1011:3'): overlapTable is empty, check return columns ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─dplyr::arrange(...) at test-addIntersect.R:1011:3
    2. ├─... %>% dplyr::collect()
    3. ├─dplyr::collect(.)
    4. ├─PatientProfiles::addIntersect(...)
    5. │ └─... %>% ...
    6. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    7. ├─dplyr::mutate(...)
    8. ├─PatientProfiles::addFutureObservation(...)
    9. │ └─x %>% ...
   10. ├─PatientProfiles::addDemographics(...)
   11. │ └─x %>% dplyr::compute()
   12. ├─dplyr::compute(.)
   13. ├─omopgenerics:::compute.cdm_table(.)
   14. │ ├─dplyr::compute(...)
   15. │ └─CDMConnector:::compute.db_cdm(...)
   16. │   └─CDMConnector:::.computeQuery(...)
   17. │     └─dbplyr::sql_render(x)
   18. │       ├─dbplyr::sql_render(...)
   19. │       └─dbplyr:::sql_render.tbl_lazy(...)
   20. │         ├─dbplyr::sql_render(...)
   21. │         └─dbplyr:::sql_render.lazy_query(...)
   22. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   23. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   24. │             └─dbplyr:::get_select_sql(...)
   25. │               └─dbplyr:::translate_select_sql(con, select)
   26. │                 └─dbplyr::translate_sql_(...)
   27. │                   └─base::lapply(...)
   28. │                     └─dbplyr (local) FUN(X[[i]], ...)
   29. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   30. │                       └─rlang::eval_tidy(x, mask)
   31. └─CDMConnector::datediff
   32.   └─cli::cli_abort(...)
   33.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:1096:3'): overlap is empty or not, multiple ids, check return columns ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─dplyr::arrange(...) at test-addIntersect.R:1096:3
    2. ├─... %>% dplyr::collect()
    3. ├─dplyr::collect(.)
    4. ├─PatientProfiles::addCohortIntersectCount(., targetCohortTable = "cohort2")
    5. │ └─x %>% ...
    6. ├─PatientProfiles::addIntersect(...)
    7. │ └─... %>% ...
    8. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    9. ├─dplyr::mutate(...)
   10. ├─PatientProfiles::addFutureObservation(...)
   11. │ └─x %>% ...
   12. ├─PatientProfiles::addDemographics(...)
   13. │ └─x %>% dplyr::compute()
   14. ├─dplyr::compute(.)
   15. ├─omopgenerics:::compute.cdm_table(.)
   16. │ ├─dplyr::compute(...)
   17. │ └─CDMConnector:::compute.db_cdm(...)
   18. │   └─CDMConnector:::.computeQuery(...)
   19. │     └─dbplyr::sql_render(x)
   20. │       ├─dbplyr::sql_render(...)
   21. │       └─dbplyr:::sql_render.tbl_lazy(...)
   22. │         ├─dbplyr::sql_render(...)
   23. │         └─dbplyr:::sql_render.lazy_query(...)
   24. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   25. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   26. │             └─dbplyr:::get_select_sql(...)
   27. │               └─dbplyr:::translate_select_sql(con, select)
   28. │                 └─dbplyr::translate_sql_(...)
   29. │                   └─base::lapply(...)
   30. │                     └─dbplyr (local) FUN(X[[i]], ...)
   31. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   32. │                       └─rlang::eval_tidy(x, mask)
   33. └─CDMConnector::datediff
   34.   └─cli::cli_abort(...)
   35.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:1209:3'): non snake columns not repeated in output ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort2 %>% addCohortIntersectFlag(targetCohortTable = "cohort1") at test-addIntersect.R:1209:3
    2. ├─PatientProfiles::addCohortIntersectFlag(., targetCohortTable = "cohort1")
    3. │ └─x %>% ...
    4. ├─PatientProfiles::addIntersect(...)
    5. │ └─... %>% ...
    6. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    7. ├─dplyr::mutate(...)
    8. ├─PatientProfiles::addFutureObservation(...)
    9. │ └─x %>% ...
   10. ├─PatientProfiles::addDemographics(...)
   11. │ └─x %>% dplyr::compute()
   12. ├─dplyr::compute(.)
   13. ├─omopgenerics:::compute.cdm_table(.)
   14. │ ├─dplyr::compute(...)
   15. │ └─CDMConnector:::compute.db_cdm(...)
   16. │   └─CDMConnector:::.computeQuery(...)
   17. │     └─dbplyr::sql_render(x)
   18. │       ├─dbplyr::sql_render(...)
   19. │       └─dbplyr:::sql_render.tbl_lazy(...)
   20. │         ├─dbplyr::sql_render(...)
   21. │         └─dbplyr:::sql_render.lazy_query(...)
   22. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   23. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   24. │             └─dbplyr:::get_select_sql(...)
   25. │               └─dbplyr:::translate_select_sql(con, select)
   26. │                 └─dbplyr::translate_sql_(...)
   27. │                   └─base::lapply(...)
   28. │                     └─dbplyr (local) FUN(X[[i]], ...)
   29. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   30. │                       └─rlang::eval_tidy(x, mask)
   31. └─CDMConnector::datediff
   32.   └─cli::cli_abort(...)
   33.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:1225:3'): no NA when overwrite column ───────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% ... at test-addIntersect.R:1225:3
    2. ├─PatientProfiles::addCohortIntersectFlag(...)
    3. │ └─x %>% ...
    4. ├─PatientProfiles::addIntersect(...)
    5. │ └─... %>% ...
    6. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
    7. ├─dplyr::mutate(...)
    8. ├─PatientProfiles::addFutureObservation(...)
    9. │ └─x %>% ...
   10. ├─PatientProfiles::addDemographics(...)
   11. │ └─x %>% dplyr::compute()
   12. ├─dplyr::compute(.)
   13. ├─omopgenerics:::compute.cdm_table(.)
   14. │ ├─dplyr::compute(...)
   15. │ └─CDMConnector:::compute.db_cdm(...)
   16. │   └─CDMConnector:::.computeQuery(...)
   17. │     └─dbplyr::sql_render(x)
   18. │       ├─dbplyr::sql_render(...)
   19. │       └─dbplyr:::sql_render.tbl_lazy(...)
   20. │         ├─dbplyr::sql_render(...)
   21. │         └─dbplyr:::sql_render.lazy_query(...)
   22. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   23. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   24. │             └─dbplyr:::get_select_sql(...)
   25. │               └─dbplyr:::translate_select_sql(con, select)
   26. │                 └─dbplyr::translate_sql_(...)
   27. │                   └─base::lapply(...)
   28. │                     └─dbplyr (local) FUN(X[[i]], ...)
   29. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   30. │                       └─rlang::eval_tidy(x, mask)
   31. └─CDMConnector::datediff
   32.   └─cli::cli_abort(...)
   33.     └─rlang::abort(...)
  ── Error ('test-addPriorObservation.R:6:3'): check input length and type for each of the arguments ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(addPriorObservation(cdm$cohort1, "cdm")) at test-addPriorObservation.R:6:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─PatientProfiles::addPriorObservation(cdm$cohort1, "cdm")
    8. │ └─x %>% ...
    9. ├─PatientProfiles::addDemographics(...)
   10. │ └─x %>% dplyr::compute()
   11. ├─dplyr::compute(.)
   12. ├─omopgenerics:::compute.cdm_table(.)
   13. │ ├─dplyr::compute(...)
   14. │ └─CDMConnector:::compute.db_cdm(...)
   15. │   └─CDMConnector:::.computeQuery(...)
   16. │     └─dbplyr::sql_render(x)
   17. │       ├─dbplyr::sql_render(...)
   18. │       └─dbplyr:::sql_render.tbl_lazy(...)
   19. │         ├─dbplyr::sql_render(...)
   20. │         └─dbplyr:::sql_render.lazy_query(...)
   21. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   22. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   23. │             └─dbplyr:::get_select_sql(...)
   24. │               └─dbplyr:::translate_select_sql(con, select)
   25. │                 └─dbplyr::translate_sql_(...)
   26. │                   └─base::lapply(...)
   27. │                     └─dbplyr (local) FUN(X[[i]], ...)
   28. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   29. │                       └─rlang::eval_tidy(x, mask)
   30. └─CDMConnector::datediff
   31.   └─cli::cli_abort(...)
   32.     └─rlang::abort(...)
  ── Error ('test-addPriorObservation.R:15:3'): check condition_occurrence and cohort1 work ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_true(...) at test-addPriorObservation.R:15:3
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::typeof(cdm$cohort1 %>% addPriorObservation() %>% dplyr::collect())
    5. ├─cdm$cohort1 %>% addPriorObservation() %>% dplyr::collect()
    6. ├─dplyr::collect(.)
    7. ├─PatientProfiles::addPriorObservation(.)
    8. │ └─x %>% ...
    9. ├─PatientProfiles::addDemographics(...)
   10. │ └─x %>% dplyr::compute()
   11. ├─dplyr::compute(.)
   12. ├─omopgenerics:::compute.cdm_table(.)
   13. │ ├─dplyr::compute(...)
   14. │ └─CDMConnector:::compute.db_cdm(...)
   15. │   └─CDMConnector:::.computeQuery(...)
   16. │     └─dbplyr::sql_render(x)
   17. │       ├─dbplyr::sql_render(...)
   18. │       └─dbplyr:::sql_render.tbl_lazy(...)
   19. │         ├─dbplyr::sql_render(...)
   20. │         └─dbplyr:::sql_render.lazy_query(...)
   21. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   22. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   23. │             └─dbplyr:::get_select_sql(...)
   24. │               └─dbplyr:::translate_select_sql(con, select)
   25. │                 └─dbplyr::translate_sql_(...)
   26. │                   └─base::lapply(...)
   27. │                     └─dbplyr (local) FUN(X[[i]], ...)
   28. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   29. │                       └─rlang::eval_tidy(x, mask)
   30. └─CDMConnector::datediff
   31.   └─cli::cli_abort(...)
   32.     └─rlang::abort(...)
  ── Error ('test-addPriorObservation.R:62:3'): check working example with cohort1 ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm$cohort1 %>% addPriorObservation() %>% dplyr::collect() at test-addPriorObservation.R:62:3
    2. ├─dplyr::collect(.)
    3. ├─PatientProfiles::addPriorObservation(.)
    4. │ └─x %>% ...
    5. ├─PatientProfiles::addDemographics(...)
    6. │ └─x %>% dplyr::compute()
    7. ├─dplyr::compute(.)
    8. ├─omopgenerics:::compute.cdm_table(.)
    9. │ ├─dplyr::compute(...)
   10. │ └─CDMConnector:::compute.db_cdm(...)
   11. │   └─CDMConnector:::.computeQuery(...)
   12. │     └─dbplyr::sql_render(x)
   13. │       ├─dbplyr::sql_render(...)
   14. │       └─dbplyr:::sql_render.tbl_lazy(...)
   15. │         ├─dbplyr::sql_render(...)
   16. │         └─dbplyr:::sql_render.lazy_query(...)
   17. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   18. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   19. │             └─dbplyr:::get_select_sql(...)
   20. │               └─dbplyr:::translate_select_sql(con, select)
   21. │                 └─dbplyr::translate_sql_(...)
   22. │                   └─base::lapply(...)
   23. │                     └─dbplyr (local) FUN(X[[i]], ...)
   24. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   25. │                       └─rlang::eval_tidy(x, mask)
   26. └─CDMConnector::datediff
   27.   └─cli::cli_abort(...)
   28.     └─rlang::abort(...)
  ── Error ('test-addPriorObservation.R:106:3'): check working example with condition_occurrence ──
  Error in `dplyr::collect(removeClass(x, "cdm_table"))`: Failed to collect lazy table.
  Caused by error:
  ! rapi_prepare: Failed to prepare query SELECT cohort1.*
  FROM main.cohort1
  WHERE NOT EXISTS (
    SELECT 1 FROM (
    SELECT cohort1.*, observation_period_start_date, observation_period_end_date
    FROM main.cohort1
    LEFT JOIN main.observation_period
      ON (cohort1.subject_id = observation_period.person_id)
  ) RHS
    WHERE
      (cohort1.cohort_definition_id = RHS.cohort_definition_id) AND
      (cohort1.subject_id = RHS.subject_id) AND
      (cohort1.cohort_start_date = RHS.cohort_start_date) AND
      (cohort1.cohort_end_date = RHS.cohort_end_date) AND
      (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )
  Error: Binder Error: Cannot compare values of type VARCHAR and type DATE - an explicit cast is required
  LINE 15:     (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )...
                                      ^
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addPriorObservation.R:106:3
    2. │ └─omopgenerics::newCohortTable(cdm[[cohort]])
    3. │   └─omopgenerics:::validateGeneratedCohortSet(cohort, soft = .softValidation)
    4. │     └─omopgenerics::checkCohortRequirements(...)
    5. │       └─omopgenerics:::checkObservationPeriod(...)
    6. │         ├─dplyr::collect(...)
    7. │         └─omopgenerics:::collect.cohort_table(...)
    8. │           ├─dplyr::collect(x)
    9. │           └─omopgenerics:::collect.cdm_table(x)
   10. │             ├─dplyr::collect(removeClass(x, "cdm_table"))
   11. │             └─dbplyr:::collect.tbl_sql(removeClass(x, "cdm_table"))
   12. │               ├─base::withCallingHandlers(...)
   13. │               ├─dbplyr::db_collect(...)
   14. │               └─dbplyr:::db_collect.DBIConnection(...)
   15. │                 ├─DBI::dbSendQuery(con, sql)
   16. │                 └─duckdb::dbSendQuery(con, sql)
   17. │                   └─duckdb (local) .local(conn, statement, ...)
   18. │                     └─duckdb:::rapi_prepare(conn@conn_ref, statement)
   19. └─base::.handleSimpleError(...)
   20.   └─dbplyr (local) h(simpleError(msg, call))
   21.     └─cli::cli_abort("Failed to collect lazy table.", parent = cnd)
   22.       └─rlang::abort(...)
  ── Error ('test-addPriorObservation.R:158:3'): different name ──────────────────
  Error in `dplyr::collect(removeClass(x, "cdm_table"))`: Failed to collect lazy table.
  Caused by error:
  ! rapi_prepare: Failed to prepare query SELECT cohort1.*
  FROM main.cohort1
  WHERE NOT EXISTS (
    SELECT 1 FROM (
    SELECT cohort1.*, observation_period_start_date, observation_period_end_date
    FROM main.cohort1
    LEFT JOIN main.observation_period
      ON (cohort1.subject_id = observation_period.person_id)
  ) RHS
    WHERE
      (cohort1.cohort_definition_id = RHS.cohort_definition_id) AND
      (cohort1.subject_id = RHS.subject_id) AND
      (cohort1.cohort_start_date = RHS.cohort_start_date) AND
      (cohort1.cohort_end_date = RHS.cohort_end_date) AND
      (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )
  Error: Binder Error: Cannot compare values of type VARCHAR and type DATE - an explicit cast is required
  LINE 15:     (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )...
                                      ^
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addPriorObservation.R:158:3
    2. │ └─omopgenerics::newCohortTable(cdm[[cohort]])
    3. │   └─omopgenerics:::validateGeneratedCohortSet(cohort, soft = .softValidation)
    4. │     └─omopgenerics::checkCohortRequirements(...)
    5. │       └─omopgenerics:::checkObservationPeriod(...)
    6. │         ├─dplyr::collect(...)
    7. │         └─omopgenerics:::collect.cohort_table(...)
    8. │           ├─dplyr::collect(x)
    9. │           └─omopgenerics:::collect.cdm_table(x)
   10. │             ├─dplyr::collect(removeClass(x, "cdm_table"))
   11. │             └─dbplyr:::collect.tbl_sql(removeClass(x, "cdm_table"))
   12. │               ├─base::withCallingHandlers(...)
   13. │               ├─dbplyr::db_collect(...)
   14. │               └─dbplyr:::db_collect.DBIConnection(...)
   15. │                 ├─DBI::dbSendQuery(con, sql)
   16. │                 └─duckdb::dbSendQuery(con, sql)
   17. │                   └─duckdb (local) .local(conn, statement, ...)
   18. │                     └─duckdb:::rapi_prepare(conn@conn_ref, statement)
   19. └─base::.handleSimpleError(...)
   20.   └─dbplyr (local) h(simpleError(msg, call))
   21.     └─cli::cli_abort("Failed to collect lazy table.", parent = cnd)
   22.       └─rlang::abort(...)
  ── Error ('test-addPriorObservation.R:209:3'): multiple observation periods ────
  Error in `dplyr::collect(removeClass(x, "cdm_table"))`: Failed to collect lazy table.
  Caused by error:
  ! rapi_prepare: Failed to prepare query SELECT cohort2.*
  FROM main.cohort2
  WHERE NOT EXISTS (
    SELECT 1 FROM (
    SELECT cohort2.*, observation_period_start_date, observation_period_end_date
    FROM main.cohort2
    LEFT JOIN main.observation_period
      ON (cohort2.subject_id = observation_period.person_id)
  ) RHS
    WHERE
      (cohort2.cohort_definition_id = RHS.cohort_definition_id) AND
      (cohort2.subject_id = RHS.subject_id) AND
      (cohort2.cohort_start_date = RHS.cohort_start_date) AND
      (cohort2.cohort_end_date = RHS.cohort_end_date) AND
      (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )
  Error: Binder Error: Cannot compare values of type VARCHAR and type DATE - an explicit cast is required
  LINE 15:     (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )...
                                      ^
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addPriorObservation.R:209:3
    2. │ └─omopgenerics::newCohortTable(cdm[[cohort]])
    3. │   └─omopgenerics:::validateGeneratedCohortSet(cohort, soft = .softValidation)
    4. │     └─omopgenerics::checkCohortRequirements(...)
    5. │       └─omopgenerics:::checkObservationPeriod(...)
    6. │         ├─dplyr::collect(...)
    7. │         └─omopgenerics:::collect.cohort_table(...)
    8. │           ├─dplyr::collect(x)
    9. │           └─omopgenerics:::collect.cdm_table(x)
   10. │             ├─dplyr::collect(removeClass(x, "cdm_table"))
   11. │             └─dbplyr:::collect.tbl_sql(removeClass(x, "cdm_table"))
   12. │               ├─base::withCallingHandlers(...)
   13. │               ├─dbplyr::db_collect(...)
   14. │               └─dbplyr:::db_collect.DBIConnection(...)
   15. │                 ├─DBI::dbSendQuery(con, sql)
   16. │                 └─duckdb::dbSendQuery(con, sql)
   17. │                   └─duckdb (local) .local(conn, statement, ...)
   18. │                     └─duckdb:::rapi_prepare(conn@conn_ref, statement)
   19. └─base::.handleSimpleError(...)
   20.   └─dbplyr (local) h(simpleError(msg, call))
   21.     └─cli::cli_abort("Failed to collect lazy table.", parent = cnd)
   22.       └─rlang::abort(...)
  ── Error ('test-class.R:57:5'): test class consistency across cohort operations ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─PatientProfiles (local) op(cdm$cohort1) at test-class.R:57:5
    2. │ └─... %>% ...
    3. ├─dplyr::select(., -"prior_observation", -"future_observation")
    4. ├─dplyr::mutate(...)
    5. ├─PatientProfiles::addDemographics(...)
    6. │ └─x %>% dplyr::compute()
    7. ├─dplyr::compute(.)
    8. ├─omopgenerics:::compute.cdm_table(.)
    9. │ ├─dplyr::compute(...)
   10. │ └─CDMConnector:::compute.db_cdm(...)
   11. │   └─CDMConnector:::.computeQuery(...)
   12. │     └─dbplyr::sql_render(x)
   13. │       ├─dbplyr::sql_render(...)
   14. │       └─dbplyr:::sql_render.tbl_lazy(...)
   15. │         ├─dbplyr::sql_render(...)
   16. │         └─dbplyr:::sql_render.lazy_query(...)
   17. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   18. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   19. │             └─dbplyr:::get_select_sql(...)
   20. │               └─dbplyr:::translate_select_sql(con, select)
   21. │                 └─dbplyr::translate_sql_(...)
   22. │                   └─base::lapply(...)
   23. │                     └─dbplyr (local) FUN(X[[i]], ...)
   24. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   25. │                       └─rlang::eval_tidy(x, mask)
   26. └─CDMConnector::datediff
   27.   └─cli::cli_abort(...)
   28.     └─rlang::abort(...)
  ── Error ('test-checks.R:93:3'):  test checkNewName renames duplicate column names in addInObservation   ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(x <- addInObservation(cdm$cohort1, name = "flag")) at test-checks.R:93:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─PatientProfiles::addInObservation(cdm$cohort1, name = "flag")
    8. │ └─... %>% ...
    9. ├─dplyr::select(., -"prior_observation", -"future_observation")
   10. ├─dplyr::mutate(...)
   11. ├─PatientProfiles::addDemographics(...)
   12. │ └─x %>% dplyr::compute()
   13. ├─dplyr::compute(.)
   14. ├─omopgenerics:::compute.cdm_table(.)
   15. │ ├─dplyr::compute(...)
   16. │ └─CDMConnector:::compute.db_cdm(...)
   17. │   └─CDMConnector:::.computeQuery(...)
   18. │     └─dbplyr::sql_render(x)
   19. │       ├─dbplyr::sql_render(...)
   20. │       └─dbplyr:::sql_render.tbl_lazy(...)
   21. │         ├─dbplyr::sql_render(...)
   22. │         └─dbplyr:::sql_render.lazy_query(...)
   23. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   24. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   25. │             └─dbplyr:::get_select_sql(...)
   26. │               └─dbplyr:::translate_select_sql(con, select)
   27. │                 └─dbplyr::translate_sql_(...)
   28. │                   └─base::lapply(...)
   29. │                     └─dbplyr (local) FUN(X[[i]], ...)
   30. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   31. │                       └─rlang::eval_tidy(x, mask)
   32. └─CDMConnector::datediff
   33.   └─cli::cli_abort(...)
   34.     └─rlang::abort(...)
  ── Error ('test-checks.R:150:3'):  test checkWindow in addIntersect ────────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-checks.R:150:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─cdm$cohort1 %>% ...
    8. ├─PatientProfiles::addIntersect(...)
    9. │ └─... %>% ...
   10. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
   11. ├─dplyr::mutate(...)
   12. ├─PatientProfiles::addFutureObservation(...)
   13. │ └─x %>% ...
   14. ├─PatientProfiles::addDemographics(...)
   15. │ └─x %>% dplyr::compute()
   16. ├─dplyr::compute(.)
   17. ├─omopgenerics:::compute.cdm_table(.)
   18. │ ├─dplyr::compute(...)
   19. │ └─CDMConnector:::compute.db_cdm(...)
   20. │   └─CDMConnector:::.computeQuery(...)
   21. │     └─dbplyr::sql_render(x)
   22. │       ├─dbplyr::sql_render(...)
   23. │       └─dbplyr:::sql_render.tbl_lazy(...)
   24. │         ├─dbplyr::sql_render(...)
   25. │         └─dbplyr:::sql_render.lazy_query(...)
   26. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   27. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   28. │             └─dbplyr:::get_select_sql(...)
   29. │               └─dbplyr:::translate_select_sql(con, select)
   30. │                 └─dbplyr::translate_sql_(...)
   31. │                   └─base::lapply(...)
   32. │                     └─dbplyr (local) FUN(X[[i]], ...)
   33. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   34. │                       └─rlang::eval_tidy(x, mask)
   35. └─CDMConnector::datediff
   36.   └─cli::cli_abort(...)
   37.     └─rlang::abort(...)
  ── Error ('test-checks.R:249:3'): checkNameStyle ───────────────────────────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─testthat::expect_true(...) at test-checks.R:249:3
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─c("count_all", "flag_all") %in% ...
    5. ├─base::colnames(...)
    6. │ └─base::is.data.frame(x)
    7. ├─cdm$cohort1 %>% ...
    8. ├─PatientProfiles::addIntersect(...)
    9. │ └─... %>% ...
   10. ├─dplyr::mutate(., censor_date = .data[[censorDate %||% "censor_date"]])
   11. ├─dplyr::mutate(...)
   12. ├─PatientProfiles::addFutureObservation(...)
   13. │ └─x %>% ...
   14. ├─PatientProfiles::addDemographics(...)
   15. │ └─x %>% dplyr::compute()
   16. ├─dplyr::compute(.)
   17. ├─omopgenerics:::compute.cdm_table(.)
   18. │ ├─dplyr::compute(...)
   19. │ └─CDMConnector:::compute.db_cdm(...)
   20. │   └─CDMConnector:::.computeQuery(...)
   21. │     └─dbplyr::sql_render(x)
   22. │       ├─dbplyr::sql_render(...)
   23. │       └─dbplyr:::sql_render.tbl_lazy(...)
   24. │         ├─dbplyr::sql_render(...)
   25. │         └─dbplyr:::sql_render.lazy_query(...)
   26. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   27. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   28. │             └─dbplyr:::get_select_sql(...)
   29. │               └─dbplyr:::translate_select_sql(con, select)
   30. │                 └─dbplyr::translate_sql_(...)
   31. │                   └─base::lapply(...)
   32. │                     └─dbplyr (local) FUN(X[[i]], ...)
   33. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   34. │                       └─rlang::eval_tidy(x, mask)
   35. └─CDMConnector::datediff
   36.   └─cli::cli_abort(...)
   37.     └─rlang::abort(...)
  ── Error ('test-summariseCharacteristics.R:51:3'): test summariseCharacteristics ──
  Error in `dplyr::collect(removeClass(x, "cdm_table"))`: Failed to collect lazy table.
  Caused by error:
  ! rapi_prepare: Failed to prepare query SELECT cohort1.*
  FROM main.cohort1
  WHERE NOT EXISTS (
    SELECT 1 FROM (
    SELECT cohort1.*, observation_period_start_date, observation_period_end_date
    FROM main.cohort1
    LEFT JOIN main.observation_period
      ON (cohort1.subject_id = observation_period.person_id)
  ) RHS
    WHERE
      (cohort1.cohort_definition_id = RHS.cohort_definition_id) AND
      (cohort1.subject_id = RHS.subject_id) AND
      (cohort1.cohort_start_date = RHS.cohort_start_date) AND
      (cohort1.cohort_end_date = RHS.cohort_end_date) AND
      (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )
  Error: Binder Error: Cannot compare values of type VARCHAR and type DATE - an explicit cast is required
  LINE 15:     (RHS.cohort_start_date >= RHS.observation_period_start_date AND RHS.cohort_start_date <= RHS.observation_period_end_date AND RHS.cohort_end_date >= RHS.observation_period_start_date AND RHS.cohort_end_date <= RHS.observation_period_end_date)
  )...
                                      ^
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-summariseCharacteristics.R:51:3
    2. │ └─omopgenerics::newCohortTable(cdm[[cohort]])
    3. │   └─omopgenerics:::validateGeneratedCohortSet(cohort, soft = .softValidation)
    4. │     └─omopgenerics::checkCohortRequirements(...)
    5. │       └─omopgenerics:::checkObservationPeriod(...)
    6. │         ├─dplyr::collect(...)
    7. │         └─omopgenerics:::collect.cohort_table(...)
    8. │           ├─dplyr::collect(x)
    9. │           └─omopgenerics:::collect.cdm_table(x)
   10. │             ├─dplyr::collect(removeClass(x, "cdm_table"))
   11. │             └─dbplyr:::collect.tbl_sql(removeClass(x, "cdm_table"))
   12. │               ├─base::withCallingHandlers(...)
   13. │               ├─dbplyr::db_collect(...)
   14. │               └─dbplyr:::db_collect.DBIConnection(...)
   15. │                 ├─DBI::dbSendQuery(con, sql)
   16. │                 └─duckdb::dbSendQuery(con, sql)
   17. │                   └─duckdb (local) .local(conn, statement, ...)
   18. │                     └─duckdb:::rapi_prepare(conn@conn_ref, statement)
   19. └─base::.handleSimpleError(...)
   20.   └─dbplyr (local) h(simpleError(msg, call))
   21.     └─cli::cli_abort("Failed to collect lazy table.", parent = cnd)
   22.       └─rlang::abort(...)
  ── Failure ('test-summariseCharacteristics.R:288:3'): test empty cohort ────────
  Expected ``%>%`(...)` to run without any errors.
  i Actually got a <rlang_error> with text:
    No known SQL translation
  ── Failure ('test-summariseCharacteristics.R:298:3'): test empty cohort ────────
  Expected `... <- NULL` to run without any errors.
  i Actually got a <rlang_error> with text:
    No known SQL translation
  ── Failure ('test-summariseCharacteristics.R:305:3'): test empty cohort ────────
  Expected `... <- NULL` to run without any errors.
  i Actually got a <rlang_error> with text:
    No known SQL translation
  ── Failure ('test-summariseLargeScaleCharacteristics.R:87:3'): basic functionality summarise large scale characteristics ──
  Expected `... <- NULL` to run without any errors.
  i Actually got a <rlang_error> with text:
    No known SQL translation
  ── Error ('test-summariseLargeScaleCharacteristics.R:94:3'): basic functionality summarise large scale characteristics ──
  Error in `assertNull(x, null, errorMessage, call)`: object 'result' not found
  Backtrace:
      ▆
   1. └─visOmopResults::splitAdditional(result) at test-summariseLargeScaleCharacteristics.R:94:3
   2.   └─visOmopResults::splitNameLevel(...)
   3.     └─visOmopResults:::assertTibble(result, columns = c(name, level))
   4.       └─visOmopResults:::assertNull(x, null, errorMessage, call)
  ── Failure ('test-summariseLargeScaleCharacteristics.R:288:3'): basic functionality add large scale characteristics ──
  Expected `... <- NULL` to run without any errors.
  i Actually got a <rlang_error> with text:
    No known SQL translation
  ── Error ('test-summariseLargeScaleCharacteristics.R:300:3'): basic functionality add large scale characteristics ──
  Error in `is.data.frame(x)`: object 'result' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_false(any(grepl("0_to_0", colnames(result)))) at test-summariseLargeScaleCharacteristics.R:300:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─base::grepl("0_to_0", colnames(result))
   5. │ └─base::is.factor(x)
   6. └─base::colnames(result)
   7.   └─base::is.data.frame(x)
  ── Error ('test-summariseResult.R:68:3'): groups and strata ────────────────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─... %>% summariseResult(strata = list("sex")) at test-summariseResult.R:68:3
    2. ├─PatientProfiles::summariseResult(., strata = list("sex"))
    3. │ └─PatientProfiles:::checkTable(table)
    4. │   └─"tbl" %in% class(table)
    5. ├─dplyr::collect(.)
    6. ├─PatientProfiles::addDemographics(...)
    7. │ └─x %>% dplyr::compute()
    8. ├─dplyr::compute(.)
    9. ├─omopgenerics:::compute.cdm_table(.)
   10. │ ├─dplyr::compute(...)
   11. │ └─CDMConnector:::compute.db_cdm(...)
   12. │   └─CDMConnector:::.computeQuery(...)
   13. │     └─dbplyr::sql_render(x)
   14. │       ├─dbplyr::sql_render(...)
   15. │       └─dbplyr:::sql_render.tbl_lazy(...)
   16. │         ├─dbplyr::sql_render(...)
   17. │         └─dbplyr:::sql_render.lazy_query(...)
   18. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   19. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   20. │             ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   21. │             └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   22. │               └─dbplyr:::get_select_sql(...)
   23. │                 └─dbplyr:::translate_select_sql(con, select)
   24. │                   └─dbplyr::translate_sql_(...)
   25. │                     └─base::lapply(...)
   26. │                       └─dbplyr (local) FUN(X[[i]], ...)
   27. │                         ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   28. │                         └─rlang::eval_tidy(x, mask)
   29. └─CDMConnector::datediff
   30.   └─cli::cli_abort(...)
   31.     └─rlang::abort(...)
  ── Failure ('test-summariseResult.R:147:3'): table in db or local ──────────────
  Expected ``%>%`(...)` to run without any errors.
  i Actually got a <rlang_error> with text:
    No known SQL translation
  ── Failure ('test-summariseResult.R:155:3'): table in db or local ──────────────
  Expected ``%>%`(...)` to run without any errors.
  i Actually got a <rlang_error> with text:
    No known SQL translation
  ── Error ('test-summariseResult.R:169:3'): with and with overall groups and strata ──
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─... %>% dplyr::collect() at test-summariseResult.R:169:3
    2. ├─dplyr::collect(.)
    3. ├─PatientProfiles::addDemographics(...)
    4. │ └─x %>% dplyr::compute()
    5. ├─dplyr::compute(.)
    6. ├─omopgenerics:::compute.cdm_table(.)
    7. │ ├─dplyr::compute(...)
    8. │ └─CDMConnector:::compute.db_cdm(...)
    9. │   └─CDMConnector:::.computeQuery(...)
   10. │     └─dbplyr::sql_render(x)
   11. │       ├─dbplyr::sql_render(...)
   12. │       └─dbplyr:::sql_render.tbl_lazy(...)
   13. │         ├─dbplyr::sql_render(...)
   14. │         └─dbplyr:::sql_render.lazy_query(...)
   15. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   16. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   17. │             ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   18. │             └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   19. │               └─dbplyr:::get_select_sql(...)
   20. │                 └─dbplyr:::translate_select_sql(con, select)
   21. │                   └─dbplyr::translate_sql_(...)
   22. │                     └─base::lapply(...)
   23. │                       └─dbplyr (local) FUN(X[[i]], ...)
   24. │                         ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   25. │                         └─rlang::eval_tidy(x, mask)
   26. └─CDMConnector::datediff
   27.   └─cli::cli_abort(...)
   28.     └─rlang::abort(...)
  ── Error ('test-summariseResult.R:316:3'): test summary table naming ───────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─... %>% summariseResult() at test-summariseResult.R:316:3
    2. ├─PatientProfiles::summariseResult(.)
    3. │ └─PatientProfiles:::checkTable(table)
    4. │   └─"tbl" %in% class(table)
    5. ├─dplyr::mutate(., age_age = age, age_age_age = age, age_age_age_age = age)
    6. ├─PatientProfiles::addDemographics(.)
    7. │ └─x %>% dplyr::compute()
    8. ├─dplyr::compute(.)
    9. ├─omopgenerics:::compute.cdm_table(.)
   10. │ ├─dplyr::compute(...)
   11. │ └─CDMConnector:::compute.db_cdm(...)
   12. │   └─CDMConnector:::.computeQuery(...)
   13. │     └─dbplyr::sql_render(x)
   14. │       ├─dbplyr::sql_render(...)
   15. │       └─dbplyr:::sql_render.tbl_lazy(...)
   16. │         ├─dbplyr::sql_render(...)
   17. │         └─dbplyr:::sql_render.lazy_query(...)
   18. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   19. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   20. │             ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   21. │             └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   22. │               └─dbplyr:::get_select_sql(...)
   23. │                 └─dbplyr:::translate_select_sql(con, select)
   24. │                   └─dbplyr::translate_sql_(...)
   25. │                     └─base::lapply(...)
   26. │                       └─dbplyr (local) FUN(X[[i]], ...)
   27. │                         ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   28. │                         └─rlang::eval_tidy(x, mask)
   29. └─CDMConnector::datediff
   30.   └─cli::cli_abort(...)
   31.     └─rlang::abort(...)
  
  [ FAIL 65 | WARN 21 | SKIP 1 | PASS 200 ]
  Error: Test failures
  Execution halted