Loris icon indicating copy to clipboard operation
Loris copied to clipboard

[REDCap interoperability] Add import script for single imports

Open zaliqarosli opened this issue 1 year ago • 3 comments

Brief summary of changes

This is my last LORIS PR 😭

This PR adds the single import REDCap solution for LORIS, as was adapted from the C-OPN use case to be generalizable. It also fixes a bug in the v0.0.4-dev YAML schema that the importer is dependent on.

This PR has a JSON schema for the REDCap to LORIS mapping configuration file, as well as an example. It also provides a Redcap Report Importer example.

To run script: php RedcapReportImporter_Challah.php [--since 14]

See this diagram for class structure.

Please read the README.md for configuration instructions. I have also added to the config.xml file as a template for part of the setup.

Everything has been put into tools/importers/redcap for ease. The classes can be moved accordingly to wherever fits best.

Testing instructions (if applicable)

  1. Read the README and follow set up instructions
  2. If you have a REDCap instance, modify redcap_config_Challah.json to suit your REDCap project, or create a new config file and validate against the JSON schema redcap_config_schema.json
  3. Run php RedcapReportImporter_Challah.php. You can also run the script and output to a log file php RedcapReportImporter_Challah.php > log_file.log
  4. Test the date range option php RedcapReportImporter_Challah.php --since 14

Link(s) to related issue(s)

  • Resolves # (Reference the issue this fixes, if any.)

zaliqarosli avatar Jan 31 '24 16:01 zaliqarosli

This is my last LORIS PR 😭

Don't worry, @zaliqarosli ! It's open source, you can always work for free and keep sending PRs!

driusan avatar Jan 31 '24 16:01 driusan

Hi Barry @tikal004 you expressed interest in a REDCap to LORIS import script some many months ago. Here it is in case it still pertains!

zaliqarosli avatar Jan 31 '24 17:01 zaliqarosli

Hi all, thanks so much for doing this work! I wanted to clarify whether this is expected to be merged, and whether it is planned for v26. Also, it seems there are two open PRs related to REDCap -> Loris functionality, this one and #8282. I can see that they aren't specifically duplicates, but address a similar problem and I was wondering if one is preferred. Thanks for any help y'all can provide!

gsch-cmi avatar Apr 29 '24 14:04 gsch-cmi