- Added the ability to automatically generate a MyCap participant code (QR code) when a REDCap record is saved or a survey is completed.
- Added template HTML that can be used in REDCap’s Alerts & Notifications to automatically email MyCap participant QR codes.
Automatically Generate MyCap participant code (QR code)
If you load a lot of records in REDCap it can be cumbersome to click the “Generate” button in the external module for each participant record. For this reason, the MyCap external module can also generate a participant QR code when a REDCap record is saved or a REDCap survey is completed. Use the QR Code Options form to specify what conditions should trigger the generation of a MyCap QR code.
- Automaticially generate a MyCap participant code:
- never – MyCap will not watch REDCap to see if a record has been saved or a survey has been completed.
- when a REDCap record is saved or a survey is completed for instrument – MyCap will generate a participant code when the specifed instrument record has been saved either by a REDCap user or a REDCap survey participant
- when a REDCap survey is completed for instrument – MyCap will generate a participant code only when the specified instrument record has been saved by a REDCap survey participant. A REDCap user updating a record will not trigger generation.
- Instrument: Specify which instrument(s) should be watched by MyCap.
Example 1. Assume you have a REDCap project with surveys enabled. Your first instrument is called “Participants” and is enabled as a public survey. You want to automatically email a MyCap QR code and MyCap app join instructions to participants after they complete your public survey. Select the “when a REDCap survey is completed for instrument” option and choose the “Participants” instrument opton. Then create an Alerts & Notification alert to email the participant their QR code. See MyCap > Participants > Distribute for information on QR codes in emails.
Example 2. Assume you have a REDCap project. Your first instrument is called “Participants”. A REDCap user creates participant records by using REDCap’s “Add / Edit Records” mechanism or by using REDCap’s “Data Import Tool” feature. You want to automatically generate MyCap QR codes when either of these actions occur. Select the “when a REDCap record is saved or a survey is completed for instrument” option and choose the “Participants” instrument opton. QR codes will automatically be created and you will not have to visit MyCap > Participants > Edit > Particiapant QR Code > Generate for each record that you added via REDCap.
Automatically Email MyCap Participant QR codes
Instructions for using REDCap’s Alerts & Notfications to automatically distribute MyCap QR codes to your participants:
- Click the “Distribute” button on the MyCap > Participants page.
- Click the “Copy to Clipboard” button. You should see a message “HTML copied to clipboard.”
- Navigate to your REDCap project > Applications (left-hand menu category) > Alerts & Notifications
- Click “Add New Alert”, or edit an existing alert.
- Scroll down to “STEP 3: Message Settings”
- Click the “Source code” toolbar icon that looks like “<>”. Paste the HTML that was copied to your clipboard.
- Make changes as needed and test.