Skip to content

Commit

Permalink
don't request pseudofields
Browse files Browse the repository at this point in the history
close #477
  • Loading branch information
wibeasley committed Apr 21, 2023
1 parent df1b87f commit 3720297
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions R/redcap-read-oneshot.R
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ redcap_read_oneshot <- function(

validate_field_names(fields, stop_on_error = TRUE)

fields <- setdiff(fields, c("redcap_event_name", "redcap_repeat_instrument", "redcap_repeat_instance"))

token <- sanitize_token(token)
records_collapsed <- collapse_vector(records)
fields_collapsed <- collapse_vector(fields)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-read-batch-plumbing.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test_that("longitudinal", {
expect_true(returned_object$success)
expect_match(returned_object$status_codes, regexp="200", perl=TRUE)
expect_true(returned_object$records_collapsed=="", "A subset of records was not requested.")
expect_equal(returned_object$fields_collapsed, "study_id,redcap_event_name")
expect_equal(returned_object$fields_collapsed, "study_id")
expect_true(returned_object$filter_logic=="", "A filter was not specified.")
expect_match(returned_object$outcome_messages, regexp=expected_outcome_message, perl=TRUE)
})
Expand Down Expand Up @@ -82,7 +82,7 @@ test_that("repeated", {
expect_true(returned_object$success)
expect_match(returned_object$status_codes, regexp="200", perl=TRUE)
expect_true(returned_object$records_collapsed=="", "A subset of records was not requested.")
expect_equal(returned_object$fields_collapsed, "record_id,redcap_repeat_instrument,redcap_repeat_instance")
expect_equal(returned_object$fields_collapsed, "record_id")
expect_true(returned_object$filter_logic=="", "A filter was not specified.")
expect_match(returned_object$outcome_messages, regexp=expected_outcome_message, perl=TRUE)
})

0 comments on commit 3720297

Please sign in to comment.