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

Formats of the different data sources fetched from redcap_data are not consistent #1

Closed
a-vizoso opened this issue Feb 9, 2023 · 1 comment
Assignees

Comments

@a-vizoso
Copy link

a-vizoso commented Feb 9, 2023

Hello,

redcap_data function seems to return a dictionary with a different format depending on the method chosen to retrieve the data from. The columns

[1] "choices_calculations_or_slider_labels" [2] "branching_logic_show_field_only_if"

that are obtained when reading data through a .csv file are not avaliable when reading through API communication. The information stored in these columns when using the API method seems to be now at the columns

[1] "select_choices_or_calculations" [2] "branching_logic"

that do not have the same name neither the same format

These differences lead to bugs in the rd_transform function at the following points of the code:

https://github.com/ubidi/REDCapDM/blob/48bcc90d6067da4262cb793f326bab0e280d388a/R/utils-transform.R#L22

https://github.com/ubidi/REDCapDM/blob/48bcc90d6067da4262cb793f326bab0e280d388a/R/utils-transform.R#L143-L146

I don't know if am I missing any functionality or there is any parameter in the rd_transform function that allows to indicate that the data was read from whether one data source or another. So far I have managed to get rid of the issue when fetching data from API by creating new columns with the same format. However, I would appreciate if you could change the function in order to avoid further errors.

Thanks,

Adrian

@jcarmezim jcarmezim self-assigned this Feb 15, 2023
@jcarmezim
Copy link
Collaborator

Hello Adrian,
Thank you for your input.
We will fix it in a new package update due to be released this Friday.

Best regards,
João

jcarmezim added a commit that referenced this issue Feb 17, 2023
Improvements in several functions and solved issue (#1) together with some identified bugs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants