Skip to content

Commit

Permalink
Workaround for changed column names in DQD 2.1
Browse files Browse the repository at this point in the history
See issue OHDSI#30.  The fix is borrowed from
OHDSI#35.
  • Loading branch information
xitology committed Apr 26, 2023
1 parent 8882e02 commit 6e0e034
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion R/AugmentConceptFiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ augmentConceptFiles <- function(releaseFolder) {
if (file.exists(dataQualityResultsFile)) {
writeLines("updating concept files with data quality results")
dataQualityResults <- jsonlite::fromJSON(dataQualityResultsFile)
results <- dataQualityResults$CheckResults
results <- dataQualityResults$CheckResults %>%
dplyr::rename_with(SqlRender::camelCaseToSnakeCase) %>%
dplyr::rename_with(toupper)

# augment achilles concept files with data quality failure count for relevant concept checks
conceptAggregates <- results %>% filter(!is.na(results$CONCEPT_ID) && results$FAILED==1) %>% count(CONCEPT_ID,tolower(CDM_TABLE_NAME))
Expand Down
2 changes: 1 addition & 1 deletion R/BuildNetworkPerformanceIndex.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ buildNetworkPerformanceIndex <-
performanceTable <- merge(x=performanceTable,y=analysisDetails,by="TASK",all.x=TRUE)

dqdTable <- dplyr::select(dqdData, c("CheckResults.checkId", "CheckResults.EXECUTION_TIME", "CheckResults.CATEGORY")) %>%
rename(TASK = CheckResults.checkId, TIMING = CheckResults.EXECUTION_TIME, CATEGORY = CheckResults.CATEGORY) %>% mutate(PACKAGE = "DQD") %>%
rename(TASK = CheckResults.checkId, TIMING = CheckResults.executionTime, CATEGORY = CheckResults.category) %>% mutate(PACKAGE = "DQD") %>%
mutate_at("TIMING", str_replace, " secs", "")

mergedTable <- rbind(performanceTable, dqdTable)
Expand Down

0 comments on commit 6e0e034

Please sign in to comment.