This repository has been archived and is no longer actively maintained.
This project was archived as of October 1, 2025. The project for which it was written is now over. There's no funding to provide further maintenance for other projects. Please don't hesitate to use this code in accordance with the license; however, the authors are unable to offer any additional support.
This project provides data products in support of the First Responders COVID-19 Testing project at the University of Florida. The data products are created via R Scripts run by a Docker container.
This script uses R and these R packages:
tidyverse
dotenv
REDCapR
sendmailR
lubridate
baRcodeR
To build the Docker container, you will need only Docker.
This project is designed to read data from First_Responder_COVID19.xml in the fr_covidata REDCap module and subsequently create a zip folder containing the csv file of appointments and a pdf file of barcodes generated via baRcodeR for every site where First Responder COVID-19 testing is administered. The zipped folder is then emailed to the addressees named in an environment file.
This script uses the REDCap API to download the data from REDCap. The API must be enabled on the REDCap project and the host where this script runs will need to have access to it.
This script is configured entirely via the environment. An example .env file is provided as env.example. To use this file, copy it to the name .env and customize according to your project needs. Follow these steps to build the required components and configure the script's .env file.
- Create the REDCap project from
First_Responder_COVID19.xml. - Give a user User Rights of Full Data Set for Data Exports
- The user will need an API key for the project.
- Add the API key to the .env file.
- Set
TIME_ZONEto assure that time stamps used in the file names and the email are accurate. - Revise the
EMAIL_*andSMTP_SERVERsettings to reflect your local needs.
The primary script is label_generation.R. It can be run at the command line, in RStudio, or by building and running the docker container. In each case the script will read its configuration from the .env file.
Build the image and run the report using docker within the project directory like this:
docker build -t <image_name> .
docker run --env-file .env -v path/from/host:/home/fr_covidata_engine <image_name>