-
Notifications
You must be signed in to change notification settings - Fork 183
[redcap] bulk importer #9808
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
base: 27.0-release
Are you sure you want to change the base?
[redcap] bulk importer #9808
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this work! I will do a deeper review once the PR is out of draft. Just a few small comments based on what I am seeing now.
I will quickly say that I prefer snake_case to camelCase, but this is non-blocking, and LORIS uses both namings anyway (and even some others...).
* @return array<mixed|RedcapConfig|null>[] a REDCap configuration with the form | ||
* [REDCap instance URL => [REDCap Project ID => REDCapConfig object]] | ||
* else null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This return type is too complex IMO. I would prefer to return a simple list of RedcapConfig
. The caller can handle special cases like the empty list itself, and the instance URLs and project IDs are available in each RedcapConfig
if needed.
$configParser = new RedcapConfigParser( | ||
$loris, | ||
$redcapInstanceURL, | ||
$redcapProjectID | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally I guess I should refactor the parser to more elegantly handle the "get all project configurations" and "get single project configuration" cases, but this is out of scope for this PR, your code is fine 👍
Brief summary of changes
This PR adds a new tool to bulk import data from REDCap linked instances/projects.
It will be mostly useful for retrospective data, or to do targeted batch import.
Multiple caveats and todos:
arguments need to be defined. There are in the script for now.Link(s) to related issue(s)
No related issue.