GNUHealth on openSUSE

Jump to: navigation, search
GNUHealth

GNUHealth.png

GNU Health

Download for openSUSE


Developer: Luis Falcon
License: GPL V3
Web: http://health.gnu.org


About

GNU Health is a Free Health and Hospital Information System that provides an integrative medicine approach, including the following functionalities:

  • Electronic Medical Record (EMR)
  • Hospital Information System (HIS)
  • Health Information System
  • Personal Health Record (PHR)
  • Electronic signature for medical documents

This site describes the available GNU Health packages for openSUSE and the SUSE Linux Enterprise Server (SLES).

With the intent to provide a common installation method the GNU Health Project provides an installation method using a bash script (see also the GNU Health Installation Guide). Since this script aims to be distribution agnostic, it uses methods that do not consider basic principles in integrated, distribution based systems like openSUSE.

A short listing of the advantages when using openSUSE or SLES packages:

  • Full automatic handling of package dependencies.
  • No need to install additional compilers or deal with source code – GNU Health is precompiled for your operating system version.
  • Full integration with zypper, the distribution package manager. Zypper will not only update the system automatically, but the GNU Health installation as well
  • No need to install separate patch sets
  • Integration with systemd for automatic start and stop of the GNU Health system
  • Management of the server with openSUSE distribution tools
  • Security enhanced setup (no-login user for the GNU Health Server)

Quick Start

One-Click-Install

The easiest way to install GNU Health is via the openSUSE One-Click-Install for officially released versions.

Just select the desired GNU Health and operating system version, One-Click will manage all the rest for you.

openSUSE Package Installer

Alternatively you can install via YaST Software management, the openSUSE Package installer opi or the command-line tool zypper.

The openSUSE Package Installer opi is a command line tool that searches the Build Service and installs the requested software (and repositories). To use opi you need to install it first, using YaST or zypper:

su
zypper in opi

In case you want to use the latest GNU Health release on an 'older' Leap, you can install it quite handy with opi:

su
opi gnuhealth 
opi postgresql-server

(Note that the postgres-database is optional - it might already run on a cluster somewhere else)

When the list of repositories is presented, select e.g. Application:ERP:GNUHealth:4.2. Select to keep the repository after installation.

YaST / zypper

The installation as described in the previous chapter can as well be made with YaST or zypper.

In case you want to use the latest GNU Health release on an 'older' Leap, you need to add the GNU Health repository. Example for GNU Health 4.2 on Leap 15.4:

su
zypper ar -f -p 70 https://download.opensuse.org/repositories/Application:/ERP:/GNUHealth:/4.2/15.4/ gh42
su
zypper in gnuhealth postgresql-server (for the server)
zypper in gnuhealth-client            (for the client)

You want to install the Demo-Database for Release 4.2.x as well?

su
su postgres
cd /tmp   (note: just to be sure you are allowed to write here...)
install_demo_database.sh 42

Read the section 'How to get it running (Without reading the Instructions)' of GNUHealth.README.SUSE (you may need to be logged-in to OpenBuildService to see the file) ---

Installation of the GNU Health server

The very easy way

The gnuhealth package on openSUSE ships with a setup-script, which should be run as the user root:

su
openSUSE-gnuhealth-setup setup

The script asks 4 questions and does the setup, giving you an easy entry into the GNU Health world. Note that it should not be used for production environments, as those require a more elaborate setup (dedicated database server, no default password, ...).

Setup more in detail

For the first-time installation, a few steps have to be followed. We assume you have the package gnuhealth installed, as well the editor GNU nano.

Log in as root and start the database

su
systemctl start postgresql

Change postgres parameters. You need to log in as user postgres, in order to avoid authorisation issues. Assuming we have nano installed as editor, and you are still logged-in as user 'root'

su postgres
nano /var/lib/pgsql/data/pg_hba.conf

For a local connection (Database on the same machine) change the line with 'local' to TRUST:

    local   all             all                                     md5
to
    local   all             all                                     trust

Save your input. This will make sure that Tryton/GNUHealth server can connect to the database

Create a role for 'tryton' in the database (still logged-in as user postgres)

psql -c "CREATE USER tryton WITH CREATEDB;"

Create a database, for example 'mydb'

createdb mydb --encoding='UTF-8' --owner=tryton

Note: The owner of the database should be the same user, as under which the tryton server runs (default:tryton)

Exit as user postgres and restart the database

exit
systemctl restart postgresql

One more step before we can use the database - we need to initialize it. This should happen under the user 'tryton'. As you are still logged-in as 'root':

su tryton -s /bin/bash
/usr/bin/trytond-admin -c /etc/tryton/trytond.conf --all -d mydb

Note: Use the database name you chose in the previous step (here as default: mydb). During the initialization you will be asked for the admin password for this database. For the first time, log in to the newly initialized database with user admin and password as set during initialization.

Start the server afterwards (as root)

systemctl start gnuhealth

As result you will have a bare GNU Health database with the base modules installed.

Installation of the GNU Health client

Install the GNU Health client:

zypper in gnuhealth-client

Open the GNU Health client, either by selecting the icon from the menu, or from the command-prompt with the command 'gnuhealth-client'. Go to

'manage profiles' -> add -> name it 'localhost' -> Host: localhost

You should now see a selection of available databases. Add your newly created database. Done.

Installation of MyGNUHealth

MyGNUHealth is the Personal Medical Health Record of the GNUHealth Project.

For Tumbleweed Users (all Desktops)

MyGNUHealth is available on Tumbleweed, install it with the package manager:

zypper in mygnuhealth

For Leap Users using KDE

