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

Add longitudinal support #23

Open
pbchase opened this issue Feb 11, 2025 · 0 comments
Open

Add longitudinal support #23

pbchase opened this issue Feb 11, 2025 · 0 comments

Comments

@pbchase
Copy link
Contributor

pbchase commented Feb 11, 2025

To provide longitudinal support, we need to do these things:

  1. Determine if the project is longitudinal with REDCapR::redcap_project_info_read()
  2. Export Events with REDCapR::redcap_event_read()
  3. Export instrument to event mappings with REDCapR::redcap_event_instruments()
  4. For each distinct unique_event_name in the mapping, call get_one_rectangle_of_values.R with a vector of the forms mapped to the event. Store the returned data frame as a named element of a list.
  5. Modify get_one_rectangle_of_values.R to accept event_name and to and insert it in the returned rectangle in the second position after the record_id field. The default value of the new event_name parameter is NA_character. If event_name == NA_character, the event name column should be omitted from the output to maintain compatibility with classic projects.
  6. Iterate over the list of rectangles of values, writing each to REDCap, one rectangle at a time.

As we add a function to identify and generate each event of data, we will move a lot of code from the proof of concept script into this new function. Proof_of_concept have very few parts when this issue is done:

  1. load libraries
  2. get credentials
  3. generate data
  4. write data
@pbchase pbchase added this to the Add longitudinal support milestone Feb 11, 2025
@pbchase pbchase changed the title Meta issue for longitudinal support Add longitudinal support Feb 13, 2025
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

1 participant