epicentre-msf / redcap

R utilities for interacting with REDCap
https://epicentre-msf.github.io/redcap/
Other
7 stars 3 forks source link

Add join_by suggestion to output of generate_queries() #11

Open patrickbarks opened 7 months ago

patrickbarks commented 7 months ago

Running data validation queries from generate_queries() with queryr::query_vec() requires specifying the join_by columns for queries that relate to more than one REDCap form.

Often the join_by column will just be the record ID column, but certain queries may require also joining by redcap_event_name and/or redcap_repeat_instance. Consider adding a "join_by" column to the output from generate_queries() that infers the relevant join column(s) associated with each query.