diff --git a/DESCRIPTION b/DESCRIPTION index fc924cf..e701a11 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: CodelistGenerator Title: Generate Code Lists for the OMOP Common Data Model -Version: 2.1.0 +Version: 2.1.1 Authors@R: c( person("Edward", "Burn", email = "edward.burn@ndorms.ox.ac.uk", role = c("aut", "cre"), diff --git a/R/summariseCodeUse.R b/R/summariseCodeUse.R index 00ffc89..62be065 100644 --- a/R/summariseCodeUse.R +++ b/R/summariseCodeUse.R @@ -418,6 +418,8 @@ if(length(tableName)>0){ dplyr::select("concept_id", "domain_id"), by = c("standard_concept_id"="concept_id"), copy = TRUE) + + if(workingRecords %>% utils::head(1) %>% dplyr::tally() %>% dplyr::pull("n") >0){ codeRecords <- codeRecords %>% dplyr::union_all(workingRecords) %>% CDMConnector::computeQuery( @@ -426,6 +428,7 @@ if(length(tableName)>0){ schema = attr(cdm, "write_schema"), overwrite = TRUE ) + } } }