From 147d70adade5b6a8a9d9fb97503e23b1afac354a Mon Sep 17 00:00:00 2001 From: jreps Date: Thu, 19 Sep 2024 13:17:06 -0400 Subject: [PATCH 1/4] restricting cases to first outcome in TAR - restricting cases to first outcome in TAR --- DESCRIPTION | 2 +- inst/sql/sql_server/CaseCohortsPart1.sql | 2 +- inst/sql/sql_server/CaseCohortsPart2.sql | 15 +++++++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9ac4a24..9cb8c0a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: Characterization Type: Package Title: Characterizations of Cohorts -Version: 2.0.1 +Version: 2.0.1.9000 Date: 2024-08-21 Authors@R: c( person("Jenna", "Reps", , "reps@ohdsi.org", role = c("aut", "cre")), diff --git a/inst/sql/sql_server/CaseCohortsPart1.sql b/inst/sql/sql_server/CaseCohortsPart1.sql index 6069163..acd1afc 100644 --- a/inst/sql/sql_server/CaseCohortsPart1.sql +++ b/inst/sql/sql_server/CaseCohortsPart1.sql @@ -50,7 +50,7 @@ and datediff(day, op.observation_period_start_date, o.cohort_start_date) >= @min IF OBJECT_ID('tempdb..#case_exclude', 'U') IS NOT NULL DROP TABLE #case_exclude; -- people with outcome prior -select +select distinct t.subject_id, t.cohort_start_date, t.cohort_end_date, diff --git a/inst/sql/sql_server/CaseCohortsPart2.sql b/inst/sql/sql_server/CaseCohortsPart2.sql index 27b1340..e8eb757 100644 --- a/inst/sql/sql_server/CaseCohortsPart2.sql +++ b/inst/sql/sql_server/CaseCohortsPart2.sql @@ -2,13 +2,13 @@ -- 1) get all the people with the outcome in TAR IF OBJECT_ID('tempdb..#cases_tar', 'U') IS NOT NULL DROP TABLE #cases_tar; --- cases +-- cases (first outcome date) select t.subject_id, t.cohort_start_date, t.cohort_end_date, -o.cohort_start_date as outcome_start_date, -o.cohort_end_date as outcome_end_date, +min(o.cohort_start_date) as outcome_start_date, +min(o.cohort_end_date) as outcome_end_date, t.cohort_definition_id as target_cohort_id, o.cohort_definition_id as outcome_cohort_id into #cases_tar @@ -19,7 +19,14 @@ where o.cohort_start_date <= dateadd(day, @tar_end, t.@tar_end_anchor) and -- outcome starts (ends?) after TAR start -o.cohort_start_date >= dateadd(day, @tar_start, t.@tar_start_anchor); +o.cohort_start_date >= dateadd(day, @tar_start, t.@tar_start_anchor) +-- make sure to only get first outcome date during TAR +group by +t.subject_id, +t.cohort_start_date, +t.cohort_end_date, +t.cohort_definition_id, +o.cohort_definition_id; -- add the cases for specific TAR insert into #cases From 6febabd581b3ac66f1edf3d8b3582c3a407ca81f Mon Sep 17 00:00:00 2001 From: jreps Date: Thu, 19 Sep 2024 13:19:06 -0400 Subject: [PATCH 2/4] Update R_CMD_check_Hades.yaml - updating download and upload artifact for github actions --- .github/workflows/R_CMD_check_Hades.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R_CMD_check_Hades.yaml b/.github/workflows/R_CMD_check_Hades.yaml index 7280c66..23d9737 100644 --- a/.github/workflows/R_CMD_check_Hades.yaml +++ b/.github/workflows/R_CMD_check_Hades.yaml @@ -97,7 +97,7 @@ jobs: - name: Upload source package if: success() && runner.os == 'macOS' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: package_tarball path: check/*.tar.gz @@ -167,7 +167,7 @@ jobs: - name: Download package tarball if: ${{ env.new_version != '' }} - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: package_tarball From 6e2e511f3959380eb613fade9811ad9b8bc2fbb6 Mon Sep 17 00:00:00 2001 From: jreps Date: Mon, 7 Oct 2024 16:11:47 -0400 Subject: [PATCH 3/4] adding spec to website - adding spec to website --- docs/404.html | 11 +- docs/articles/InstallationGuide.html | 13 +- docs/articles/Specification.html | 1998 +++++++++++++++++ docs/articles/UsingPackage.html | 79 +- docs/articles/images/dcrc_dechal_summary.png | Bin 0 -> 72716 bytes docs/articles/images/dcrc_example_data.png | Bin 0 -> 163457 bytes docs/articles/images/dcrc_rechal_summary.png | Bin 0 -> 73868 bytes docs/articles/images/tte_example_data.png | Bin 0 -> 163457 bytes .../images/tte_example_data_with_times.png | Bin 0 -> 173787 bytes docs/articles/index.html | 13 +- docs/authors.html | 13 +- docs/index.html | 11 +- docs/news/index.html | 16 +- docs/pkgdown.yml | 7 +- docs/pull_request_template.html | 7 +- docs/reference/Characterization-package.html | 11 +- docs/reference/cleanIncremental.html | 16 +- docs/reference/cleanNonIncremental.html | 16 +- ...computeDechallengeRechallengeAnalyses.html | 11 +- ...puteRechallengeFailCaseSeriesAnalyses.html | 11 +- .../reference/computeTimeToEventAnalyses.html | 11 +- .../createAggregateCovariateSettings.html | 11 +- .../createCharacterizationSettings.html | 11 +- .../createCharacterizationTables.html | 11 +- .../createDechallengeRechallengeSettings.html | 11 +- .../createDuringCovariateSettings.html | 19 +- docs/reference/createSqliteDatabase.html | 11 +- docs/reference/createTimeToEventSettings.html | 11 +- .../exportDechallengeRechallengeToCsv.html | 11 +- .../exportRechallengeFailCaseSeriesToCsv.html | 11 +- docs/reference/exportTimeToEventToCsv.html | 11 +- docs/reference/getDbDuringCovariateData.html | 11 +- docs/reference/index.html | 17 +- docs/reference/insertResultsToDatabase.html | 11 +- .../loadCharacterizationSettings.html | 11 +- .../runCharacterizationAnalyses.html | 11 +- .../saveCharacterizationSettings.html | 11 +- docs/reference/viewCharacterization.html | 11 +- docs/sitemap.xml | 7 +- man/createDuringCovariateSettings.Rd | 8 +- vignettes/Specification.Rmd | 809 +++++++ vignettes/images/dcrc_dechal_summary.png | Bin 0 -> 72716 bytes vignettes/images/dcrc_example_data.png | Bin 0 -> 163457 bytes vignettes/images/dcrc_rechal_summary.png | Bin 0 -> 73868 bytes vignettes/images/tte_example_data.png | Bin 0 -> 163457 bytes .../images/tte_example_data_with_times.png | Bin 0 -> 173787 bytes 46 files changed, 3107 insertions(+), 162 deletions(-) create mode 100644 docs/articles/Specification.html create mode 100644 docs/articles/images/dcrc_dechal_summary.png create mode 100644 docs/articles/images/dcrc_example_data.png create mode 100644 docs/articles/images/dcrc_rechal_summary.png create mode 100644 docs/articles/images/tte_example_data.png create mode 100644 docs/articles/images/tte_example_data_with_times.png create mode 100644 vignettes/Specification.Rmd create mode 100644 vignettes/images/dcrc_dechal_summary.png create mode 100644 vignettes/images/dcrc_example_data.png create mode 100644 vignettes/images/dcrc_rechal_summary.png create mode 100644 vignettes/images/tte_example_data.png create mode 100644 vignettes/images/tte_example_data_with_times.png diff --git a/docs/404.html b/docs/404.html index 7ee4ee6..a37d3dc 100644 --- a/docs/404.html +++ b/docs/404.html @@ -6,7 +6,7 @@ Page not found (404) • Characterization - + @@ -32,7 +32,7 @@ Characterization - 2.0.0 + 2.0.1.9000 @@ -60,6 +60,9 @@
  • Characterization Installation Guide
  • +
  • + Characterization Package Specification +
  • Using Characterization Package
  • @@ -71,7 +74,7 @@