User Tools

Site Tools


medal-hub:troubleshooting-guide

medAL-hub Troubleshooting Guide

Purpose and Scope

This page presents some issues you may encounter with medAL-hub, and ways to solve them.

Tablet Doesn't See the Hub

  • Are the tablets and the hub on the same wifi-network?
  • Is the hub's IP entered properly in the the health facility? (Proper syntax: http://<hub-ip-address>)
  • Do you see the proper hub address in the settings page of medAL-reader?

Modify the HUB environnement variable

First you need to enter the bitbucket folder with

cd liwi-local-data/
# Then you can edit the file with your prefered editor
nano .env
# Set the wanted value and apply the change with
php artisan config:clear

Modify the HUB environnement variable

Available commands

  • php artisan medical_cases:send
    • This will get every medical cases with a close status and with a null value for synchronized_at. And then send these cases to the medal-data
  • php artisan medical_case:close
    • This command will get every medical cases with a NOT close status and a date value for updated_at being greater than 36h and close them

Corrupted git folder or wrong permissions

Sometimes, if for example the connection is lost during the update of the folder, it is possible that the git folder gets corrupted. Or if the user does not have write permissions to the folder, the git pull command will not work. You can check this by manually running a git pull and looking at the output. If you get an error, then you need to follow one by one these commands.

# First we delete the git folder
sudo rm -r .git
# Then we initiate a new git folder
git init
# We set up the origin remote 
git remote add origin https://bitbucket.org/wavemind_swiss/liwi-local-data.git
# We fetch everything from the git (could take some time depending on the internet connexion)
git fetch
# we reset the permissions
sudo chown -R pirate:pirate /home/pirate/liwi-local-data && sudo chown -R www-data:www-data /home/pirate/liwi-local-data/storage/ && sudo chown -R root:root /home/pirate/liwi-local-data/postgres-data
# As we have change the permission of the database folder we need to restart the dokku container
docker-compose down
docker-compose up -d
# We change the branch to the right one
git checkout -f feature/socialite
# To be sure we're working with the latest commit and that no local changes are being used, we reset the git
git reset --hard HEAD
# And finally we can do a git pull. Just be sure that the output is "Already up-to-date."
git pull
medal-hub/troubleshooting-guide.txt · Last modified: 2022/05/18 08:30 by Sylvain