An overview of CVRDecode

CVRDecode (or cvrdecode) is a small utility that reads multiple California digital vaccine records, provided as image files, shc URIs, or files, ending in the file-name extension ".shc" that contain shc URIs. These records are then printed using a CSV (Comma Separated Values) format, with only selected portions of the records shown. This list is sorted by name and date of birth. CSV data can be readily imported by spreadsheets. Please see the installer web page for installation instructions.

CVRDecode can be run in four ways:

When run from a terminal with no arguments, a GUI will start. Otherwise, the remaining command-line arguments should be options followed by file names or URIs.

When run from the command line, the CSV data will be written to standard output (with the exception of the -u and -v options described below). When run as a desktop application, the CSV data will be written to a file.

1.0 Command-line Options

The command-line options are

If there are no command-line arguments, a GUI will start. If there no options, the command-line arguments should be image files or text files containing SHC URIs with file names ending in the suffix ".shc".

2.0 Use as a desktop application

Linux distributions typically come with window managers that can display the installed desktop applications, so that a user can click on an icon to start a program. The following is one example - the upper right icon in the following illustration will start CVRDecode.

When started as a desktop application, CVRDecode displays a window with several buttons:

The first two buttons determine the input and output. The first button sets the input directory (or ZIP file) and the second sets the output file for CSV data. Once the corresponding file or directory is set, the button changes its background color to a pale yellow. Once the input and output are set, the Run button becomes active, and clicking it will generate the CSV file. Two additional buttons let one view the table immediately and check for any error messages. The final button, named Exit, terminates the program. The table is mostly self explanatory, with two exceptions:

The look and feel the GUI provides varies from system to system as cvrdecode preferentially uses the system look and feel.

3.0 Privacy

If the records, whether as images or as files containing shc URIs, are stored in a GPG-encrypted file, the command


  gpg -d ENCRYPTED_FILE | cvrdecode -z > table.csv
    
will generate a CSV file as described above but without the full records being stored in a file system. GPG will simply ask for a passphrase to decrypt the file.

4.0 Docker

CVRDecode is available as a Docker image. The Docker image provides a web server that will except a ZIP file containing California digital vaccine records as an input and that will produce a table as its output. To start it, use the command


  docker run --publish 80:80 --detach --name cvrdecode wtzbzdev/cvrdecode:1.0
    

The server is configured using 5 environment variables, three of which can by set with the --env option provided by docker run:

The variables BACKLOG, NTHREAD, and TRACE can be set using the docker run option --env. Changing the others using the --env option may prevent the web server from being visible outside of its container.

To stop the server, run the commands


  docker stop cvrdecode
  docker rm cvrdecode
    

4.1 Using the server

The server expects a URL with no path: for example

  http://localhost/
    

When this URL is visited by a browser, a simple web page will be shown. This page contains an HTML form with two controls. One control allows the user to specify a ZIP file containing images of California digital vaccine records and/or text files with the suffix ".shc", each containing a Smart Health Card URI. . When the button labeled Download Table is pushed, the server will upload the ZIP file and return a CSV file that the user can save or open with a suitable application such as a spreadsheet.

4.2 Deploying the server

The commands provided above are sufficient for using the docker image locally or on a private network. For public use, one should treat the server as an application server and configure a publicly visible web server as a reverse proxy using HTTPS. For large scale use, one may want to use Docker Swarm or Kubenetes in order to add CVRDecode servers as needed. The CVRDecode server is stateless.

5.0 Use Cases

CVRDecode was written based on a use case generated from personal experience. During the summer of 2021, people were hosting private events, typically outdoors, with a requirement that everyone attending was vaccinated. You could provide a vaccination record upon arrival, but you could also email a photo of a vaccination record in advance. a volunteer would then check a list (a paper copy as who was helping with what was often not known in advance). Manually copying records for 50 or so people is time consuming. CVRDecode was written to help automate the process.

For an event run by a business or organization, it is easy to provide an appropriate device for scanning the QR codes. When the person checking the records is chosen at the last moment, however, that person might not want to load additional software onto his or her smart phone or drain the phone's battery. In this case, a "low tech" solution is a good choice.

CVRDecode can also be used with the -v option so that user's can determine if their California digital vaccine record is correct - it will display all the information encoded by the QRCode (although the actual reason for this option was as an aid for software development).