Skip to content

Commit

Permalink
Merge pull request #105 from darwin-eu/v2.1.1
Browse files Browse the repository at this point in the history
fix for empty edge case
  • Loading branch information
edward-burn authored Nov 22, 2023
2 parents 5014437 + f28196e commit 0b046a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]",
role = c("aut", "cre"),
Expand Down
3 changes: 3 additions & 0 deletions R/summariseCodeUse.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -426,6 +428,7 @@ if(length(tableName)>0){
schema = attr(cdm, "write_schema"),
overwrite = TRUE
)
}
}
}

Expand Down

0 comments on commit 0b046a1

Please sign in to comment.