Physically "logging" events ought to be a thing of the past. In the Marine Corps, that aging concept still lives on. This proof of concept is there to help supplement or remove a physical Marine to write anything down. With the pandemic of the Coronavirus, logging who enters an establishment becomes increasingly important to mitigate community spread of the virus.
Camp Hansen Exchange assigned multiple Marines to manually log anyone who enters the building. During rush hours, a very long line could be seen coming out of the entrance. Once someone reaches the front, a Marine will take basic information and “legibly” transcribe it on loose printed log sheets. Sometimes, they will have the individual write their own information down with the same pen. Some issues arise such as the validity of who actually wrote what. The problems are the unintentional spread due to a single pen, legibility of the handwriting, the validity of the individual, and the quick seartch of an individual. This could cause a second or third-order effect in regards to tracing who was a close contact or a positive case.
Common Access Cards (CAC) are widely owned for anyone wanting access to a federal location such as a military base. Therefore, they ought to be used for the logging process. With a good scanner (see below for specifics) and CACs, logging events to track individuals will provide a stand-alone technology solution.
- Any Hands-Free and automatic scanner with a specification to read the
2D PDF417
type barcodes. That is because the front of the CAC is a 2D PDF417 type barcode- For example: I used the TEEMI Handsfree 1D 2D Barcode Scanner bought on Amazon. For a military purchase, please see your supply about purchasing it through Servmart or other government procurement avenue.
- Laptop or raspberry pi
Software Requirements
git clone https://github.com/marinecoders/covid_tracker_scanner.git
cd covid_tracker_scanner
- Create
.env
in thecovid_project
directory with something like:
DJ_SECRET_KEY=super-secret-key
DJ_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] 0.0.0.0
DJ_DEBUG=True
SQL_ENGINE=django.db.backends.postgresql
SQL_DATABASE=change_database_name
SQL_USER=change_super_cool_user
SQL_PASSWORD=change_super_secret_password
SQL_HOST=db
SQL_PORT=5432
- Create
.env.db
in thecovid_project
directory with something like:
POSTGRES_DB=change_database_name
POSTGRES_USER=change_super_cool_user
POSTGRES_PASSWORD=change_super_secret_password
- go back to the root directory with the
docker-compose
file docker-compose up --build
- There might be an error that the database does not exist.
- If so, run
docker-compose down -v
thendocker-compose up --build
- Afterwards, in a different terminal at the same directory, you might need to apply the tables to the database with
docker-compose exec web python manage.py migrate
- If so, run
- Open a browser and navigate to localhost:8000
Thank can only work if and only if docker-compose
is up and running. Thoughts about automating the docker-compose
is to run it upon start up so that the user does not have to do anything execpt the below.
This is to help the automation to "Marine proof" the application
- Have the docker-compose run on start up through the
Startup Application Preferences
- Create the file as
example.desktop
to launch the browser to the correct url Add the followingTake note of the[Desktop Entry] Name=Example Name Comment=Launch browser to running application Exec=sh -c "path/to/run_me.sh" Icon=/path/to/cool/icon.svg Terminal=false Type=Application Version=1.0
run_me.sh
. You will have to create that file at the path you determined - Create the
path/to/run_me.sh
. Inside it should look something like:#!/bin/bash firefox http://localhost:8000
- ensure to make it executable with
chmod +x run_me.sh
- Afterwards, make sure the example.desktop can be be launched by right clicking on it and select
Allow Launching
- See the icon change.