Skip to content

Commit

Permalink
Update ExtractConceptSetsInCohortDefinition.R
Browse files Browse the repository at this point in the history
  • Loading branch information
gowthamrao committed Sep 16, 2024
1 parent b546a38 commit ed403a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/ExtractConceptSetsInCohortDefinition.R
Original file line number Diff line number Diff line change
Expand Up @@ -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() |>
Expand All @@ -368,7 +369,8 @@ extractConceptSetsInCohortDefinition <-
dplyr::left_join(
dplyr::tibble(conceptSetId = codeSetsIdsUsedToQuerySourceConceptsInPrimaryCriteria) |>
dplyr::distinct() |>
dplyr::mutate(conceptSetUsedInEntryEventToQuerySource = 1)
dplyr::mutate(conceptSetUsedInEntryEventToQuerySource = 1),
by = ("conceptSetId")
)
}

Expand Down

0 comments on commit ed403a7

Please sign in to comment.