Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Package does not support forms used in both repeating and non-repeating contexts #176

Closed
5 tasks
mike-caarg opened this issue Feb 18, 2024 · 7 comments
Closed
5 tasks
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mike-caarg
Copy link

Expected Behavior

When a form is used in both a repeating and non-repeating manner, I expect REDCapTidieR to know the difference and partition the data accordingly

Current Behavior

Currently, if a form is used in both a repeating and non-repeating manner, REDCapTidieR throws an error.

How to Reproduce the Bug:

  • Create a form
  • In one event have the form as a non-repeating form
  • In another event have the form as a repeating form

Screenshots

Example output from using "read_redcap()" on a database with a form used in repeating and non-repeating contexts

> db <- REDCapTidieR::read_redcap(api$uri, api$token)
Error in `clean_redcap_long()`:                                                                                                                                                                                                                     
✖ Instruments detected that have both repeating and nonrepeating instances defined in the project:

Failure Logs

NA

Checklist

Before submitting this issue, please check and verify below that the submission meets the below criteria:

  • The issue is atomic
  • The issue description is documented
  • The issue title describes the problem succinctly
  • Developers are assigned to the issue
  • Labels are assigned to the issue
@mike-caarg mike-caarg added the bug Something isn't working label Feb 18, 2024
@rsh52
Copy link
Collaborator

rsh52 commented Feb 19, 2024

Hi @mike-caarg, thank you for raising this to our attention. You can see our discussion in another issue #169

It was intended originally to keep this as a barrier due to conflicts between tidy data principles and REDCap database design. However, we will likely be looking into a solution to help with this for v1.1.

@rsh52 rsh52 self-assigned this Feb 19, 2024
@rsh52 rsh52 added this to the 1.1 milestone Feb 19, 2024
@rsh52
Copy link
Collaborator

rsh52 commented Mar 11, 2024

@mike-caarg, @brianmsm, @bcuer (from issue #169 )

Can you try the development version on REDCapTidieR on main now with your respective databases and use allow_mixed_structure = TRUE to see if it handles your use cases? When allowed, non-repeating versions of mixed-structure instruments should appear in repeating tibbles as single repeating instances.

Please use below to install:

devtools::install_github("CHOP-CGTInformatics/REDCapTidieR")

Thank you!

@brianmsm
Copy link

Hi @rsh52
Great! it works. Everything is fine. Thank you very much for your work

@rsh52
Copy link
Collaborator

rsh52 commented Mar 18, 2024

Hi @mike-caarg and @bcuer, is there any chance we can get confirmation from you as well? We would like to submit a new release of the package at the end of this week.

@bcuer
Copy link

bcuer commented Mar 20, 2024

Hi,
Thank you for adding the functionality.
It's perfect, everything works correctly on our test data.

@mike-caarg
Copy link
Author

Hi, I have not had time for extensive testing, but this seems to fix this issue!
Thanks!

@rsh52
Copy link
Collaborator

rsh52 commented Mar 20, 2024

Thank you all! Considering this closed from #177

@rsh52 rsh52 closed this as completed Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants