20  Consent Forms with Unique IDs and QR Codes

Author

Chrissy h Roberts

20.1 Background

This is a very basic example of how R markdown can be scripted to create a set of uniquely barcoded consent forms. By using the QRcode from the consent form to assign unique IDs to participants, the process of assignment and ascertainment is made more robust. There is no need to use stickers or complex systems to assign IDs.

The code is an R script that acts as a controller and an RMD file which creates the final PDF/Word forms. The controller assigns IDs, generates QRCodes and sends these to the RMD file, which binds them with the information/consent sheet and creates either PDF or Word files that can be printed.

The code in the R file includes a simple system for assigning non-overlapping unique ID (UID) codes.