Skip to content

A self-service health kiosk that performs differential diagnosis and provide recommendations for the user, as well as locate the nearby health facilities.

License

Notifications You must be signed in to change notification settings

paucabral/health-kiosk

Repository files navigation

HIGH GROUNDS HEALTH KIOSK

A self-service health kiosk that measures vital signs, performs differential diagnosis, and locate the nearby health facilities.



Features

  • 📊 Vital Signs - Multiple sensors for measuring vital signs.
  • 📃 Differential Diagnosis - Multiple sensors for measuring vital signs.
  • 🪲 Disease Information - Shows disease information including the precautions to take.
  • 🏥 Nearby Facilities - Locates the nearest facilities where the kiosk is deployed.

Developers

  • Jose Paulo C. Cabral | BS Computer Engineering | Systems Administration | [email protected]
  • Joshua Albert T. Lopez | BS Computer Engineering | Intelligent Systems | [email protected]
  • Reinhold E. Lucana | BS Computer Engineering | Systems Administration | [email protected]
  • John Edward Sam T. Matienzo | BS Computer Engineering | Systems Administration | [email protected]

Environment

Prerequisites

  • Raspberry Pi 4 (setup according to schematics found in assets/schematic.png)
  • NodeMCU (ESP8266)
  • Chromium web browser
  • display drivers (may vary)

Schematics

Tested Environment

The code was tested on the official Raspberry Pi OS 32-bit (bullseye).

PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Creating a Development Environment

To run a development environment, simply follow the following steps:

  1. Clone the repository on the intended local machine (The instructions will assume that the default pi user is used at the home directory of /home/pi/).
    $ git clone https://github.com/paucabral/health-kiosk.git
    
  2. Create the respective .env files for both the backend and frontend applications. The respective .env.sample file for each can be used as a template for the environment variables needed inside each application. In this case, the environment variable set for the sensors endpoint could be a dummy API or the actual sensor endpoint.
  3. Afterwards, run the run-dev.sh script from a bash shell to automate the process of installing the dependencies and running the respective applications. The backend server is a Django web application which runs on port 8000 while the frontend server is a React web application that runs on port 3000.
    $ bash run-dev.sh
    

Deployment in Production

To run the kiosk in production, simply follow the following steps:

  1. Prepare the system packages by running the install.sh script with superuser privileges on the Raspberry Pi 4.
    $ sudo bash install.sh
    
  2. Upload the code located at nodemcu/nodemcu-sensors.ino to the NodeMCU (ESP8266).
  3. Create the respective .env files for both the backend and frontend applications. The respective .env.sample file for each can be used as a template for the environment variables needed inside each application.
  4. Generate a self-signed SSL certificate using the command below. Fill out the necessary details as well or leave them at default except the Common Name field.
    $ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout private.key -out certificate.crt
    
    Country Name (2 letter code) [AU]: PH
    State or Province Name (full name) [Some-State]: Metro Manila
    Locality Name (eg, city) []: Marikina
    Organization Name (eg, company) [Internet Widgits Pty Ltd]: High Grounds
    Organizational Unit Name (eg, section) []:
    Common Name (e.g. server FQDN or YOUR name) []: raspberrypi.local
    Email Address []:
    
  5. Move the generated certificate and private key to the corresponding SSL directories.
    $ sudo mv private.key /etc/ssl/private/private.key
    
    $ sudo mv certificate.crt /etc/ssl/certs/certificate.crt
    
  6. Run the build.sh script to build the frontend and backend code.
    $ bash build.sh
    
  7. Copy the health-kiosk.desktop file inside the autostart directory. This will run the server and launch the Chromium web browser in kiosk mode on boot of the desktop environment.
    $ sudo cp health-kiosk.desktop /etc/xdg/autostart/health-kiosk.desktop 
    
  8. For the shutdown button, add the rpi/rpi_shutdown_script/shutdown.py script in /etc/rc.local above exit 0 line. Follow the highlighted line below.
     
     #!/bin/sh -e
     #
     # rc.local
     #
     # This script is executed at the end of each multiuser runlevel.
     # Make sure that the script will "exit 0" on success or any other
     # value on error.
     #
     # In order to enable or disable this script just change the execution
     # bits.
     #
     # By default this script does nothing.
     
     # Print the IP address
     _IP=$(hostname -I) || true
     if [ "$_IP" ]; then
     printf "My IP address is %s\n" "$_IP"
     fi
     sudo python3 /home/pi/health-kiosk/rpi/rpi_shutdown_script/shutdown.py &
     exit 0
     
     

About

A self-service health kiosk that performs differential diagnosis and provide recommendations for the user, as well as locate the nearby health facilities.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published