Skip to content

Commit

Permalink
Merge pull request #1042 from OHDSI/develop
Browse files Browse the repository at this point in the history
Release version 3.2.0
  • Loading branch information
azimov committed Apr 4, 2023
2 parents 21d6eb3 + 7caa095 commit 0e3764f
Show file tree
Hide file tree
Showing 111 changed files with 1,573 additions and 13,411 deletions.
128 changes: 0 additions & 128 deletions .github/workflows/R_CMD_check_Hades_minor.yml

This file was deleted.

31 changes: 11 additions & 20 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: CohortDiagnostics
Type: Package
Title: Diagnostics for OHDSI Cohorts
Version: 3.1.2
Version: 3.2.0
Date: 2022-12-19
Authors@R: c(
person("Gowtham", "Rao", email = "[email protected]", role = c("aut", "cre")),
Expand Down Expand Up @@ -38,42 +38,33 @@ Imports:
SqlRender (>= 1.9.0),
stringr,
tidyr (>= 1.2.0),
CohortGenerator (>= 0.5.0)
CohortGenerator (>= 0.8.0),
remotes
Suggests:
CirceR,
DT,
Eunomia,
ggplot2,
htmltools,
knitr,
lubridate,
pool,
plotly,
purrr,
RColorBrewer,
remotes,
rmarkdown,
ROhdsiWebApi (>= 1.2.0),
RSQLite (>= 2.2.1),
scales,
shiny,
shinydashboard,
shinyWidgets,
testthat,
withr,
zip
zip,
knitr,
shiny,
OhdsiShinyModules
Remotes:
ohdsi/Eunomia,
ohdsi/FeatureExtraction,
ohdsi/ResultModelManager,
ohdsi/ROhdsiWebApi,
ohdsi/CirceR,
ohdsi/CohortGenerator
ohdsi/CohortGenerator,
ohdsi/OhdsiShinyModules
License: Apache License
VignetteBuilder: knitr
URL: https://ohdsi.github.io/CohortDiagnostics, https://github.com/OHDSI/CohortDiagnostics
BugReports: https://github.com/OHDSI/CohortDiagnostics/issues
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
Encoding: UTF-8
Language: en-US
StagedInstall: no
Config/testthat/edition: 3
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export(runCohortRelationshipDiagnostics)
export(runCohortTimeSeriesDiagnostics)
export(uploadResults)
import(DatabaseConnector)
import(dplyr)
importFrom(CohortGenerator,getCohortTableNames)
importFrom(FeatureExtraction,createDefaultCovariateSettings)
importFrom(FeatureExtraction,createTemporalCovariateSettings)
importFrom(dplyr,"%>%")
importFrom(grDevices,rgb)
importFrom(methods,is)
importFrom(rlang,.data)
Expand Down
14 changes: 14 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
CohortDiagnostics 3.2.0
=======================

1. Do not run orphan concepts checks for any subset cohorts

2. Remove use of lookback period for IR calculations - this is now a setting of the call to the package

3. Added data migration to support subsets in database schema (allow future functionality to take care of them)

4. Added functionality to `launchDiagnosticsExplorer` to make publishing to poist connect/shinyapps.io more straightforward (still requires removal of ggiraph)

5. Moved most shiny code to `OHDSI/OhdsiShinyModules`


CohortDiagnostics 3.1.2
=======================
Bug Fixes:
Expand Down
56 changes: 28 additions & 28 deletions R/CohortCharacterizationDiagnostics.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Observational Health Data Sciences and Informatics
# Copyright 2023 Observational Health Data Sciences and Informatics
#
# This file is part of CohortDiagnostics
#
Expand Down Expand Up @@ -65,7 +65,7 @@ getCohortCharacteristics <- function(connectionDetails = NULL,
results$covariateRef <- featureExtractionOutput$covariateRef
} else {
covariateIds <- results$covariateRef %>%
dplyr::select(covariateId)
dplyr::select("covariateId")
Andromeda::appendToTable(
results$covariateRef,
featureExtractionOutput$covariateRef %>%
Expand All @@ -80,7 +80,7 @@ getCohortCharacteristics <- function(connectionDetails = NULL,
if ("covariates" %in% names(featureExtractionOutput) &&
dplyr::pull(dplyr::count(featureExtractionOutput$covariates)) > 0) {
covariates <- featureExtractionOutput$covariates %>%
dplyr::rename(cohortId = cohortDefinitionId) %>%
dplyr::rename("cohortId" = "cohortDefinitionId") %>%
dplyr::left_join(populationSize, by = "cohortId", copy = TRUE) %>%
dplyr::mutate(p = sumValue / populationSize)

Expand All @@ -98,18 +98,18 @@ getCohortCharacteristics <- function(connectionDetails = NULL,
covariates <- covariates %>%
dplyr::mutate(sd = sqrt(p * (1 - p))) %>%
dplyr::select(-p) %>%
dplyr::rename(mean = averageValue) %>%
dplyr::rename("mean" = "averageValue") %>%
dplyr::select(-populationSize)

if (FeatureExtraction::isTemporalCovariateData(featureExtractionOutput)) {
covariates <- covariates %>%
dplyr::select(
cohortId,
timeId,
covariateId,
sumValue,
mean,
sd
"cohortId",
"timeId",
"covariateId",
"sumValue",
"mean",
"sd"
)
if (length(is.na(covariates$timeId)) > 0) {
covariates[is.na(covariates$timeId), ]$timeId <- -1
Expand All @@ -118,12 +118,12 @@ getCohortCharacteristics <- function(connectionDetails = NULL,
covariates <- covariates %>%
dplyr::mutate(timeId = 0) %>%
dplyr::select(
cohortId,
timeId,
covariateId,
sumValue,
mean,
sd
"cohortId",
"timeId",
"covariateId",
"sumValue",
"mean",
"sd"
)
}
if ("covariates" %in% names(results)) {
Expand All @@ -146,12 +146,12 @@ getCohortCharacteristics <- function(connectionDetails = NULL,
covariates <- covariates %>%
dplyr::mutate(sumValue = -1) %>%
dplyr::select(
cohortId,
timeId,
covariateId,
sumValue,
mean,
sd
"cohortId",
"timeId",
"covariateId",
"sumValue",
"mean",
"sd"
)
if (length(is.na(covariates$timeId)) > 0) {
covariates[is.na(covariates$timeId), ]$timeId <- -1
Expand All @@ -163,12 +163,12 @@ getCohortCharacteristics <- function(connectionDetails = NULL,
timeId = 0
) %>%
dplyr::select(
cohortId,
timeId,
covariateId,
sumValue,
mean,
sd
"cohortId",
"timeId",
"covariateId",
"sumValue",
"mean",
"sd"
)
}
if ("covariates" %in% names(results)) {
Expand Down
4 changes: 2 additions & 2 deletions R/CohortDiagnostics.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Observational Health Data Sciences and Informatics
# Copyright 2023 Observational Health Data Sciences and Informatics
#
# This file is part of CohortDiagnostics
#
Expand All @@ -21,7 +21,7 @@
#' @importFrom grDevices rgb
#' @importFrom stats aggregate
#' @importFrom utils write.csv install.packages menu unzip setTxtProgressBar txtProgressBar packageName
#' @import dplyr
#' @importFrom dplyr %>%
#' @importFrom rlang .data
#' @importFrom methods is
#' @importFrom FeatureExtraction createDefaultCovariateSettings createTemporalCovariateSettings
Expand Down
2 changes: 1 addition & 1 deletion R/CohortLevelDiagnostics.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Observational Health Data Sciences and Informatics
# Copyright 2023 Observational Health Data Sciences and Informatics
#
# This file is part of CohortDiagnostics
#
Expand Down
2 changes: 1 addition & 1 deletion R/CohortRelationship.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Observational Health Data Sciences and Informatics
# Copyright 2023 Observational Health Data Sciences and Informatics
#
# This file is part of CohortDiagnostics
#
Expand Down
2 changes: 1 addition & 1 deletion R/ConceptIds.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Observational Health Data Sciences and Informatics
# Copyright 2023 Observational Health Data Sciences and Informatics
#
# This file is part of CohortDiagnostics
#
Expand Down
Loading

0 comments on commit 0e3764f

Please sign in to comment.