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

[redcap] new module #9474

Draft
wants to merge 51 commits into
base: main
Choose a base branch
from
Draft

[redcap] new module #9474

wants to merge 51 commits into from

Conversation

regisoc
Copy link
Contributor

@regisoc regisoc commented Nov 16, 2024

Brief summary of changes (WIP)

This PR adds the REDCap interoperability module.
This module opens an API endpoint to receive notifications from REDCap servers through the use of the Data Entry Trigger (DET). REDCap notifications are parsed and REDCap records are imported into LORIS.
If an error happens during this notification handling process, an error is generated in the issue tracker.
The module is imported from HBCD, and even if the core logic is the same, REDCap objects are now their own models.
This version also supports connection to multiple REDCap instances.

Features

The main goal was to replicate HBCD data import process based on REDCap DET.

  • Refactoring of the REDCap HTTP Client and linked classes/models.
  • Support for multiple REDCap instances.
  • Additional tools and features:
    • redcap2linst: script to import REDCap forms as LORIS LINST instruments.
    • fetch button: UI button on instrument panel to trigger data import (could be done later)

State

  • core module
  • tools
  • documentation
  • tests
    • automated test
    • test plan
  • RB configuration
  • additional features:
    • instrument fetch button (HBCD added feature) - UI button in the side panel of an instrument to trigger the import of data. Could be done in a later PR.

Testing instructions (if applicable)

Notification process:

  1. Define main assignee, REDCap instances and projects in the config.xml following the structure given in RB/config.xml file.
  2. Define which instruments could be imported by adding them to the configuration list in LORIS. See Front-end > Admin > Configuration > REDCap > redcap_importable_instrument.
  3. Send a URL notification to LORIS (i.e. endpoint /redcap/notifications) to simulate the reception of a DET notification. The payload should be the following (see redcap/notifications/redcapnotification.class.inc):
{
    "instrument":"instrument_backend_name",
    "project_id":"REDCap project ID",
    "project_url":"REDCap project URL",
    "record":"REDCap record ID / PSCID",
    "redcap_event_name":"REDCap event name",
    "redcap_url":"REDCap instance URL",
    "username":"REDCap username",
    "${instrument_backend_name}_complete":"2"
}

REDCap LINST instrument process:

  • See tools/redcap2linst.php usage.

Link(s) to related issue(s)

Links to related PRs

SQL/0000-00-01-Modules.sql Outdated Show resolved Hide resolved
@maximemulder maximemulder added Project: HBCD Issue or PR related to the HBCD project Project: C-BIG Issue or PR related to the C-BIG project Difficulty: Complex PR or issue that require a great effort to implementat, review, or test Area: Instruments PR or issue related instruments Release: SQL patch PR that contains an SQL patch to apply labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Instruments PR or issue related instruments Difficulty: Complex PR or issue that require a great effort to implementat, review, or test Project: C-BIG Issue or PR related to the C-BIG project Project: HBCD Issue or PR related to the HBCD project Release: SQL patch PR that contains an SQL patch to apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants