Skip to content

Commit 3af4d8f

Browse files
Merge pull request #553 from OHDSI/katy__sqlonly_bug
Fix descendant concept bug in sqlonly
2 parents 2f86863 + 08bee7f commit 3af4d8f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

R/sqlOnly.R

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,19 @@
231231
cdmFieldName
232232
)
233233
} else if (checkLevel == "CONCEPT") {
234-
if (is.na(unitConceptId)) {
234+
if (is.na(unitConceptId) &&
235+
grepl(",", conceptId)) {
236+
thresholdFilter <- sprintf(
237+
"conceptChecks$%s[conceptChecks$cdmTableName == '%s' &
238+
conceptChecks$cdmFieldName == '%s' &
239+
conceptChecks$conceptId == '%s']",
240+
thresholdField,
241+
cdmTableName,
242+
cdmFieldName,
243+
conceptId
244+
)
245+
} else if (is.na(unitConceptId) &&
246+
!grepl(",", conceptId)) {
235247
thresholdFilter <- sprintf(
236248
"conceptChecks$%s[conceptChecks$cdmTableName == '%s' &
237249
conceptChecks$cdmFieldName == '%s' &

0 commit comments

Comments
 (0)