-
Notifications
You must be signed in to change notification settings - Fork 48
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
[FEATURE] Implement a function to export project information #410
Comments
@skadauke, I like that API method. I add it. A few questions come to mind. @skadauke or anyone else, please give your opinion.
Here's the structure of > str(d)
spec_tbl_df [1 × 26] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
$ project_id : num 212
$ project_title : chr "REDCapR Target Longitudinal Arm -see https://github.com/OuhscBbmc/REDCapR"
$ creation_time : POSIXct[1:1], format: "2014-08-31 13:07:55"
$ production_time : logi NA
$ in_production : num 0
$ project_language : chr "English"
$ purpose : num 0
$ purpose_other : logi NA
$ project_notes : logi NA
$ custom_record_label : logi NA
$ secondary_unique_field : logi NA
$ is_longitudinal : num 1
$ has_repeating_instruments_or_events: num 0
$ surveys_enabled : num 0
$ scheduling_enabled : num 0
$ record_autonumbering_enabled : num 0
$ randomization_enabled : num 0
$ ddp_enabled : num 0
$ project_irb_number : logi NA
$ project_grant_number : logi NA
$ project_pi_firstname : logi NA
$ project_pi_lastname : logi NA
$ display_today_now_button : num 1
$ missing_data_codes : logi NA
$ external_modules : chr "cross_project_piping,date_validation_action_tags"
$ bypass_branching_erase_field_prompt: num 0 |
I like tibbles so agree with you.
Fully agree.
I think there's a use case for this, and we're planning to build a function that does that into
I think there's a rare use case for this where you build a dashboard to manage multiple projects. Not sure it's worth the time needed to test and maintain as REDCapR core functionality. |
@skadauke, I think the version (about to be pulled to main) satisfies everything discussed above... External Module...except for transforming the scalar Future columnsPlease review how I handle future columns (that aren't yet returned by REDCap's API, but will be). Will that work for REDCapTidieR? Stacking multiple projectsI ended up including a snippet that stacks multiple projects in one tibble. I did it anyway for testing (to make it easy to cover as many scenarios as possible), so I included it in the examples. |
Re: future columns - do we have reason to believe the REDCap API will return additional columns in the result? |
I just looked at the code - can you double check the |
I bet some of the new features they'll keep releasing will be reflected. For instance,
ahh, you're right. I missed a few. |
Feature Request Description
It would be useful to be able to programmatically pull project-wide information about a REDCap project such as its project name, PID, and whether it's longitudinal and/or has repeated instruments.
Proposed Solution
The REDCap API supports an "Export Project Information" method (
content = "project"
). A new functionredcap_export_project_info()
or similar could be implemented to query this. Here is a minimal prototype of that function that I've found works:The text was updated successfully, but these errors were encountered: