From ed403a7f4edf86d69b297bf0f6c8c73d539a4f4b Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Mon, 16 Sep 2024 18:47:23 -0400 Subject: [PATCH] Update ExtractConceptSetsInCohortDefinition.R --- R/ExtractConceptSetsInCohortDefinition.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/ExtractConceptSetsInCohortDefinition.R b/R/ExtractConceptSetsInCohortDefinition.R index 545707b..1ad4442 100644 --- a/R/ExtractConceptSetsInCohortDefinition.R +++ b/R/ExtractConceptSetsInCohortDefinition.R @@ -358,7 +358,8 @@ extractConceptSetsInCohortDefinition <- if (length(codeSetsIdsInPrimaryCriteria) > 0) { conceptSetExpression <- conceptSetExpression |> - dplyr::select(-dplyr::all_of(c("conceptSetUsedInEntryEvent"))) |> + dplyr::select(-dplyr::all_of(c("conceptSetUsedInEntryEvent", + "conceptSetUsedInEntryEventToQuerySource"))) |> dplyr::left_join( dplyr::tibble(conceptSetId = codeSetsIdsInPrimaryCriteria) |> dplyr::distinct() |> @@ -368,7 +369,8 @@ extractConceptSetsInCohortDefinition <- dplyr::left_join( dplyr::tibble(conceptSetId = codeSetsIdsUsedToQuerySourceConceptsInPrimaryCriteria) |> dplyr::distinct() |> - dplyr::mutate(conceptSetUsedInEntryEventToQuerySource = 1) + dplyr::mutate(conceptSetUsedInEntryEventToQuerySource = 1), + by = ("conceptSetId") ) }