As MyGNUHealth needs a more recent version of the Qt-libraries than shipped in Leap 15.2 and 15.3, the package is moved to the KDE:Extra repository.

In order to install MyGNUHealth you need to update the Qt and KDE stack, as described here.

Then install MyGNUHealth:

zypper in mygnuhealth

For Leap Users not using KDE

In case you are using a Desktop-Environment (DE) that is not based on Qt , you need at least to add the following repositories and run zypper dup --allow-vendor-change:

zypper ar -p 75 'https://download.opensuse.org/repositories/KDE:/Qt5/openSUSE_Leap_$releasever' KDE-Qt5
zypper ar -p 75 'https://download.opensuse.org/repositories/KDE:/Frameworks5/openSUSE_Leap_$releasever' KDE-Frameworks
zypper ar -p 75 'https://download.opensuse.org/repositories/KDE:/Extra/KDE_Applications_openSUSE_Leap_$releasever' KDE-Extra
zypper -v dup --allow-vendor-change

If you are using LXQT, please do not add the above repositories.

Video Tutorial

Fancy some video tutorials? Lets start at the very beginning:

Once you have the system running:

Installation of the Raspberry Pi image

General

The openSUSE project offers a Raspi-image based on openSUSE Leap 15.3, XFCE or LXQT desktop and GNU Health installation from packages. It contains the GNU Health Release 3.8.x with server and client and the Demo-Database preinstalled. Some background to this:

  • The image can be transferred to a MicroSD-Card as used in the Raspi. Image size is targeted for a 32GB SD-card
  • Language and keyboard layout is English
  • Passwords for root and user 'test' are 'test'
  • Password for demo-database is GNU Health-Standard: admin:gnusolidario

Installation

  • Download the GNU Health 4.4 Image for the Raspi4
  • Check the file name and md5-hash. It should be
    e521fb851e24855176ee9453d1076c0a gnuhealth44-Leap155-XFCE-raspi4-20231225.img.xz
  • Insert the SD-card into your computer and check what device it is (command: lsblk). We assume it is /dev/sdd
  • copy the image to the SD card. This will delete all content on the SD-Card!
 xzcat gnuhealth44-Leap155-XFCE-raspi4-20231225.img.xz | dd bs=4M of=/dev/sdd iflag=fullblock oflag=direct, sync status=progress
  • insert the SD card into your Raspi and boot. Done.

Additional Tryton Modules

In case you need additional Tryton modules simply add the repository of the respective Tryton series to your GNU Health installation, e.g. for GNU Health 4.2 on Leap 15.4:

su
zypper ar -f https://download.opensuse.org/repositories/Application:/ERP:/Tryton:/6.0/$releasever/ tryton60

Additional Tryton modules can now be installed with zypper or YaST.

Note: By using the $releasever Variable instead of a hard-coded Leap version the repository is automatically adjusted during a later system-upgrade


What is different to the GNU Health setup from source (vanilla-installation)?

On the technical side, GNU Health is a set of modules for the Tryton server. Tryton itself makes use of a (postgres) database to store its information. When installing GNU Health using the openSUSE packages, GNU Health is tightly integrated into the openSUSE standard system. For security reasons, there is a seggregation of duties and roles:

  • The Postgres database runs under the user 'postgres'
  • The Tryton Server runs under the user 'tryton'. This is by default a system user without login capabilities. (use 'sudo su – tryton -s /bin/bash' to log in)

As GNU Health is an additional set of modules on top of Tryton, it runs as user 'tryton' as well.

This is the major difference to the installation via the bash script from source: The script installs everything in the home directory of the (real!) user gnuhealth! No further integration with system tools (e.g. systemd) is provided.

Some more points are listed above under About

How can I get rid of a vanilla installation?

Mixin' up a package and a vanilla installation is a perfect method to end up in a non-working system, so you need to decide for one way or the other.

To remove the vanilla installation you need to remove the installation path /home/gnuhealth/gnuhealth

  • stop any running GNU Health server (systemctl stop gnuhealth)
  • either use 'rm -rf /home/gnuhealth/gnuhealth'
  • or use YaST to remove the user gnuhealth completely (dont forget to create a new user instead - it is not recommended to work as admin/root)

Afterwards proceed as described in the Section Quick_Start. Your database should not be affected by this.


Versioning

The numbering schema of GNU Health is different from the one of Tryton. For the One-Click-Installation, this is not an issue, just chose the desired GNU Health series and openSUSE does the rest for you.

GNUHealth Series Tryton Series Shipped with Remarks
4.4 6.0 Leap 15.6 Released Dec 2023
4.2 6.0 Leap 15.5 Released Feb 2023
4.0 6.0 Leap 15.4 Released Mar 2022
3.8 5.0 Leap 15.3 Released Feb 2021
3.6 5.0 Leap 15.2 Released Nov 2019
3.4 4.6 Leap 15.1 Released Nov 2018
3.2 4.2 Leap 15.0 Released July 2017
3.0 3.8 Leap 42.3 Released Jan 2016
2.8 3.4 Released Feb 2015
2.6 3.2 Released Jul 2014

Note that Tumbleweed comes always with the latest available GNU Health Version.


The Live CD

Due to the shutdown of SUSEStudio, there is currently no Live-CD available. We are working on a replacement.


Documentation

Each installation has a set of Documentation:

  • /usr/share/doc/packages/gnuhealth/GNUHealth.README.SUSE
  • /usr/share/doc/packages/trytond/tryton-server.README.SUSE

Online documentation

Installation of Tryton Server and GNU Health on openSUSE Link to the backup of Tryton Wiki - will be replaced once the new Wiki is available

Watch the Installation Video for Leap and Tumbleweed


External links


Portal:Medical