Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

ctsit/fr_test_tube_label_generation

Repository files navigation

REDCap First Responder Roster and Test Kit Label Generation - ARCHIVED

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.

Prerequisites

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.

Setup and Configuration

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.

  1. Create the REDCap project from First_Responder_COVID19.xml.
  2. Give a user User Rights of Full Data Set for Data Exports
  3. The user will need an API key for the project.
  4. Add the API key to the .env file.
  5. Set TIME_ZONE to assure that time stamps used in the file names and the email are accurate.
  6. Revise the EMAIL_* and SMTP_SERVER settings to reflect your local needs.

Running the R script

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>

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors