Skip to content

This webapp is designed to receive and store encrypted patient photo's of hands with varying levels of eczema.

Notifications You must be signed in to change notification settings

niek265/Diagnosing-Hand-Eczema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Diagnosing-Hand-Eczema

This webapp is designed to receive and store encrypted patient photo's of hands with varying levels of eczema.

Usage instructions

The following sites are available from this webserver:

  • / This is the index page that will serve as a login for patients.
  • /welcome This is the landing page after patients have logged into the index page.
  • /login This page is used to log into the admin panel.
  • /admin This is the admin panel, only reachable for logged-in users.

Submitting data

To create a new submission, a patient must use a valid submission ID (or code). These can be generated and viewed in the "Codes" panel on the /admin page. Once a submission has been completed, it will be added to the database and the used code will be deactivated.

Viewing data

A list of all submissions can be viewed behind the "Inzendingen" tab on the /admin page. All items in this list are clickable, after which it will load the images that correspond to this submission.

Managing codes

The "Codes" tab on the /admin page will display a list of active codes, here they can be deleted or new ones can be created.

Managing accounts

The "Accounts" tab on the /admin page will display a list of active accounts, here they can be deleted or new ones can be created.

Installation

Database setup

Firstly, install the MariaDB Server onto your machine. Once installed, create a new user and database, make sure to grant permissions for this database to the user that was just created. Now use the databaseSetup.sql script to set the correct table structure for the program, like so:

mysql -u _username_ -p _database-name_ < databaseSetup.sql

This script will also insert a default username and password into the database for first setup, more on changing that later.

To make sure all packets will be received correctly by the database server, make sure to use to following command (as admin) to increase the value of the maximum packet size to the desired amount.

set global max_allowed_packet=128M;

The program needs to authenticate with the database in order to set and get records from it. To achieve this, a ".my.cnf" file must be created in the home directory of your machine.

nano $HOME/.my.cnf

After creating this file, paste the following inside of it and change the parameters to the ones set in the database creation. Use localhost as host if the database is running on the same machine as the webserver.

[client]
user=_username_
host=_host_
port=3306
password=_password_
database=_database-name_

The database is now ready to use.

Encryption key setup

The data in the database is encrypted by use of a key. This key needs to be located in the home directory of your machine. Use the following command to create this file.

nano $HOME/key.txt

The contents of this file will be used as a cipher for the encryption of the database.

Webserver setup

A working Apache Tomcat 9 installation is needed to deploy this webapp. After this is installed, make sure to configure it for use on localhost or LAN only. Place the provided .WAR file in the desired folder where the webapps are located. If done correctly, Tomcat will automatically unpack this file into your file structure.

To ensure proper exception handling you will need to edit your tomcat installation. To do this, navigate to your tomcat installation folder and open /conf/server.xml. In here you will find a "Connector" block that will look as follows:

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               address="0.0.0.0"
               useIPVHosts="true"
               resolveHosts="true" />

You will want to add the following line to this block: maxSwallowSize = "-1". Your Connector block will therefore look as follows:

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               address="0.0.0.0"
               useIPVHosts="true"
               resolveHosts="true"
               maxSwallowSize = "-1" />

You may now save your changes and close the file. Make sure to restart the Tomcat server to reload the file.

Go to localhost:8080/login to enter the admin panel. Use the following preset credentials to login:

admin
password

After logging in, navigate to the "Accounts" tab on the left side. Create a new account and make sure to remember your password well.

Use the logout button on the top right side to log out and return to the login screen and use your newly made account to get access to the admin panel once more. Again, navigate to the "Accounts" tab and use the checkbox to delete the admin account.

The webserver is now ready for deployment.

About

This webapp is designed to receive and store encrypted patient photo's of hands with varying levels of eczema.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published