Skip to content

Commit

Permalink
Merge pull request #1065 from OHDSI/develop
Browse files Browse the repository at this point in the history
Release 3.2.3
  • Loading branch information
azimov committed Jul 20, 2023
2 parents ea6b5f8 + 777f68a commit 73120fe
Show file tree
Hide file tree
Showing 39 changed files with 80 additions and 53 deletions.
2 changes: 1 addition & 1 deletion 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.2.2
Version: 3.2.3
Date: 2022-12-19
Authors@R: c(
person("Jamie", "Gilbert", email = "[email protected]", role = c("aut", "cre")),
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
CohortDiagnostics 3.2.3
=======================

1. Resolved issue where concept sets were only exported when diagnostics for them were executed. All concept sets are
now always exported into results csv and imported into databases

CohortDiagnostics 3.2.2
=======================

Expand Down
39 changes: 23 additions & 16 deletions R/ConceptSets.R
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,29 @@ getCodeSetIds <- function(criterionList) {
}
}

exportConceptSets <- function(cohortDefinitionSet, exportFolder, minCellCount, databaseId) {
ParallelLogger::logInfo("Exporting cohort concept sets to csv")
# We need to get concept sets from all cohorts in case subsets are present and
# Added incrementally after cohort generation
conceptSets <- combineConceptSetsFromCohorts(cohortDefinitionSet)
# Save concept set metadata ---------------------------------------
conceptSetsExport <- makeDataExportable(
x = conceptSets %>%
dplyr::select(-uniqueConceptSetId) %>%
dplyr::distinct(),
tableName = "concept_sets",
minCellCount = minCellCount,
databaseId = databaseId
)

# Always write all concept sets for all cohorts as they are always needed
writeToCsv(
data = conceptSetsExport,
fileName = file.path(exportFolder, "concept_sets.csv"),
incremental = FALSE,
cohortId = conceptSetsExport$cohortId
)
}

runConceptSetDiagnostics <- function(connection,
tempEmulationSchema,
Expand Down Expand Up @@ -395,22 +418,6 @@ runConceptSetDiagnostics <- function(connection,
)
return(NULL)
}
# Save concept set metadata ---------------------------------------
conceptSetsExport <- makeDataExportable(
x = conceptSets %>%
dplyr::select(-uniqueConceptSetId) %>%
dplyr::distinct(),
tableName = "concept_sets",
minCellCount = minCellCount,
databaseId = databaseId
)

writeToCsv(
data = conceptSetsExport,
fileName = file.path(exportFolder, "concept_sets.csv"),
incremental = incremental,
cohortId = conceptSetsExport$cohortId
)

uniqueConceptSets <-
conceptSets[!duplicated(conceptSets$uniqueConceptSetId), ] %>%
Expand Down
8 changes: 8 additions & 0 deletions R/RunDiagnostics.R
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,14 @@ executeDiagnostics <- function(cohortDefinitionSet,
)
}

# Always export concept sets to csv
exportConceptSets(
cohortDefinitionSet = cohortDefinitionSet,
exportFolder = exportFolder,
minCellCount = minCellCount,
databaseId = databaseId
)

# Concept set diagnostics -----------------------------------------------
if (runIncludedSourceConcepts ||
runOrphanConcepts ||
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

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

4 changes: 2 additions & 2 deletions docs/articles/CreatingAStudyPackage.html

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

4 changes: 2 additions & 2 deletions docs/articles/DatabaseModeInDiagnosticsExplorer.html

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

4 changes: 2 additions & 2 deletions docs/articles/RunningCohortDiagnostics.html

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

4 changes: 2 additions & 2 deletions docs/articles/ViewingResultsUsingDiagnosticsExplorer.html

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

4 changes: 2 additions & 2 deletions docs/articles/WhatIsCohortDiagnostics.html

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

2 changes: 1 addition & 1 deletion docs/articles/index.html

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

2 changes: 1 addition & 1 deletion docs/authors.html

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

2 changes: 1 addition & 1 deletion docs/index.html

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

6 changes: 5 additions & 1 deletion docs/news/index.html

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

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ articles:
RunningCohortDiagnostics: RunningCohortDiagnostics.html
ViewingResultsUsingDiagnosticsExplorer: ViewingResultsUsingDiagnosticsExplorer.html
WhatIsCohortDiagnostics: WhatIsCohortDiagnostics.html
last_built: 2023-05-16T17:32Z
last_built: 2023-07-20T14:57Z

2 changes: 1 addition & 1 deletion docs/reference/CohortDiagnostics-package.html

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

2 changes: 1 addition & 1 deletion docs/reference/checkInputFileEncoding.html

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

2 changes: 1 addition & 1 deletion docs/reference/createDiagnosticsExplorerZip.html

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

2 changes: 1 addition & 1 deletion docs/reference/createMergedResultsFile.html

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

2 changes: 1 addition & 1 deletion docs/reference/createResultsDataModel.html

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

2 changes: 1 addition & 1 deletion docs/reference/executeDiagnostics.html

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

2 changes: 1 addition & 1 deletion docs/reference/getCdmDataSourceInformation.html

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

2 changes: 1 addition & 1 deletion docs/reference/getCohortCounts.html

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

2 changes: 1 addition & 1 deletion docs/reference/getDataMigrator.html

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

2 changes: 1 addition & 1 deletion docs/reference/getDefaultCovariateSettings.html

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

2 changes: 1 addition & 1 deletion docs/reference/getDefaultVocabularyTableNames.html

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

2 changes: 1 addition & 1 deletion docs/reference/getResultsDataModelSpecifications.html

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

2 changes: 1 addition & 1 deletion docs/reference/index.html

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

2 changes: 1 addition & 1 deletion docs/reference/launchDiagnosticsExplorer.html

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

2 changes: 1 addition & 1 deletion docs/reference/migrateDataModel.html

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

2 changes: 1 addition & 1 deletion docs/reference/runCohortRelationshipDiagnostics.html

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

2 changes: 1 addition & 1 deletion docs/reference/runCohortTimeSeriesDiagnostics.html

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

Loading

0 comments on commit 73120fe

Please sign in to comment.