Skip to content

[redcap] repeated field ordering and configuration#10500

Open
regisoc wants to merge 13 commits into
aces:mainfrom
regisoc:20260514_redcap_timestamp_to_repeated_index_main
Open

[redcap] repeated field ordering and configuration#10500
regisoc wants to merge 13 commits into
aces:mainfrom
regisoc:20260514_redcap_timestamp_to_repeated_index_main

Conversation

@regisoc
Copy link
Copy Markdown
Collaborator

@regisoc regisoc commented May 14, 2026

Brief summary of changes

This PR:

  • adds a new configuration for the repeated instrument index field choice at project level.

    • Imported repeated records will be ordered automatically based on the chosen field (defaults to repeat_instance, and timestamp still available).
    • <redcap-repeat-id>repeat_instance</redcap-repeat-id>
  • bugfixes the repeated record case. Cause/chain of events:

  • Have you updated related documentation?

Testing instructions (if applicable)

  1. have a REDCap set up that includes repeated instruments.
  2. import of single REDCap repeated instrument: trigger one repeated instrument import (notification class path).
  3. import multiple REDCap repeated instruments (single event): trigger the REDcap importer tool (bulk import path).

@regisoc regisoc added Category: Feature PR or issue that aims to introduce a new feature Module: redcap PR or issue related to redcap module labels May 14, 2026
@github-actions github-actions Bot added the Language: PHP PR or issue that update PHP code label May 14, 2026
@regisoc regisoc changed the title 20260514 redcap timestamp to repeated index main [redcap] repeated field ordering and configuration May 14, 2026
@MaximeBICMTL
Copy link
Copy Markdown
Contributor

MaximeBICMTL commented May 18, 2026

I really like the idea of using redcap_repeat_instance to get the index of a repeated instrument record (that's basically what I had in mind when I wrote the TODO comment). Do we still also need the timestamp-based approach though? If we only have the former we can always know the index of a repeated record independently of other records, which is a lot cleaner IMO (and allows us to get rid of the RedcapRecord inheritance hierarchy eventually)

@ridz1208
Copy link
Copy Markdown
Collaborator

@regisoc has this been updated according to the latest discussion ?

@regisoc
Copy link
Copy Markdown
Collaborator Author

regisoc commented May 19, 2026

@ridz1208 not yet in sync.
@MaximeBICMTL I still want to have the timestamp option, as we discover new way of handling REDCap data. The problem on the timestamp is because of user error. In a project, some users are entering data as admin which is skipping the init of multiple fields... and in any case, I made redcap_repeat_instance as the default.

@regisoc
Copy link
Copy Markdown
Collaborator Author

regisoc commented Jun 1, 2026

@ridz1208 repeated instrument logic in sync.
It includes both https://github.com/aces/CBIGR/pull/822 and the bugfix https://github.com/aces/CBIGR/pull/873.
The add-instrument feature is not included. Another PR needs to be sent.

@regisoc regisoc marked this pull request as ready for review June 1, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category: Feature PR or issue that aims to introduce a new feature Language: PHP PR or issue that update PHP code Module: redcap PR or issue related to redcap module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants