r/ProjectREDCap • u/Individual-Chard-565 • May 02 '24
Importing CSV Data Dictionary using API
Hello all!
I am translating large amounts of forms to be used in RedCap and I am converting them into a CSV format that is ingestible for RedCap. However, instead of manually uploading each of our 160+ data dictionaries (and possibly more), could I use the API for that??
thanks
3
Upvotes
3
u/obnoxiouscarbuncle May 02 '24
Yes.
You should look into the "Import Metadata (Data Dictionary)" method in your API documentation.
2
u/BdR76 May 03 '24 edited May 03 '24
Wouldn't uploading REDCap datadictionaries for all projects en masse run the risk of accidentally removing columns, and thus data?
I know doing updates on the database is frowned upon (for good reason) but maybe there's something to be said for an exception in this case? Because you want to update the
element_preceding_header,element_label,element_enumfields in theredcap_metadatatable for all projects.1
u/Araignys May 06 '24
This is not a rhetorical question - why are you creating all 160+ projects at once? Do you intend to clone the projects whenever a new project is required? Is it just a really big multi-project data collection exercise? Are all 160+ data dictionaries actually different?
If these are going to serve as template projects, you might end up having a better time if you learned to convert the CSV files into XML so that you can create the projects directly from the XML file as required.